UNPKG

@gnosis.pm/pm-contracts

Version:

Collection of smart contracts for the Gnosis prediction market platform

671 lines (670 loc) 115 kB
{ "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" } ], "metadata": "{\"compiler\":{\"version\":\"0.5.6+commit.b259423e\"},\"language\":\"Solidity\",\"output\":{\"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,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"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\"}],\"devdoc\":{\"author\":\"Stefan George - <stefan@gnosis.pm>\",\"methods\":{\"createMarket(address,address,uint24,uint256)\":{\"details\":\"Creates a new market contract\",\"params\":{\"eventContract\":\"Event contract\",\"fee\":\"Market fee\",\"marketMaker\":\"Market maker contract\",\"startDate\":\"Start date for price logging\"},\"return\":\"Market contract\"}},\"title\":\"Market factory contract - Allows to create market contracts\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarketWithPriceLoggerFactory.sol\":\"StandardMarketWithPriceLoggerFactory\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/Event.sol\":{\"keccak256\":\"0xdcacfa25145426b5681ad7d8bafb3c117c92a37b7a0175d72a10b42f130fb8c1\",\"urls\":[\"bzzr://bd10fbdb82f0d50866442c9e95317b3176c8ee067def27d764529973fb36420a\"]},\"/home/alan/src/github.com/gnosis/pm-contracts/contracts/MarketMakers/MarketMaker.sol\":{\"keccak256\":\"0xa71f8ce92412033d0900d44c01f0702aefced87d860cf116c6a4d3efe86913cf\",\"urls\":[\"bzzr://63c5bf60b931bb032fcab23514a3db171b680b11d8c6c05ac8caa88752e3be41\"]},\"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/Market.sol\":{\"keccak256\":\"0x7bc1ebf0ea0f4cd9b6e9bfff6c6ac9088c253bcfca4e27f31e5845799f0278d8\",\"urls\":[\"bzzr://5e3f86d96ab269d284b34563501469d539cc436d62f070dd0abda2519d5e60c0\"]},\"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarket.sol\":{\"keccak256\":\"0x527abf1b0997e2d38ce3c97f7ed647b9e913424828594287e2b068f2fb41ad4c\",\"urls\":[\"bzzr://16756e1b212fd40f21de50d99c8b7a5dde0acc2b0b047af8beead831a1274bd7\"]},\"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarketWithPriceLogger.sol\":{\"keccak256\":\"0xac611de823e324e444a9749619091be1f81edfd67af6109581c2f8655251fb8e\",\"urls\":[\"bzzr://feb7902d610a1e499e0330780e0e9638d4372ad941e5d5896cb1730df791405a\"]},\"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarketWithPriceLoggerFactory.sol\":{\"keccak256\":\"0x81f233b1b25619bf83726af248a65e713660eb817098af83874cd93fddc7a4c4\",\"urls\":[\"bzzr://c37407f5fdc24b6fdcc5b7fad83b99da925ee9dcf0c4da1c8f4c7a7a4afe69a2\"]},\"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol\":{\"keccak256\":\"0xf4d12f4a59c17e66dfa6791188f621a8914e2038a4e3f72d6fc9fb903ca8e18e\",\"urls\":[\"bzzr://a477ccd203e677cc904b1a4f8fcc85251c5b5e09c5c10eed27e01318584b16d1\"]},\"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Tokens/OutcomeToken.sol\":{\"keccak256\":\"0x3d4c9ec14a60cf7577d366da5116e919a4331da8d6d993174f7d599f84ae74e0\",\"urls\":[\"bzzr://20f87450259a3af24ff1769faa9ab3b714d01921e9d8fa4efa75a0c277837a8a\"]},\"@gnosis.pm/util-contracts/contracts/Proxy.sol\":{\"keccak256\":\"0xeab0e83a9ec9e7f052c0455a11577061ec6d1994db08dae429abd6faaabf6555\",\"urls\":[\"bzzr://b2c1273d4ec30e2f9e768eea8c510f8493a7359b03e01923d93eea86b57ec145\"]},\"openzeppelin-solidity/contracts/drafts/SignedSafeMath.sol\":{\"keccak256\":\"0xb4b45cd5475c318722ac0f8d7e2b9e77fee6f4f36374c1110fe615d50fbc0650\",\"urls\":[\"bzzr://a90fb457269c8a03ec5b811c71acef08a2751a4d2019b0661328610f9357dae7\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x4ccf2d7b51873db1ccfd54ca2adae5eac3b184f9699911ed4490438419f1c690\",\"urls\":[\"bzzr://1604f5b6d6e916c154efd8c6720cda069e5ba32dfa0a9dedf2b42e5b02d07f89\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x852793a3c2f86d336a683b30d688ec3dcfc57451af5a2bf5975cda3b7191a901\",\"urls\":[\"bzzr://07fb42206812a17c1f71e548cfa5cec6f9aa1ae0ca5df870718ca4aa9759d1a5\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x90e8c2521653bbb1768b05889c5760031e688d9cd361f167489b89215e201b95\",\"urls\":[\"bzzr://aa8b45b57edafc3d67bc5d916327ea16807fae33f753ca163ae0c4061b789766\"]}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b50604051602080610fa68339810180604052602081101561003057600080fd5b8101908080519060200190929190505050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610f15806100916000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80638e44df531461003b578063d8218744146100f8575b600080fd5b6100b66004803603608081101561005157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803562ffffff16906020019092919080359060200190929190505050610142565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610100610381565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff163386868686604051610177906103a6565b808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018362ffffff1662ffffff1681526020018281526020019650505050505050604051809103906000f08015801561027a573d6000803e3d6000fd5b5090503373ffffffffffffffffffffffffffffffffffffffff167f969b1ad77db8ae8298dedcdf1f2945322eaf681e1d56fcebfd4c23de996dc4848287878787604051808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018362ffffff1662ffffff1681526020018281526020019550505050505060405180910390a2949350505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610b36806103b48339019056fe608060405234801561001057600080fd5b5060405160c080610b36833981018060405260c081101561003057600080fd5b81019080805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190505050858585858584600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156100b357600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561015e5750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156101765750620f424062ffffff168162ffffff16105b61017f57600080fd5b83600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055504360028190555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff1660e01b815260040160206040518083038186803b15801561027057600080fd5b505afa158015610284573d6000803e3d6000fd5b505050506040513d602081101561029a57600080fd5b810190808051906020019092919050505060ff166040519080825280602002602001820160405280156102dc5781602001602082028038833980820191505090505b50600690805190602001906102f2929190610486565b5080600460146101000a81548162ffffff021916908362ffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600760006101000a81548160ff0219169083600281111561037257fe5b021790555050505050506002600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff1660e01b815260040160206040518083038186803b1580156103e657600080fd5b505afa1580156103fa573d6000803e3d6000fd5b505050506040513d602081101561041057600080fd5b810190808051906020019092919050505060ff161461042e57600080fd5b60008114156104435742600881905550610458565b4281101561045057600080fd5b806008819055505b600854600a819055506002680100000000000000008161047457fe5b04600b819055505050505050506104f8565b8280548282559060005260206000209081019282156104c2579160200282015b828111156104c15782518255916020019190600101906104a6565b5b5090506104cf91906104d3565b5090565b6104f591905b808211156104f15760008160009055506001016104d9565b5090565b90565b61062f806105076000396000f3fe6080604052600436106100f35760003560e01c8063a619486e1161008a578063ddca3f4311610059578063ddca3f4314610401578063df449cb814610436578063e274fd2414610461578063fbde47f6146104b8576100f3565b8063a619486e1461031b578063c040e6b814610372578063c24a0f8b146103ab578063cb4c86b7146103d6576100f3565b806359acb42c116100c657806359acb42c1461024b57806368b586d5146102765780638b797a0c146102a1578063a157979c146102cc576100f3565b806302d05d3f146101415780630b97bc86146101985780631f21f9af146101c3578063561cce0a1461021a575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e806000811461013c573d6000f35b3d6000fd5b34801561014d57600080fd5b506101566104ed565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101a457600080fd5b506101ad610513565b6040518082815260200191505060405180910390f35b3480156101cf57600080fd5b506101d8610519565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561022657600080fd5b5061022f61053f565b604051808260ff1660ff16815260200191505060405180910390f35b34801561025757600080fd5b50610260610544565b6040518082815260200191505060405180910390f35b34801561028257600080fd5b5061028b61054a565b6040518082815260200191505060405180910390f35b3480156102ad57600080fd5b506102b6610550565b6040518082815260200191505060405180910390f35b3480156102d857600080fd5b50610305600480360360208110156102ef57600080fd5b8101908080359060200190929190505050610556565b6040518082815260200191505060405180910390f35b34801561032757600080fd5b50610330610577565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561037e57600080fd5b5061038761059c565b6040518082600281111561039757fe5b60ff16815260200191505060405180910390f35b3480156103b757600080fd5b506103c06105af565b6040518082815260200191505060405180910390f35b3480156103e257600080fd5b506103eb6105b5565b6040518082815260200191505060405180910390f35b34801561040d57600080fd5b506104166105bb565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b34801561044257600080fd5b5061044b6105d0565b6040518082815260200191505060405180910390f35b34801561046d57600080fd5b506104766105d6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156104c457600080fd5b506104cd6105fc565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60085481565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600181565b60025481565b600a5481565b600c5481565b6006818154811061056357fe5b906000526020600020016000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600760009054906101000a900460ff1681565b60095481565b60055481565b600460149054906101000a900462ffffff1681565b600b5481565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b620f42408156fea165627a7a7230582065c17f145e6b937964c164036f854c9c984839cc85937ccdbab0381644b274650029a165627a7a723058206476f954938c9fb49ddf1f699a7bf66e2a121cae29a97bac3c93de57316894090029", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c80638e44df531461003b578063d8218744146100f8575b600080fd5b6100b66004803603608081101561005157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803562ffffff16906020019092919080359060200190929190505050610142565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610100610381565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff163386868686604051610177906103a6565b808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018362ffffff1662ffffff1681526020018281526020019650505050505050604051809103906000f08015801561027a573d6000803e3d6000fd5b5090503373ffffffffffffffffffffffffffffffffffffffff167f969b1ad77db8ae8298dedcdf1f2945322eaf681e1d56fcebfd4c23de996dc4848287878787604051808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018362ffffff1662ffffff1681526020018281526020019550505050505060405180910390a2949350505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610b36806103b48339019056fe608060405234801561001057600080fd5b5060405160c080610b36833981018060405260c081101561003057600080fd5b81019080805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190505050858585858584600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156100b357600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561015e5750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156101765750620f424062ffffff168162ffffff16105b61017f57600080fd5b83600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055504360028190555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff1660e01b815260040160206040518083038186803b15801561027057600080fd5b505afa158015610284573d6000803e3d6000fd5b505050506040513d602081101561029a57600080fd5b810190808051906020019092919050505060ff166040519080825280602002602001820160405280156102dc5781602001602082028038833980820191505090505b50600690805190602001906102f2929190610486565b5080600460146101000a81548162ffffff021916908362ffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600760006101000a81548160ff0219169083600281111561037257fe5b021790555050505050506002600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff1660e01b815260040160206040518083038186803b1580156103e657600080fd5b505afa1580156103fa573d6000803e3d6000fd5b505050506040513d602081101561041057600080fd5b810190808051906020019092919050505060ff161461042e57600080fd5b60008114156104435742600881905550610458565b4281101561045057600080fd5b806008819055505b600854600a819055506002680100000000000000008161047457fe5b04600b819055505050505050506104f8565b8280548282559060005260206000209081019282156104c2579160200282015b828111156104c15782518255916020019190600101906104a6565b5b5090506104cf91906104d3565b5090565b6104f591905b808211156104f15760008160009055506001016104d9565b5090565b90565b61062f806105076000396000f3fe6080604052600436106100f35760003560e01c8063a619486e1161008a578063ddca3f4311610059578063ddca3f4314610401578063df449cb814610436578063e274fd2414610461578063fbde47f6146104b8576100f3565b8063a619486e1461031b578063c040e6b814610372578063c24a0f8b146103ab578063cb4c86b7146103d6576100f3565b806359acb42c116100c657806359acb42c1461024b57806368b586d5146102765780638b797a0c146102a1578063a157979c146102cc576100f3565b806302d05d3f146101415780630b97bc86146101985780631f21f9af146101c3578063561cce0a1461021a575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e806000811461013c573d6000f35b3d6000fd5b34801561014d57600080fd5b506101566104ed565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101a457600080fd5b506101ad610513565b6040518082815260200191505060405180910390f35b3480156101cf57600080fd5b506101d8610519565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561022657600080fd5b5061022f61053f565b604051808260ff1660ff16815260200191505060405180910390f35b34801561025757600080fd5b50610260610544565b6040518082815260200191505060405180910390f35b34801561028257600080fd5b5061028b61054a565b6040518082815260200191505060405180910390f35b3480156102ad57600080fd5b506102b6610550565b6040518082815260200191505060405180910390f35b3480156102d857600080fd5b50610305600480360360208110156102ef57600080fd5b8101908080359060200190929190505050610556565b6040518082815260200191505060405180910390f35b34801561032757600080fd5b50610330610577565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561037e57600080fd5b5061038761059c565b6040518082600281111561039757fe5b60ff16815260200191505060405180910390f35b3480156103b757600080fd5b506103c06105af565b6040518082815260200191505060405180910390f35b3480156103e257600080fd5b506103eb6105b5565b6040518082815260200191505060405180910390f35b34801561040d57600080fd5b506104166105bb565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b34801561044257600080fd5b5061044b6105d0565b6040518082815260200191505060405180910390f35b34801561046d57600080fd5b506104766105d6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156104c457600080fd5b506104cd6105fc565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60085481565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600181565b60025481565b600a5481565b600c5481565b6006818154811061056357fe5b906000526020600020016000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600760009054906101000a900460ff1681565b60095481565b60055481565b600460149054906101000a900462ffffff1681565b600b5481565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b620f42408156fea165627a7a7230582065c17f145e6b937964c164036f854c9c984839cc85937ccdbab0381644b274650029a165627a7a723058206476f954938c9fb49ddf1f699a7bf66e2a121cae29a97bac3c93de57316894090029", "sourceMap": "199:1372:12:-;;;600:202;8:9:-1;5:2;;;30:1;27;20:12;5:2;600:202:12;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;600:202:12;;;;;;;;;;;;;;;;755:40;713:39;;:82;;;;;;;;;;;;;;;;;;600:202;199:1372;;;;;;", "deployedSourceMap": "199:1372:12:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;199:1372:12;;;;;;;;;;;;;;;;;;;;;;;;1060:509;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;1060:509:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;477:76;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;1060:509;1188:36;1347:39;;;;;;;;;;;1389:10;1401:13;1416:11;1429:3;1434:9;1287:157;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1287:157:12;1240:206;;1499:10;1461:101;;;1511:6;1519:13;1534:11;1547:3;1552:9;1461:101;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1060:509;;;;;;:::o;477:76::-;;;;;;;;;;;;;:::o;199:1372::-;;;;;;;;:::o", "source": "pragma solidity ^0.5.0;\nimport \"../Markets/StandardMarketWithPriceLogger.sol\";\n\n\n/// @title Market factory contract - Allows to create market contracts\n/// @author Stefan George - <stefan@gnosis.pm>\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(address(new StandardMarketWithPriceLoggerProxy(\n address(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": [ 3622 ] }, "id": 3623, "nodeType": "SourceUnit", "nodes": [ { "id": 3551, "literals": [ "solidity", "^", "0.5", ".0" ], "nodeType": "PragmaDirective", "src": "0:23:12" }, { "absolutePath": "/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarketWithPriceLogger.sol", "file": "../Markets/StandardMarketWithPriceLogger.sol", "id": 3552, "nodeType": "ImportDirective", "scope": 3623, "sourceUnit": 3550, "src": "24:54:12", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [], "contractDependencies": [ 3351 ], "contractKind": "contract", "documentation": "@title Market factory contract - Allows to create market contracts\n @author Stefan George - <stefan@gnosis.pm>", "fullyImplemented": true, "id": 3622, "linearizedBaseContracts": [ 3622 ], "name": "StandardMarketWithPriceLoggerFactory", "nodeType": "ContractDefinition", "nodes": [ { "anonymous": false, "documentation": null, "id": 3566, "name": "StandardMarketWithPriceLoggerCreation", "nodeType": "EventDefinition", "parameters": { "id": 3565, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3554, "indexed": true, "name": "creator", "nodeType": "VariableDeclaration", "scope": 3566, "src": "326:23:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 3553, "name": "address", "nodeType": "ElementaryTypeName", "src": "326:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 3556, "indexed": false, "name": "market", "nodeType": "VariableDeclaration", "scope": 3566, "src": "351:13:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_Market_$2296", "typeString": "contract Market" }, "typeName": { "contractScope": null, "id": 3555, "name": "Market", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 2296, "src": "351:6:12", "typeDescriptions": { "typeIdentifier": "t_contract$_Market_$2296", "typeString": "contract Market" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 3558, "indexed": false, "name": "eventContract", "nodeType": "VariableDeclaration", "scope": 3566, "src": "366:19:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_Event_$392", "typeString": "contract Event" }, "typeName": { "contractScope": null, "id": 3557, "name": "Event", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 392, "src": "366:5:12", "typeDescriptions": { "typeIdentifier": "t_contract$_Event_$392", "typeString": "contract Event" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 3560, "indexed": false, "name": "marketMaker", "nodeType": "VariableDeclaration", "scope": 3566, "src": "387:23:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_MarketMaker_$1606", "typeString": "contract MarketMaker" }, "typeName": { "contractScope": null, "id": 3559, "name": "MarketMaker", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 1606, "src": "387:11:12", "typeDescriptions": { "typeIdentifier": "t_contract$_MarketMaker_$1606", "typeString": "contract MarketMaker" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 3562, "indexed": false, "name": "fee", "nodeType": "VariableDeclaration", "scope": 3566, "src": "412:10:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint24", "typeString": "uint24" }, "typeName": { "id": 3561, "name": "uint24", "nodeType": "ElementaryTypeName", "src": "412:6:12", "typeDescriptions": { "typeIdentifier": "t_uint24", "typeString": "uint24" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 3564, "indexed": false, "name": "startDate", "nodeType": "VariableDeclaration", "scope": 3566, "src": "424:14:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 3563, "name": "uint", "nodeType": "ElementaryTypeName", "src": "424:4:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "325:114:12" }, "src": "282:158:12" }, { "constant": false, "id": 3568, "name": "standardMarketWithPriceLoggerMasterCopy", "nodeType": "VariableDeclaration", "scope": 3622, "src": "477:76:12", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_StandardMarketWithPriceLogger_$3549", "typeString": "contract StandardMarketWithPriceLogger" }, "typeName": { "contractScope": null, "id": 3567, "name": "StandardMarketWithPriceLogger", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 3549, "src": "477:29:12", "typeDescriptions": { "typeIdentifier": "t_contract$_StandardMarketWithPriceLogger_$3549", "typeString": "contract StandardMarketWithPriceLogger" } }, "value": null, "visibility": "public" }, { "body": { "id": 3577, "nodeType": "Block", "src": "703:99:12", "statements": [ { "expression": { "argumentTypes": null, "id": 3575, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 3573, "name": "standardMarketWithPriceLoggerMasterCopy", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3568, "src": "713:39:12", "typeDescriptions": { "typeIdentifier": "t_contract$_StandardMarketWithPriceLogger_$3549", "typeString": "contract StandardMarketWithPriceLogger" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 3574, "name": "_standardMarketWithPriceLoggerMasterCopy", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3570, "src": "755:40:12", "typeDescriptions": { "typeIdentifier": "t_contract$_StandardMarketWithPriceLogger_$3549", "typeString": "contract StandardMarketWithPriceLogger" } }, "src": "713:82:12", "typeDescriptions": { "typeIdentifier": "t_contract$_StandardMarketWithPriceLogger_$3549", "typeString": "contract StandardMarketWithPriceLogger" } }, "id": 3576, "nodeType": "ExpressionStatement", "src": "713:82:12" } ] }, "documentation": null, "id": 3578, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 3571, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3570, "name": "_standardMarketWithPriceLoggerMasterCopy", "nodeType": "VariableDeclaration", "scope": 3578, "src": "612:70:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_StandardMarketWithPriceLogger_$3549", "typeString": "contract StandardMarketWithPriceLogger" }, "typeName": { "contractScope": null, "id": 3569, "name": "StandardMarketWithPriceLogger", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 3549, "src": "612:29:12", "typeDescriptions": { "typeIdentifier": "t_contract$_StandardMarketWithPriceLogger_$3549", "typeString": "contract StandardMarketWithPriceLogger" } }, "value": null, "visibility": "internal" } ], "src": "611:72:12" }, "returnParameters": { "id": 3572, "nodeType": "ParameterList", "parameters": [], "src": "703:0:12" }, "scope": 3622, "src": "600:202:12", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 3620, "nodeType": "Block", "src": "1230:339:12", "statements": [ { "expression": { "argumentTypes": null, "id": 3608, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 3591, "name": "market", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3589, "src": "1240:6:12", "typeDescriptions": { "typeIdentifier": "t_contract$_StandardMarketWithPriceLogger_$3549", "typeString": "contract StandardMarketWithPriceLogger" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 3597, "name": "standardMarketWithPriceLoggerMasterCopy", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3568, "src": "1347:39:12", "typeDescriptions": { "typeIdentifier": "t_contract$_StandardMarketWithPriceLogger_$3549", "typeString": "contract StandardMarketWithPriceLogger" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_StandardMarketWithPriceLogger_$3549", "typeString": "contract StandardMarketWithPriceLogger" } ], "id": 3596, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1339:7:12", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, "id": 3598, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1339:48:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 3599, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7920, "src": "1389:3:12", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 3600, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "1389:10:12", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 3601, "name": "eventContract", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3580, "src": "1401:13:12", "typeDescriptions": { "typeIdentifier": "t_contract$_Event_$392", "typeString": "contract Event" } }, { "argumentTypes": null, "id": 3602, "name": "marketMaker", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3582, "src": "1416:11:12", "typeDescriptions": { "typeIdentifier": "t_contract$_MarketMaker_$1606", "typeString": "contract MarketMaker" } }, { "argumentTypes": null, "id": 3603, "name": "fee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3584, "src": "1429:3:12", "typeDescriptions": { "typeIdentifier": "t_uint24", "typeString": "uint24" } }, { "argumentTypes": null, "id": 3604, "name": "startDate", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3586, "src": "1434:9:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_contract$_Event_$392", "typeString": "contract Event" }, { "typeIdentifier": "t_contract$_MarketMaker_$1606", "typeString": "contract MarketMaker" }, { "typeIdentifier": "t_uint24", "typeString": "uint24" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 3595,