{
    "schemaVersion": "2.0.0",
    "contractName": "Voting",
    "compilerOutput": {
        "abi": [
            {
                "constant": true,
                "inputs": [
                    {
                        "internalType": "uint256",
                        "name": "_pollId",
                        "type": "uint256"
                    }
                ],
                "name": "winningOption",
                "outputs": [
                    {
                        "internalType": "uint256",
                        "name": "",
                        "type": "uint256"
                    }
                ],
                "payable": false,
                "stateMutability": "view",
                "type": "function"
            },
            {
                "constant": true,
                "inputs": [
                    {
                        "internalType": "uint256",
                        "name": "_pollId",
                        "type": "uint256"
                    }
                ],
                "name": "totalWinningTokens",
                "outputs": [
                    {
                        "internalType": "uint256",
                        "name": "",
                        "type": "uint256"
                    }
                ],
                "payable": false,
                "stateMutability": "view",
                "type": "function"
            },
            {
                "constant": true,
                "inputs": [],
                "name": "nextPollId",
                "outputs": [
                    {
                        "internalType": "uint256",
                        "name": "",
                        "type": "uint256"
                    }
                ],
                "payable": false,
                "stateMutability": "view",
                "type": "function"
            },
            {
                "constant": true,
                "inputs": [
                    {
                        "internalType": "uint256",
                        "name": "_pollId",
                        "type": "uint256"
                    }
                ],
                "name": "totalRevealedTokens",
                "outputs": [
                    {
                        "internalType": "uint256",
                        "name": "",
                        "type": "uint256"
                    }
                ],
                "payable": false,
                "stateMutability": "view",
                "type": "function"
            },
            {
                "constant": false,
                "inputs": [
                    {
                        "internalType": "uint256",
                        "name": "_commitEndBlock",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "_revealEndBlock",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "_winnerLock",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "_loserLock",
                        "type": "uint256"
                    }
                ],
                "name": "createPoll",
                "outputs": [
                    {
                        "internalType": "uint256",
                        "name": "",
                        "type": "uint256"
                    }
                ],
                "payable": false,
                "stateMutability": "nonpayable",
                "type": "function"
            },
            {
                "constant": false,
                "inputs": [
                    {
                        "internalType": "uint256",
                        "name": "_pollId",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "_voteOption",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "_voteSalt",
                        "type": "uint256"
                    }
                ],
                "name": "revealVote",
                "outputs": [],
                "payable": false,
                "stateMutability": "nonpayable",
                "type": "function"
            },
            {
                "constant": true,
                "inputs": [
                    {
                        "internalType": "uint256",
                        "name": "_pollId",
                        "type": "uint256"
                    },
                    {
                        "internalType": "address",
                        "name": "_user",
                        "type": "address"
                    }
                ],
                "name": "userWinningTokens",
                "outputs": [
                    {
                        "internalType": "bool",
                        "name": "ended",
                        "type": "bool"
                    },
                    {
                        "internalType": "uint256",
                        "name": "tokens",
                        "type": "uint256"
                    }
                ],
                "payable": false,
                "stateMutability": "view",
                "type": "function"
            },
            {
                "constant": false,
                "inputs": [
                    {
                        "internalType": "uint256",
                        "name": "_pollId",
                        "type": "uint256"
                    },
                    {
                        "internalType": "bytes32",
                        "name": "_vote",
                        "type": "bytes32"
                    },
                    {
                        "internalType": "uint256",
                        "name": "_tokensToCommit",
                        "type": "uint256"
                    }
                ],
                "name": "commitVote",
                "outputs": [],
                "payable": false,
                "stateMutability": "nonpayable",
                "type": "function"
            },
            {
                "inputs": [
                    {
                        "internalType": "address payable",
                        "name": "treasuryAddress",
                        "type": "address"
                    },
                    {
                        "internalType": "address",
                        "name": "_emitterAddress",
                        "type": "address"
                    }
                ],
                "payable": false,
                "stateMutability": "nonpayable",
                "type": "constructor"
            }
        ],
        "devdoc": {
            "author": "Freydal",
            "details": "Voting manages polls and votes on governance matters within the Kosu system.  Poll resolution logic will be the responsibility of the contract utilizing this service.",
            "methods": {
                "commitVote(uint256,bytes32,uint256)": {
                    "details": "Commit a vote in a poll to be later revealed. The salt and option must be retained for a successful reveal.",
                    "params": {
                        "_pollId": "Poll id to commit vote to.",
                        "_tokensToCommit": "Number of tokens to commit to vote.",
                        "_vote": "Hash encoded vote option with salt."
                    }
                },
                "constructor": {
                    "details": "Initializes the voting contract with the shared event emitter and treasury contracts.",
                    "params": {
                        "_emitterAddress": "Deployed EventEmitter address.",
                        "treasuryAddress": "Deployed Treasury address."
                    }
                },
                "createPoll(uint256,uint256,uint256,uint256)": {
                    "details": "Create a new poll. The commit and reveal periods must be provided. The creation of the poll is notified with an event from the shared EventEmitter.",
                    "params": {
                        "_commitEndBlock": "Block number when commit phase ends.",
                        "_loserLock": "Blocks after poll losing voters' tokens are locked.",
                        "_revealEndBlock": "Block number when reveal phase ends.",
                        "_winnerLock": "Blocks after poll winning voters' tokens are locked."
                    },
                    "return": "Poll index number. Will be used as the key for interacting with a vote."
                },
                "revealVote(uint256,uint256,uint256)": {
                    "details": "Reveal a previously committed vote by providing the vote option and salt used to generate the vote hash.",
                    "params": {
                        "_pollId": "Poll id to commit vote to.",
                        "_voteOption": "Vote option used to generate vote hash.",
                        "_voteSalt": "Salt used to generate vote hash."
                    }
                },
                "totalRevealedTokens(uint256)": {
                    "details": "Retrieve the total number of tokens revealed for a finalized poll.",
                    "params": {
                        "_pollId": "Poll index to check total revealed tokens for."
                    },
                    "return": "The total number of tokens revealed in the poll."
                },
                "totalWinningTokens(uint256)": {
                    "details": "Retrieve the total number of tokens that supported the winning option of a finalized poll.",
                    "params": {
                        "_pollId": "Poll index to check winning tokens for."
                    },
                    "return": "The uint number of tokens supporting the winning option."
                },
                "userWinningTokens(uint256,address)": {
                    "details": "Retrieve the number of tokens committed by a user for the winning option.",
                    "params": {
                        "_pollId": "Poll index to check winning tokens for.",
                        "_user": "Address of user to check winning tokens."
                    }
                },
                "winningOption(uint256)": {
                    "details": "Retrieve the winning option for a finalized poll.",
                    "params": {
                        "_pollId": "Poll index to check winning option for."
                    },
                    "return": "The winning option."
                }
            },
            "title": "Voting"
        },
        "evm": {
            "bytecode": {
                "linkReferences": {},
                "object": "0x6080604052600160025534801561001557600080fd5b50604051610df1380380610df18339818101604052604081101561003857600080fd5b508051602090910151600180546001600160a01b039283166001600160a01b03199182161790915560008054929093169116179055610d758061007c6000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c80638524ceb31161005b5780638524ceb3146100fe578063b11d8bb81461012d578063f8a2e51014610158578063fa07153a1461019f57610088565b80630dca7ed81461008d5780631b89ef0f146100bc5780632b786571146100d95780633d371d8e146100e1575b600080fd5b6100aa600480360360208110156100a357600080fd5b50356101c8565b60408051918252519081900360200190f35b6100aa600480360360208110156100d257600080fd5b50356102a4565b6100aa610380565b6100aa600480360360208110156100f757600080fd5b5035610386565b6100aa6004803603608081101561011457600080fd5b5080359060208101359060408101359060600135610463565b6101566004803603606081101561014357600080fd5b5080359060208101359060400135610695565b005b6101846004803603604081101561016e57600080fd5b50803590602001356001600160a01b0316610959565b60408051921515835260208301919091528051918290030190f35b610156600480360360608110156101b557600080fd5b5080359060208101359060400135610a77565b60006101d2610cc0565b506000828152600360208181526040928390208351610120810185528154815260018201546001600160a01b031692810192909252600281015493820193909352908201546060820181905260048301546080830152600583015460a0830152600683015460c0830152600783015460e083015260089092015461010082015290431161029a576040805162461bcd60e51b81526020600482015260116024820152701c1bdb1b081a185cdb89dd08195b991959607a1b604482015290519081900360640190fd5b60c0015192915050565b60006102ae610cc0565b506000828152600360208181526040928390208351610120810185528154815260018201546001600160a01b031692810192909252600281015493820193909352908201546060820181905260048301546080830152600583015460a0830152600683015460c0830152600783015460e0830152600890920154610100820152904311610376576040805162461bcd60e51b81526020600482015260116024820152701c1bdb1b081a185cdb89dd08195b991959607a1b604482015290519081900360640190fd5b60e0015192915050565b60025481565b6000610390610cc0565b506000828152600360208181526040928390208351610120810185528154815260018201546001600160a01b031692810192909252600281015493820193909352908201546060820181905260048301546080830152600583015460a0830152600683015460c0830152600783015460e0830152600890920154610100820152904311610458576040805162461bcd60e51b81526020600482015260116024820152701c1bdb1b081a185cdb89dd08195b991959607a1b604482015290519081900360640190fd5b610100015192915050565b60008385106104b9576040805162461bcd60e51b815260206004820152601d60248201527f636f6d6d6974206d75737420656e64206265666f72652072657665616c000000604482015290519081900360640190fd5b60028054600081815260036020818152604092839020938455600180850180546001600160a01b031916331790558486018b9055918401899055878901600480860191909155878a0160058601558554909201909455815181815260a081019092529192606092908201608080388339505050600183015481519192506001600160a01b031690829060009061054b57fe5b6020908102919091010152815481518290600190811061056757fe5b6020026020010181815250508660001b8160028151811061058457fe5b6020026020010181815250508560001b816003815181106105a157fe5b6020908102919091018101919091526001546040516354309e0d60e01b8152606060048201908152600b60648301526a141bdb1b10dc99585d195960aa1b608483015260a060248301908152855160a484015285516001600160a01b03909416946354309e0d948794849392604482019260c490920191878201910280838360005b8381101561063b578181015183820152602001610623565b50505050905001848103825260008152602001602001945050505050600060405180830381600087803b15801561067157600080fd5b505af1158015610685573d6000803e3d6000fd5b5050925498975050505050505050565b6000838152600360209081526040808320338452600c810190925290912060028201544311610701576040805162461bcd60e51b815260206004820152601360248201527218dbdb5b5a5d081a185cdb89dd08195b991959606a1b604482015290519081900360640190fd5b816003015443111561074d576040805162461bcd60e51b815260206004820152601060248201526f1c995d99585b081a185cc8195b99195960821b604482015290519081900360640190fd5b336000908152600a8301602052604090205460ff166107b3576040805162461bcd60e51b815260206004820152601860248201527f61646472657373206861736e277420636f6d6d69747465640000000000000000604482015290519081900360640190fd5b336000908152600b8301602052604090205460ff1615610811576040805162461bcd60e51b81526020600482015260146024820152731859191c995cdcc81a185cc81c995d99585b195960621b604482015290519081900360640190fd5b6040805160208082018790528183018690528251808303840181526060909201909252805191012081548114610883576040805162461bcd60e51b81526020600482015260126024820152710ecdee8ca40c8decae6dc4ee840dac2e8c6d60731b604482015290519081900360640190fd5b6002820184905560038201859055336000908152600b840160209081526040808320805460ff1916600190811790915585015488845260098701909252909120546108d39163ffffffff610ca716565b6000868152600985016020526040902055600182015460088401546108fd9163ffffffff610ca716565b600884015560068301548514801590610929575060078301546000868152600985016020526040902054115b1561093657600683018590555b505060068101546000908152600982016020526040902054600790910155505050565b600080610964610cc0565b506000848152600360208181526040928390208351610120810185528154815260018201546001600160a01b031692810192909252600281015493820193909352908201546060820181905260048301546080830152600583015460a0830152600683015460c0830152600783015460e0830152600890920154610100820152904310156109f9575060009150819050610a70565b610a01610d15565b5060008581526003602081815260408084206001600160a01b0389168552600c018252928390208351608081018552815481526001820154928101929092526002810154938201939093529101546060820181905260c08301511415610a6957806020015192505b5060019250505b9250929050565b6000838152600360209081526040808320338452600c81019092529091206002820154431115610ae1576040805162461bcd60e51b815260206004820152601060248201526f18dbdb5b5a5d081a185cc8195b99195960821b604482015290519081900360640190fd5b336000908152600a8301602052604090205460ff1615610b3c576040805162461bcd60e51b81526020600482015260116024820152701859191c995cdcc818dbdb5b5a5d1d1959607a1b604482015290519081900360640190fd5b6000805460048085015460058601546040805163353a621160e21b81523394810194909452602484018b90526044840189905260648401929092526084830152516001600160a01b039092169263d4e988449260a4808401936020939083900390910190829087803b158015610bb157600080fd5b505af1158015610bc5573d6000803e3d6000fd5b505050506040513d6020811015610bdb57600080fd5b5051610c24576040805162461bcd60e51b8152602060048201526013602482015272696e73756666696369656e7420746f6b656e7360681b604482015290519081900360640190fd5b60008311610c79576040805162461bcd60e51b815260206004820152601a60248201527f6d75737420636f6d6d697420746f6b656e7320746f206c6f636b000000000000604482015290519081900360640190fd5b60018082019390935592909255336000908152600a9092016020526040909120805460ff1916909117905550565b600082820183811015610cb957600080fd5b9392505050565b6040518061012001604052806000815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b604051806080016040528060008019168152602001600081526020016000815260200160008152509056fea265627a7a723158203783e7ca259e8c0c439ead3c3419d96d49a7a9b3d36da645a43dee7a1302f49364736f6c634300050b0032",
                "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x1 PUSH1 0x2 SSTORE CALLVALUE DUP1 ISZERO PUSH2 0x15 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH2 0xDF1 CODESIZE SUB DUP1 PUSH2 0xDF1 DUP4 CODECOPY DUP2 DUP2 ADD PUSH1 0x40 MSTORE PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x38 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP DUP1 MLOAD PUSH1 0x20 SWAP1 SWAP2 ADD MLOAD PUSH1 0x1 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP3 DUP4 AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT SWAP2 DUP3 AND OR SWAP1 SWAP2 SSTORE PUSH1 0x0 DUP1 SLOAD SWAP3 SWAP1 SWAP4 AND SWAP2 AND OR SWAP1 SSTORE PUSH2 0xD75 DUP1 PUSH2 0x7C PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x88 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x8524CEB3 GT PUSH2 0x5B JUMPI DUP1 PUSH4 0x8524CEB3 EQ PUSH2 0xFE JUMPI DUP1 PUSH4 0xB11D8BB8 EQ PUSH2 0x12D JUMPI DUP1 PUSH4 0xF8A2E510 EQ PUSH2 0x158 JUMPI DUP1 PUSH4 0xFA07153A EQ PUSH2 0x19F JUMPI PUSH2 0x88 JUMP JUMPDEST DUP1 PUSH4 0xDCA7ED8 EQ PUSH2 0x8D JUMPI DUP1 PUSH4 0x1B89EF0F EQ PUSH2 0xBC JUMPI DUP1 PUSH4 0x2B786571 EQ PUSH2 0xD9 JUMPI DUP1 PUSH4 0x3D371D8E EQ PUSH2 0xE1 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xAA PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xA3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x1C8 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0xAA PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xD2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x2A4 JUMP JUMPDEST PUSH2 0xAA PUSH2 0x380 JUMP JUMPDEST PUSH2 0xAA PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xF7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x386 JUMP JUMPDEST PUSH2 0xAA PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x80 DUP2 LT ISZERO PUSH2 0x114 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 DUP2 ADD CALLDATALOAD SWAP1 PUSH1 0x40 DUP2 ADD CALLDATALOAD SWAP1 PUSH1 0x60 ADD CALLDATALOAD PUSH2 0x463 JUMP JUMPDEST PUSH2 0x156 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x60 DUP2 LT ISZERO PUSH2 0x143 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 DUP2 ADD CALLDATALOAD SWAP1 PUSH1 0x40 ADD CALLDATALOAD PUSH2 0x695 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x184 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x16E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x959 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP3 ISZERO ISZERO DUP4 MSTORE PUSH1 0x20 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE DUP1 MLOAD SWAP2 DUP3 SWAP1 SUB ADD SWAP1 RETURN JUMPDEST PUSH2 0x156 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x60 DUP2 LT ISZERO PUSH2 0x1B5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 DUP2 ADD CALLDATALOAD SWAP1 PUSH1 0x40 ADD CALLDATALOAD PUSH2 0xA77 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1D2 PUSH2 0xCC0 JUMP JUMPDEST POP PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 DUP2 DUP2 MSTORE PUSH1 0x40 SWAP3 DUP4 SWAP1 KECCAK256 DUP4 MLOAD PUSH2 0x120 DUP2 ADD DUP6 MSTORE DUP2 SLOAD DUP2 MSTORE PUSH1 0x1 DUP3 ADD SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP3 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x2 DUP2 ADD SLOAD SWAP4 DUP3 ADD SWAP4 SWAP1 SWAP4 MSTORE SWAP1 DUP3 ADD SLOAD PUSH1 0x60 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x4 DUP4 ADD SLOAD PUSH1 0x80 DUP4 ADD MSTORE PUSH1 0x5 DUP4 ADD SLOAD PUSH1 0xA0 DUP4 ADD MSTORE PUSH1 0x6 DUP4 ADD SLOAD PUSH1 0xC0 DUP4 ADD MSTORE PUSH1 0x7 DUP4 ADD SLOAD PUSH1 0xE0 DUP4 ADD MSTORE PUSH1 0x8 SWAP1 SWAP3 ADD SLOAD PUSH2 0x100 DUP3 ADD MSTORE SWAP1 NUMBER GT PUSH2 0x29A JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x11 PUSH1 0x24 DUP3 ADD MSTORE PUSH17 0x1C1BDB1B081A185CDB89DD08195B991959 PUSH1 0x7A SHL PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0xC0 ADD MLOAD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2AE PUSH2 0xCC0 JUMP JUMPDEST POP PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 DUP2 DUP2 MSTORE PUSH1 0x40 SWAP3 DUP4 SWAP1 KECCAK256 DUP4 MLOAD PUSH2 0x120 DUP2 ADD DUP6 MSTORE DUP2 SLOAD DUP2 MSTORE PUSH1 0x1 DUP3 ADD SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP3 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x2 DUP2 ADD SLOAD SWAP4 DUP3 ADD SWAP4 SWAP1 SWAP4 MSTORE SWAP1 DUP3 ADD SLOAD PUSH1 0x60 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x4 DUP4 ADD SLOAD PUSH1 0x80 DUP4 ADD MSTORE PUSH1 0x5 DUP4 ADD SLOAD PUSH1 0xA0 DUP4 ADD MSTORE PUSH1 0x6 DUP4 ADD SLOAD PUSH1 0xC0 DUP4 ADD MSTORE PUSH1 0x7 DUP4 ADD SLOAD PUSH1 0xE0 DUP4 ADD MSTORE PUSH1 0x8 SWAP1 SWAP3 ADD SLOAD PUSH2 0x100 DUP3 ADD MSTORE SWAP1 NUMBER GT PUSH2 0x376 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x11 PUSH1 0x24 DUP3 ADD MSTORE PUSH17 0x1C1BDB1B081A185CDB89DD08195B991959 PUSH1 0x7A SHL PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0xE0 ADD MLOAD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x2 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x390 PUSH2 0xCC0 JUMP JUMPDEST POP PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 DUP2 DUP2 MSTORE PUSH1 0x40 SWAP3 DUP4 SWAP1 KECCAK256 DUP4 MLOAD PUSH2 0x120 DUP2 ADD DUP6 MSTORE DUP2 SLOAD DUP2 MSTORE PUSH1 0x1 DUP3 ADD SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP3 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x2 DUP2 ADD SLOAD SWAP4 DUP3 ADD SWAP4 SWAP1 SWAP4 MSTORE SWAP1 DUP3 ADD SLOAD PUSH1 0x60 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x4 DUP4 ADD SLOAD PUSH1 0x80 DUP4 ADD MSTORE PUSH1 0x5 DUP4 ADD SLOAD PUSH1 0xA0 DUP4 ADD MSTORE PUSH1 0x6 DUP4 ADD SLOAD PUSH1 0xC0 DUP4 ADD MSTORE PUSH1 0x7 DUP4 ADD SLOAD PUSH1 0xE0 DUP4 ADD MSTORE PUSH1 0x8 SWAP1 SWAP3 ADD SLOAD PUSH2 0x100 DUP3 ADD MSTORE SWAP1 NUMBER GT PUSH2 0x458 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x11 PUSH1 0x24 DUP3 ADD MSTORE PUSH17 0x1C1BDB1B081A185CDB89DD08195B991959 PUSH1 0x7A SHL PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH2 0x100 ADD MLOAD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP4 DUP6 LT PUSH2 0x4B9 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x1D PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x636F6D6D6974206D75737420656E64206265666F72652072657665616C000000 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0x2 DUP1 SLOAD PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 DUP2 DUP2 MSTORE PUSH1 0x40 SWAP3 DUP4 SWAP1 KECCAK256 SWAP4 DUP5 SSTORE PUSH1 0x1 DUP1 DUP6 ADD DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND CALLER OR SWAP1 SSTORE DUP5 DUP7 ADD DUP12 SWAP1 SSTORE SWAP2 DUP5 ADD DUP10 SWAP1 SSTORE DUP8 DUP10 ADD PUSH1 0x4 DUP1 DUP7 ADD SWAP2 SWAP1 SWAP2 SSTORE DUP8 DUP11 ADD PUSH1 0x5 DUP7 ADD SSTORE DUP6 SLOAD SWAP1 SWAP3 ADD SWAP1 SWAP5 SSTORE DUP2 MLOAD DUP2 DUP2 MSTORE PUSH1 0xA0 DUP2 ADD SWAP1 SWAP3 MSTORE SWAP2 SWAP3 PUSH1 0x60 SWAP3 SWAP1 DUP3 ADD PUSH1 0x80 DUP1 CODESIZE DUP4 CODECOPY POP POP POP PUSH1 0x1 DUP4 ADD SLOAD DUP2 MLOAD SWAP2 SWAP3 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 DUP3 SWAP1 PUSH1 0x0 SWAP1 PUSH2 0x54B JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE DUP2 SLOAD DUP2 MLOAD DUP3 SWAP1 PUSH1 0x1 SWAP1 DUP2 LT PUSH2 0x567 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP DUP7 PUSH1 0x0 SHL DUP2 PUSH1 0x2 DUP2 MLOAD DUP2 LT PUSH2 0x584 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP DUP6 PUSH1 0x0 SHL DUP2 PUSH1 0x3 DUP2 MLOAD DUP2 LT PUSH2 0x5A1 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x1 SLOAD PUSH1 0x40 MLOAD PUSH4 0x54309E0D PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x60 PUSH1 0x4 DUP3 ADD SWAP1 DUP2 MSTORE PUSH1 0xB PUSH1 0x64 DUP4 ADD MSTORE PUSH11 0x141BDB1B10DC99585D1959 PUSH1 0xAA SHL PUSH1 0x84 DUP4 ADD MSTORE PUSH1 0xA0 PUSH1 0x24 DUP4 ADD SWAP1 DUP2 MSTORE DUP6 MLOAD PUSH1 0xA4 DUP5 ADD MSTORE DUP6 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP5 AND SWAP5 PUSH4 0x54309E0D SWAP5 DUP8 SWAP5 DUP5 SWAP4 SWAP3 PUSH1 0x44 DUP3 ADD SWAP3 PUSH1 0xC4 SWAP1 SWAP3 ADD SWAP2 DUP8 DUP3 ADD SWAP2 MUL DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x63B JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x623 JUMP JUMPDEST POP POP POP POP SWAP1 POP ADD DUP5 DUP2 SUB DUP3 MSTORE PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x20 ADD SWAP5 POP POP POP POP POP PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x671 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x685 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP SWAP3 SLOAD SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP5 MSTORE PUSH1 0xC DUP2 ADD SWAP1 SWAP3 MSTORE SWAP1 SWAP2 KECCAK256 PUSH1 0x2 DUP3 ADD SLOAD NUMBER GT PUSH2 0x701 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x13 PUSH1 0x24 DUP3 ADD MSTORE PUSH19 0x18DBDB5B5A5D081A185CDB89DD08195B991959 PUSH1 0x6A SHL PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST DUP2 PUSH1 0x3 ADD SLOAD NUMBER GT ISZERO PUSH2 0x74D JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x10 PUSH1 0x24 DUP3 ADD MSTORE PUSH16 0x1C995D99585B081A185CC8195B991959 PUSH1 0x82 SHL PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST CALLER PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0xA DUP4 ADD PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND PUSH2 0x7B3 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x18 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x61646472657373206861736E277420636F6D6D69747465640000000000000000 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST CALLER PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0xB DUP4 ADD PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x811 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x14 PUSH1 0x24 DUP3 ADD MSTORE PUSH20 0x1859191C995CDCC81A185CC81C995D99585B1959 PUSH1 0x62 SHL PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP1 DUP3 ADD DUP8 SWAP1 MSTORE DUP2 DUP4 ADD DUP7 SWAP1 MSTORE DUP3 MLOAD DUP1 DUP4 SUB DUP5 ADD DUP2 MSTORE PUSH1 0x60 SWAP1 SWAP3 ADD SWAP1 SWAP3 MSTORE DUP1 MLOAD SWAP2 ADD KECCAK256 DUP2 SLOAD DUP2 EQ PUSH2 0x883 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x12 PUSH1 0x24 DUP3 ADD MSTORE PUSH18 0xECDEE8CA40C8DECAE6DC4EE840DAC2E8C6D PUSH1 0x73 SHL PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0x2 DUP3 ADD DUP5 SWAP1 SSTORE PUSH1 0x3 DUP3 ADD DUP6 SWAP1 SSTORE CALLER PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0xB DUP5 ADD PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0x1 SWAP1 DUP2 OR SWAP1 SWAP2 SSTORE DUP6 ADD SLOAD DUP9 DUP5 MSTORE PUSH1 0x9 DUP8 ADD SWAP1 SWAP3 MSTORE SWAP1 SWAP2 KECCAK256 SLOAD PUSH2 0x8D3 SWAP2 PUSH4 0xFFFFFFFF PUSH2 0xCA7 AND JUMP JUMPDEST PUSH1 0x0 DUP7 DUP2 MSTORE PUSH1 0x9 DUP6 ADD PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SSTORE PUSH1 0x1 DUP3 ADD SLOAD PUSH1 0x8 DUP5 ADD SLOAD PUSH2 0x8FD SWAP2 PUSH4 0xFFFFFFFF PUSH2 0xCA7 AND JUMP JUMPDEST PUSH1 0x8 DUP5 ADD SSTORE PUSH1 0x6 DUP4 ADD SLOAD DUP6 EQ DUP1 ISZERO SWAP1 PUSH2 0x929 JUMPI POP PUSH1 0x7 DUP4 ADD SLOAD PUSH1 0x0 DUP7 DUP2 MSTORE PUSH1 0x9 DUP6 ADD PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD GT JUMPDEST ISZERO PUSH2 0x936 JUMPI PUSH1 0x6 DUP4 ADD DUP6 SWAP1 SSTORE JUMPDEST POP POP PUSH1 0x6 DUP2 ADD SLOAD PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x9 DUP3 ADD PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0x7 SWAP1 SWAP2 ADD SSTORE POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x964 PUSH2 0xCC0 JUMP JUMPDEST POP PUSH1 0x0 DUP5 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 DUP2 DUP2 MSTORE PUSH1 0x40 SWAP3 DUP4 SWAP1 KECCAK256 DUP4 MLOAD PUSH2 0x120 DUP2 ADD DUP6 MSTORE DUP2 SLOAD DUP2 MSTORE PUSH1 0x1 DUP3 ADD SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP3 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x2 DUP2 ADD SLOAD SWAP4 DUP3 ADD SWAP4 SWAP1 SWAP4 MSTORE SWAP1 DUP3 ADD SLOAD PUSH1 0x60 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x4 DUP4 ADD SLOAD PUSH1 0x80 DUP4 ADD MSTORE PUSH1 0x5 DUP4 ADD SLOAD PUSH1 0xA0 DUP4 ADD MSTORE PUSH1 0x6 DUP4 ADD SLOAD PUSH1 0xC0 DUP4 ADD MSTORE PUSH1 0x7 DUP4 ADD SLOAD PUSH1 0xE0 DUP4 ADD MSTORE PUSH1 0x8 SWAP1 SWAP3 ADD SLOAD PUSH2 0x100 DUP3 ADD MSTORE SWAP1 NUMBER LT ISZERO PUSH2 0x9F9 JUMPI POP PUSH1 0x0 SWAP2 POP DUP2 SWAP1 POP PUSH2 0xA70 JUMP JUMPDEST PUSH2 0xA01 PUSH2 0xD15 JUMP JUMPDEST POP PUSH1 0x0 DUP6 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 DUP2 DUP2 MSTORE PUSH1 0x40 DUP1 DUP5 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP10 AND DUP6 MSTORE PUSH1 0xC ADD DUP3 MSTORE SWAP3 DUP4 SWAP1 KECCAK256 DUP4 MLOAD PUSH1 0x80 DUP2 ADD DUP6 MSTORE DUP2 SLOAD DUP2 MSTORE PUSH1 0x1 DUP3 ADD SLOAD SWAP3 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x2 DUP2 ADD SLOAD SWAP4 DUP3 ADD SWAP4 SWAP1 SWAP4 MSTORE SWAP2 ADD SLOAD PUSH1 0x60 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0xC0 DUP4 ADD MLOAD EQ ISZERO PUSH2 0xA69 JUMPI DUP1 PUSH1 0x20 ADD MLOAD SWAP3 POP JUMPDEST POP PUSH1 0x1 SWAP3 POP POP JUMPDEST SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP5 MSTORE PUSH1 0xC DUP2 ADD SWAP1 SWAP3 MSTORE SWAP1 SWAP2 KECCAK256 PUSH1 0x2 DUP3 ADD SLOAD NUMBER GT ISZERO PUSH2 0xAE1 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x10 PUSH1 0x24 DUP3 ADD MSTORE PUSH16 0x18DBDB5B5A5D081A185CC8195B991959 PUSH1 0x82 SHL PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST CALLER PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0xA DUP4 ADD PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0xB3C JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x11 PUSH1 0x24 DUP3 ADD MSTORE PUSH17 0x1859191C995CDCC818DBDB5B5A5D1D1959 PUSH1 0x7A SHL PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH1 0x4 DUP1 DUP6 ADD SLOAD PUSH1 0x5 DUP7 ADD SLOAD PUSH1 0x40 DUP1 MLOAD PUSH4 0x353A6211 PUSH1 0xE2 SHL DUP2 MSTORE CALLER SWAP5 DUP2 ADD SWAP5 SWAP1 SWAP5 MSTORE PUSH1 0x24 DUP5 ADD DUP12 SWAP1 MSTORE PUSH1 0x44 DUP5 ADD DUP10 SWAP1 MSTORE PUSH1 0x64 DUP5 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x84 DUP4 ADD MSTORE MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP3 AND SWAP3 PUSH4 0xD4E98844 SWAP3 PUSH1 0xA4 DUP1 DUP5 ADD SWAP4 PUSH1 0x20 SWAP4 SWAP1 DUP4 SWAP1 SUB SWAP1 SWAP2 ADD SWAP1 DUP3 SWAP1 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xBB1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0xBC5 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xBDB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD PUSH2 0xC24 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x13 PUSH1 0x24 DUP3 ADD MSTORE PUSH19 0x696E73756666696369656E7420746F6B656E73 PUSH1 0x68 SHL PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP4 GT PUSH2 0xC79 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x1A PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x6D75737420636F6D6D697420746F6B656E7320746F206C6F636B000000000000 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0x1 DUP1 DUP3 ADD SWAP4 SWAP1 SWAP4 SSTORE SWAP3 SWAP1 SWAP3 SSTORE CALLER PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0xA SWAP1 SWAP3 ADD PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 SWAP2 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND SWAP1 SWAP2 OR SWAP1 SSTORE POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD DUP4 DUP2 LT ISZERO PUSH2 0xCB9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH2 0x120 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP1 NOT AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE POP SWAP1 JUMP INVALID LOG2 PUSH6 0x627A7A723158 KECCAK256 CALLDATACOPY DUP4 0xe7 0xca 0x25 SWAP15 DUP13 0xc NUMBER SWAP15 0xad EXTCODECOPY CALLVALUE NOT 0xd9 PUSH14 0x49A7A9B3D36DA645A43DEE7A1302 DELEGATECALL SWAP4 PUSH5 0x736F6C6343 STOP SDIV SIGNEXTEND STOP ORIGIN ",
                "sourceMap": "398:8102:13:-;;;551:1;526:26;;1494:179;8:9:-1;5:2;;;30:1;27;20:12;5:2;1494:179:13;;;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1494:179:13;;;;;;;1581:7;:39;;-1:-1:-1;;;;;1581:39:13;;;-1:-1:-1;;;;;;1581:39:13;;;;;;;:7;1630:36;;;;;;;;;;;398:8102;;;;;;"
            },
            "deployedBytecode": {
                "linkReferences": {},
                "object": "0x608060405234801561001057600080fd5b50600436106100885760003560e01c80638524ceb31161005b5780638524ceb3146100fe578063b11d8bb81461012d578063f8a2e51014610158578063fa07153a1461019f57610088565b80630dca7ed81461008d5780631b89ef0f146100bc5780632b786571146100d95780633d371d8e146100e1575b600080fd5b6100aa600480360360208110156100a357600080fd5b50356101c8565b60408051918252519081900360200190f35b6100aa600480360360208110156100d257600080fd5b50356102a4565b6100aa610380565b6100aa600480360360208110156100f757600080fd5b5035610386565b6100aa6004803603608081101561011457600080fd5b5080359060208101359060408101359060600135610463565b6101566004803603606081101561014357600080fd5b5080359060208101359060400135610695565b005b6101846004803603604081101561016e57600080fd5b50803590602001356001600160a01b0316610959565b60408051921515835260208301919091528051918290030190f35b610156600480360360608110156101b557600080fd5b5080359060208101359060400135610a77565b60006101d2610cc0565b506000828152600360208181526040928390208351610120810185528154815260018201546001600160a01b031692810192909252600281015493820193909352908201546060820181905260048301546080830152600583015460a0830152600683015460c0830152600783015460e083015260089092015461010082015290431161029a576040805162461bcd60e51b81526020600482015260116024820152701c1bdb1b081a185cdb89dd08195b991959607a1b604482015290519081900360640190fd5b60c0015192915050565b60006102ae610cc0565b506000828152600360208181526040928390208351610120810185528154815260018201546001600160a01b031692810192909252600281015493820193909352908201546060820181905260048301546080830152600583015460a0830152600683015460c0830152600783015460e0830152600890920154610100820152904311610376576040805162461bcd60e51b81526020600482015260116024820152701c1bdb1b081a185cdb89dd08195b991959607a1b604482015290519081900360640190fd5b60e0015192915050565b60025481565b6000610390610cc0565b506000828152600360208181526040928390208351610120810185528154815260018201546001600160a01b031692810192909252600281015493820193909352908201546060820181905260048301546080830152600583015460a0830152600683015460c0830152600783015460e0830152600890920154610100820152904311610458576040805162461bcd60e51b81526020600482015260116024820152701c1bdb1b081a185cdb89dd08195b991959607a1b604482015290519081900360640190fd5b610100015192915050565b60008385106104b9576040805162461bcd60e51b815260206004820152601d60248201527f636f6d6d6974206d75737420656e64206265666f72652072657665616c000000604482015290519081900360640190fd5b60028054600081815260036020818152604092839020938455600180850180546001600160a01b031916331790558486018b9055918401899055878901600480860191909155878a0160058601558554909201909455815181815260a081019092529192606092908201608080388339505050600183015481519192506001600160a01b031690829060009061054b57fe5b6020908102919091010152815481518290600190811061056757fe5b6020026020010181815250508660001b8160028151811061058457fe5b6020026020010181815250508560001b816003815181106105a157fe5b6020908102919091018101919091526001546040516354309e0d60e01b8152606060048201908152600b60648301526a141bdb1b10dc99585d195960aa1b608483015260a060248301908152855160a484015285516001600160a01b03909416946354309e0d948794849392604482019260c490920191878201910280838360005b8381101561063b578181015183820152602001610623565b50505050905001848103825260008152602001602001945050505050600060405180830381600087803b15801561067157600080fd5b505af1158015610685573d6000803e3d6000fd5b5050925498975050505050505050565b6000838152600360209081526040808320338452600c810190925290912060028201544311610701576040805162461bcd60e51b815260206004820152601360248201527218dbdb5b5a5d081a185cdb89dd08195b991959606a1b604482015290519081900360640190fd5b816003015443111561074d576040805162461bcd60e51b815260206004820152601060248201526f1c995d99585b081a185cc8195b99195960821b604482015290519081900360640190fd5b336000908152600a8301602052604090205460ff166107b3576040805162461bcd60e51b815260206004820152601860248201527f61646472657373206861736e277420636f6d6d69747465640000000000000000604482015290519081900360640190fd5b336000908152600b8301602052604090205460ff1615610811576040805162461bcd60e51b81526020600482015260146024820152731859191c995cdcc81a185cc81c995d99585b195960621b604482015290519081900360640190fd5b6040805160208082018790528183018690528251808303840181526060909201909252805191012081548114610883576040805162461bcd60e51b81526020600482015260126024820152710ecdee8ca40c8decae6dc4ee840dac2e8c6d60731b604482015290519081900360640190fd5b6002820184905560038201859055336000908152600b840160209081526040808320805460ff1916600190811790915585015488845260098701909252909120546108d39163ffffffff610ca716565b6000868152600985016020526040902055600182015460088401546108fd9163ffffffff610ca716565b600884015560068301548514801590610929575060078301546000868152600985016020526040902054115b1561093657600683018590555b505060068101546000908152600982016020526040902054600790910155505050565b600080610964610cc0565b506000848152600360208181526040928390208351610120810185528154815260018201546001600160a01b031692810192909252600281015493820193909352908201546060820181905260048301546080830152600583015460a0830152600683015460c0830152600783015460e0830152600890920154610100820152904310156109f9575060009150819050610a70565b610a01610d15565b5060008581526003602081815260408084206001600160a01b0389168552600c018252928390208351608081018552815481526001820154928101929092526002810154938201939093529101546060820181905260c08301511415610a6957806020015192505b5060019250505b9250929050565b6000838152600360209081526040808320338452600c81019092529091206002820154431115610ae1576040805162461bcd60e51b815260206004820152601060248201526f18dbdb5b5a5d081a185cc8195b99195960821b604482015290519081900360640190fd5b336000908152600a8301602052604090205460ff1615610b3c576040805162461bcd60e51b81526020600482015260116024820152701859191c995cdcc818dbdb5b5a5d1d1959607a1b604482015290519081900360640190fd5b6000805460048085015460058601546040805163353a621160e21b81523394810194909452602484018b90526044840189905260648401929092526084830152516001600160a01b039092169263d4e988449260a4808401936020939083900390910190829087803b158015610bb157600080fd5b505af1158015610bc5573d6000803e3d6000fd5b505050506040513d6020811015610bdb57600080fd5b5051610c24576040805162461bcd60e51b8152602060048201526013602482015272696e73756666696369656e7420746f6b656e7360681b604482015290519081900360640190fd5b60008311610c79576040805162461bcd60e51b815260206004820152601a60248201527f6d75737420636f6d6d697420746f6b656e7320746f206c6f636b000000000000604482015290519081900360640190fd5b60018082019390935592909255336000908152600a9092016020526040909120805460ff1916909117905550565b600082820183811015610cb957600080fd5b9392505050565b6040518061012001604052806000815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b604051806080016040528060008019168152602001600081526020016000815260200160008152509056fea265627a7a723158203783e7ca259e8c0c439ead3c3419d96d49a7a9b3d36da645a43dee7a1302f49364736f6c634300050b0032",
                "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x88 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x8524CEB3 GT PUSH2 0x5B JUMPI DUP1 PUSH4 0x8524CEB3 EQ PUSH2 0xFE JUMPI DUP1 PUSH4 0xB11D8BB8 EQ PUSH2 0x12D JUMPI DUP1 PUSH4 0xF8A2E510 EQ PUSH2 0x158 JUMPI DUP1 PUSH4 0xFA07153A EQ PUSH2 0x19F JUMPI PUSH2 0x88 JUMP JUMPDEST DUP1 PUSH4 0xDCA7ED8 EQ PUSH2 0x8D JUMPI DUP1 PUSH4 0x1B89EF0F EQ PUSH2 0xBC JUMPI DUP1 PUSH4 0x2B786571 EQ PUSH2 0xD9 JUMPI DUP1 PUSH4 0x3D371D8E EQ PUSH2 0xE1 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xAA PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xA3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x1C8 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0xAA PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xD2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x2A4 JUMP JUMPDEST PUSH2 0xAA PUSH2 0x380 JUMP JUMPDEST PUSH2 0xAA PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xF7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x386 JUMP JUMPDEST PUSH2 0xAA PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x80 DUP2 LT ISZERO PUSH2 0x114 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 DUP2 ADD CALLDATALOAD SWAP1 PUSH1 0x40 DUP2 ADD CALLDATALOAD SWAP1 PUSH1 0x60 ADD CALLDATALOAD PUSH2 0x463 JUMP JUMPDEST PUSH2 0x156 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x60 DUP2 LT ISZERO PUSH2 0x143 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 DUP2 ADD CALLDATALOAD SWAP1 PUSH1 0x40 ADD CALLDATALOAD PUSH2 0x695 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x184 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x16E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x959 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP3 ISZERO ISZERO DUP4 MSTORE PUSH1 0x20 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE DUP1 MLOAD SWAP2 DUP3 SWAP1 SUB ADD SWAP1 RETURN JUMPDEST PUSH2 0x156 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x60 DUP2 LT ISZERO PUSH2 0x1B5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 DUP2 ADD CALLDATALOAD SWAP1 PUSH1 0x40 ADD CALLDATALOAD PUSH2 0xA77 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1D2 PUSH2 0xCC0 JUMP JUMPDEST POP PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 DUP2 DUP2 MSTORE PUSH1 0x40 SWAP3 DUP4 SWAP1 KECCAK256 DUP4 MLOAD PUSH2 0x120 DUP2 ADD DUP6 MSTORE DUP2 SLOAD DUP2 MSTORE PUSH1 0x1 DUP3 ADD SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP3 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x2 DUP2 ADD SLOAD SWAP4 DUP3 ADD SWAP4 SWAP1 SWAP4 MSTORE SWAP1 DUP3 ADD SLOAD PUSH1 0x60 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x4 DUP4 ADD SLOAD PUSH1 0x80 DUP4 ADD MSTORE PUSH1 0x5 DUP4 ADD SLOAD PUSH1 0xA0 DUP4 ADD MSTORE PUSH1 0x6 DUP4 ADD SLOAD PUSH1 0xC0 DUP4 ADD MSTORE PUSH1 0x7 DUP4 ADD SLOAD PUSH1 0xE0 DUP4 ADD MSTORE PUSH1 0x8 SWAP1 SWAP3 ADD SLOAD PUSH2 0x100 DUP3 ADD MSTORE SWAP1 NUMBER GT PUSH2 0x29A JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x11 PUSH1 0x24 DUP3 ADD MSTORE PUSH17 0x1C1BDB1B081A185CDB89DD08195B991959 PUSH1 0x7A SHL PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0xC0 ADD MLOAD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2AE PUSH2 0xCC0 JUMP JUMPDEST POP PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 DUP2 DUP2 MSTORE PUSH1 0x40 SWAP3 DUP4 SWAP1 KECCAK256 DUP4 MLOAD PUSH2 0x120 DUP2 ADD DUP6 MSTORE DUP2 SLOAD DUP2 MSTORE PUSH1 0x1 DUP3 ADD SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP3 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x2 DUP2 ADD SLOAD SWAP4 DUP3 ADD SWAP4 SWAP1 SWAP4 MSTORE SWAP1 DUP3 ADD SLOAD PUSH1 0x60 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x4 DUP4 ADD SLOAD PUSH1 0x80 DUP4 ADD MSTORE PUSH1 0x5 DUP4 ADD SLOAD PUSH1 0xA0 DUP4 ADD MSTORE PUSH1 0x6 DUP4 ADD SLOAD PUSH1 0xC0 DUP4 ADD MSTORE PUSH1 0x7 DUP4 ADD SLOAD PUSH1 0xE0 DUP4 ADD MSTORE PUSH1 0x8 SWAP1 SWAP3 ADD SLOAD PUSH2 0x100 DUP3 ADD MSTORE SWAP1 NUMBER GT PUSH2 0x376 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x11 PUSH1 0x24 DUP3 ADD MSTORE PUSH17 0x1C1BDB1B081A185CDB89DD08195B991959 PUSH1 0x7A SHL PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0xE0 ADD MLOAD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x2 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x390 PUSH2 0xCC0 JUMP JUMPDEST POP PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 DUP2 DUP2 MSTORE PUSH1 0x40 SWAP3 DUP4 SWAP1 KECCAK256 DUP4 MLOAD PUSH2 0x120 DUP2 ADD DUP6 MSTORE DUP2 SLOAD DUP2 MSTORE PUSH1 0x1 DUP3 ADD SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP3 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x2 DUP2 ADD SLOAD SWAP4 DUP3 ADD SWAP4 SWAP1 SWAP4 MSTORE SWAP1 DUP3 ADD SLOAD PUSH1 0x60 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x4 DUP4 ADD SLOAD PUSH1 0x80 DUP4 ADD MSTORE PUSH1 0x5 DUP4 ADD SLOAD PUSH1 0xA0 DUP4 ADD MSTORE PUSH1 0x6 DUP4 ADD SLOAD PUSH1 0xC0 DUP4 ADD MSTORE PUSH1 0x7 DUP4 ADD SLOAD PUSH1 0xE0 DUP4 ADD MSTORE PUSH1 0x8 SWAP1 SWAP3 ADD SLOAD PUSH2 0x100 DUP3 ADD MSTORE SWAP1 NUMBER GT PUSH2 0x458 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x11 PUSH1 0x24 DUP3 ADD MSTORE PUSH17 0x1C1BDB1B081A185CDB89DD08195B991959 PUSH1 0x7A SHL PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH2 0x100 ADD MLOAD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP4 DUP6 LT PUSH2 0x4B9 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x1D PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x636F6D6D6974206D75737420656E64206265666F72652072657665616C000000 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0x2 DUP1 SLOAD PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 DUP2 DUP2 MSTORE PUSH1 0x40 SWAP3 DUP4 SWAP1 KECCAK256 SWAP4 DUP5 SSTORE PUSH1 0x1 DUP1 DUP6 ADD DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND CALLER OR SWAP1 SSTORE DUP5 DUP7 ADD DUP12 SWAP1 SSTORE SWAP2 DUP5 ADD DUP10 SWAP1 SSTORE DUP8 DUP10 ADD PUSH1 0x4 DUP1 DUP7 ADD SWAP2 SWAP1 SWAP2 SSTORE DUP8 DUP11 ADD PUSH1 0x5 DUP7 ADD SSTORE DUP6 SLOAD SWAP1 SWAP3 ADD SWAP1 SWAP5 SSTORE DUP2 MLOAD DUP2 DUP2 MSTORE PUSH1 0xA0 DUP2 ADD SWAP1 SWAP3 MSTORE SWAP2 SWAP3 PUSH1 0x60 SWAP3 SWAP1 DUP3 ADD PUSH1 0x80 DUP1 CODESIZE DUP4 CODECOPY POP POP POP PUSH1 0x1 DUP4 ADD SLOAD DUP2 MLOAD SWAP2 SWAP3 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 DUP3 SWAP1 PUSH1 0x0 SWAP1 PUSH2 0x54B JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE DUP2 SLOAD DUP2 MLOAD DUP3 SWAP1 PUSH1 0x1 SWAP1 DUP2 LT PUSH2 0x567 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP DUP7 PUSH1 0x0 SHL DUP2 PUSH1 0x2 DUP2 MLOAD DUP2 LT PUSH2 0x584 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP DUP6 PUSH1 0x0 SHL DUP2 PUSH1 0x3 DUP2 MLOAD DUP2 LT PUSH2 0x5A1 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x1 SLOAD PUSH1 0x40 MLOAD PUSH4 0x54309E0D PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x60 PUSH1 0x4 DUP3 ADD SWAP1 DUP2 MSTORE PUSH1 0xB PUSH1 0x64 DUP4 ADD MSTORE PUSH11 0x141BDB1B10DC99585D1959 PUSH1 0xAA SHL PUSH1 0x84 DUP4 ADD MSTORE PUSH1 0xA0 PUSH1 0x24 DUP4 ADD SWAP1 DUP2 MSTORE DUP6 MLOAD PUSH1 0xA4 DUP5 ADD MSTORE DUP6 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP5 AND SWAP5 PUSH4 0x54309E0D SWAP5 DUP8 SWAP5 DUP5 SWAP4 SWAP3 PUSH1 0x44 DUP3 ADD SWAP3 PUSH1 0xC4 SWAP1 SWAP3 ADD SWAP2 DUP8 DUP3 ADD SWAP2 MUL DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x63B JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x623 JUMP JUMPDEST POP POP POP POP SWAP1 POP ADD DUP5 DUP2 SUB DUP3 MSTORE PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x20 ADD SWAP5 POP POP POP POP POP PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x671 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x685 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP SWAP3 SLOAD SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP5 MSTORE PUSH1 0xC DUP2 ADD SWAP1 SWAP3 MSTORE SWAP1 SWAP2 KECCAK256 PUSH1 0x2 DUP3 ADD SLOAD NUMBER GT PUSH2 0x701 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x13 PUSH1 0x24 DUP3 ADD MSTORE PUSH19 0x18DBDB5B5A5D081A185CDB89DD08195B991959 PUSH1 0x6A SHL PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST DUP2 PUSH1 0x3 ADD SLOAD NUMBER GT ISZERO PUSH2 0x74D JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x10 PUSH1 0x24 DUP3 ADD MSTORE PUSH16 0x1C995D99585B081A185CC8195B991959 PUSH1 0x82 SHL PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST CALLER PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0xA DUP4 ADD PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND PUSH2 0x7B3 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x18 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x61646472657373206861736E277420636F6D6D69747465640000000000000000 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST CALLER PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0xB DUP4 ADD PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x811 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x14 PUSH1 0x24 DUP3 ADD MSTORE PUSH20 0x1859191C995CDCC81A185CC81C995D99585B1959 PUSH1 0x62 SHL PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP1 DUP3 ADD DUP8 SWAP1 MSTORE DUP2 DUP4 ADD DUP7 SWAP1 MSTORE DUP3 MLOAD DUP1 DUP4 SUB DUP5 ADD DUP2 MSTORE PUSH1 0x60 SWAP1 SWAP3 ADD SWAP1 SWAP3 MSTORE DUP1 MLOAD SWAP2 ADD KECCAK256 DUP2 SLOAD DUP2 EQ PUSH2 0x883 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x12 PUSH1 0x24 DUP3 ADD MSTORE PUSH18 0xECDEE8CA40C8DECAE6DC4EE840DAC2E8C6D PUSH1 0x73 SHL PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0x2 DUP3 ADD DUP5 SWAP1 SSTORE PUSH1 0x3 DUP3 ADD DUP6 SWAP1 SSTORE CALLER PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0xB DUP5 ADD PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0x1 SWAP1 DUP2 OR SWAP1 SWAP2 SSTORE DUP6 ADD SLOAD DUP9 DUP5 MSTORE PUSH1 0x9 DUP8 ADD SWAP1 SWAP3 MSTORE SWAP1 SWAP2 KECCAK256 SLOAD PUSH2 0x8D3 SWAP2 PUSH4 0xFFFFFFFF PUSH2 0xCA7 AND JUMP JUMPDEST PUSH1 0x0 DUP7 DUP2 MSTORE PUSH1 0x9 DUP6 ADD PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SSTORE PUSH1 0x1 DUP3 ADD SLOAD PUSH1 0x8 DUP5 ADD SLOAD PUSH2 0x8FD SWAP2 PUSH4 0xFFFFFFFF PUSH2 0xCA7 AND JUMP JUMPDEST PUSH1 0x8 DUP5 ADD SSTORE PUSH1 0x6 DUP4 ADD SLOAD DUP6 EQ DUP1 ISZERO SWAP1 PUSH2 0x929 JUMPI POP PUSH1 0x7 DUP4 ADD SLOAD PUSH1 0x0 DUP7 DUP2 MSTORE PUSH1 0x9 DUP6 ADD PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD GT JUMPDEST ISZERO PUSH2 0x936 JUMPI PUSH1 0x6 DUP4 ADD DUP6 SWAP1 SSTORE JUMPDEST POP POP PUSH1 0x6 DUP2 ADD SLOAD PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x9 DUP3 ADD PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0x7 SWAP1 SWAP2 ADD SSTORE POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x964 PUSH2 0xCC0 JUMP JUMPDEST POP PUSH1 0x0 DUP5 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 DUP2 DUP2 MSTORE PUSH1 0x40 SWAP3 DUP4 SWAP1 KECCAK256 DUP4 MLOAD PUSH2 0x120 DUP2 ADD DUP6 MSTORE DUP2 SLOAD DUP2 MSTORE PUSH1 0x1 DUP3 ADD SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP3 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x2 DUP2 ADD SLOAD SWAP4 DUP3 ADD SWAP4 SWAP1 SWAP4 MSTORE SWAP1 DUP3 ADD SLOAD PUSH1 0x60 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x4 DUP4 ADD SLOAD PUSH1 0x80 DUP4 ADD MSTORE PUSH1 0x5 DUP4 ADD SLOAD PUSH1 0xA0 DUP4 ADD MSTORE PUSH1 0x6 DUP4 ADD SLOAD PUSH1 0xC0 DUP4 ADD MSTORE PUSH1 0x7 DUP4 ADD SLOAD PUSH1 0xE0 DUP4 ADD MSTORE PUSH1 0x8 SWAP1 SWAP3 ADD SLOAD PUSH2 0x100 DUP3 ADD MSTORE SWAP1 NUMBER LT ISZERO PUSH2 0x9F9 JUMPI POP PUSH1 0x0 SWAP2 POP DUP2 SWAP1 POP PUSH2 0xA70 JUMP JUMPDEST PUSH2 0xA01 PUSH2 0xD15 JUMP JUMPDEST POP PUSH1 0x0 DUP6 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 DUP2 DUP2 MSTORE PUSH1 0x40 DUP1 DUP5 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP10 AND DUP6 MSTORE PUSH1 0xC ADD DUP3 MSTORE SWAP3 DUP4 SWAP1 KECCAK256 DUP4 MLOAD PUSH1 0x80 DUP2 ADD DUP6 MSTORE DUP2 SLOAD DUP2 MSTORE PUSH1 0x1 DUP3 ADD SLOAD SWAP3 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x2 DUP2 ADD SLOAD SWAP4 DUP3 ADD SWAP4 SWAP1 SWAP4 MSTORE SWAP2 ADD SLOAD PUSH1 0x60 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0xC0 DUP4 ADD MLOAD EQ ISZERO PUSH2 0xA69 JUMPI DUP1 PUSH1 0x20 ADD MLOAD SWAP3 POP JUMPDEST POP PUSH1 0x1 SWAP3 POP POP JUMPDEST SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP5 MSTORE PUSH1 0xC DUP2 ADD SWAP1 SWAP3 MSTORE SWAP1 SWAP2 KECCAK256 PUSH1 0x2 DUP3 ADD SLOAD NUMBER GT ISZERO PUSH2 0xAE1 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x10 PUSH1 0x24 DUP3 ADD MSTORE PUSH16 0x18DBDB5B5A5D081A185CC8195B991959 PUSH1 0x82 SHL PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST CALLER PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0xA DUP4 ADD PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0xB3C JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x11 PUSH1 0x24 DUP3 ADD MSTORE PUSH17 0x1859191C995CDCC818DBDB5B5A5D1D1959 PUSH1 0x7A SHL PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH1 0x4 DUP1 DUP6 ADD SLOAD PUSH1 0x5 DUP7 ADD SLOAD PUSH1 0x40 DUP1 MLOAD PUSH4 0x353A6211 PUSH1 0xE2 SHL DUP2 MSTORE CALLER SWAP5 DUP2 ADD SWAP5 SWAP1 SWAP5 MSTORE PUSH1 0x24 DUP5 ADD DUP12 SWAP1 MSTORE PUSH1 0x44 DUP5 ADD DUP10 SWAP1 MSTORE PUSH1 0x64 DUP5 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x84 DUP4 ADD MSTORE MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP3 AND SWAP3 PUSH4 0xD4E98844 SWAP3 PUSH1 0xA4 DUP1 DUP5 ADD SWAP4 PUSH1 0x20 SWAP4 SWAP1 DUP4 SWAP1 SUB SWAP1 SWAP2 ADD SWAP1 DUP3 SWAP1 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xBB1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0xBC5 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xBDB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD PUSH2 0xC24 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x13 PUSH1 0x24 DUP3 ADD MSTORE PUSH19 0x696E73756666696369656E7420746F6B656E73 PUSH1 0x68 SHL PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP4 GT PUSH2 0xC79 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x1A PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x6D75737420636F6D6D697420746F6B656E7320746F206C6F636B000000000000 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0x1 DUP1 DUP3 ADD SWAP4 SWAP1 SWAP4 SSTORE SWAP3 SWAP1 SWAP3 SSTORE CALLER PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0xA SWAP1 SWAP3 ADD PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 SWAP2 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND SWAP1 SWAP2 OR SWAP1 SSTORE POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD DUP4 DUP2 LT ISZERO PUSH2 0xCB9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH2 0x120 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP1 NOT AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE POP SWAP1 JUMP INVALID LOG2 PUSH6 0x627A7A723158 KECCAK256 CALLDATACOPY DUP4 0xe7 0xca 0x25 SWAP15 DUP13 0xc NUMBER SWAP15 0xad EXTCODECOPY CALLVALUE NOT 0xd9 PUSH14 0x49A7A9B3D36DA645A43DEE7A1302 DELEGATECALL SWAP4 PUSH5 0x736F6C6343 STOP SDIV SIGNEXTEND STOP ORIGIN ",
                "sourceMap": "398:8102:13:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;398:8102:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6699:221;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;6699:221:13;;:::i;:::-;;;;;;;;;;;;;;;;7173:219;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7173:219:13;;:::i;526:26::-;;;:::i;7620:226::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7620:226:13;;:::i;2393:994::-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;2393:994:13;;;;;;;;;;;;;;;;;:::i;5116:1408::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5116:1408:13;;;;;;;;;;;;:::i;:::-;;8071:427;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;8071:427:13;;;;;;-1:-1:-1;;;;;8071:427:13;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;3819:870;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3819:870:13;;;;;;;;;;;;:::i;6699:221::-;6757:4;6773:13;;:::i;:::-;-1:-1:-1;6789:14:13;;;;:5;:14;;;;;;;;;6773:30;;;;;;;;;;;;;;;-1:-1:-1;;;;;6773:30:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6840:12;-1:-1:-1;6813:61:13;;;;;-1:-1:-1;;;6813:61:13;;;;;;;;;;;;-1:-1:-1;;;6813:61:13;;;;;;;;;;;;;;;6891:22;;;;6699:221;-1:-1:-1;;6699:221:13:o;7173:219::-;7236:4;7252:13;;:::i;:::-;-1:-1:-1;7268:14:13;;;;:5;:14;;;;;;;;;7252:30;;;;;;;;;;;;;;;-1:-1:-1;;;;;7252:30:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7319:12;-1:-1:-1;7292:61:13;;;;;-1:-1:-1;;;7292:61:13;;;;;;;;;;;;-1:-1:-1;;;7292:61:13;;;;;;;;;;;;;;;7370:15;;;;7173:219;-1:-1:-1;;7173:219:13:o;526:26::-;;;;:::o;7620:226::-;7684:4;7700:13;;:::i;:::-;-1:-1:-1;7716:14:13;;;;:5;:14;;;;;;;;;7700:30;;;;;;;;;;;;;;;-1:-1:-1;;;;;7700:30:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7767:12;-1:-1:-1;7740:61:13;;;;;-1:-1:-1;;;7740:61:13;;;;;;;;;;;;-1:-1:-1;;;7740:61:13;;;;;;;;;;;;;;;7818:21;;;;7620:226;-1:-1:-1;;7620:226:13:o;2393:994::-;2508:4;2585:15;2567;:33;2559:75;;;;;-1:-1:-1;;;2559:75:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;2693:10;;;2670:14;2687:17;;;:5;:17;;;;;;;;;2714;;;2741:9;;;;:22;;-1:-1:-1;;;;;;2741:22:13;2753:10;2741:22;;;2773:16;;;:34;;;2817:16;;;:34;;;2879:29;;;2861:15;;;;:47;;;;2935:28;;;2918:14;;;:45;3010:12;;;;;;;;3095:16;;;;;;;;;;;2687:17;;3071:21;;2861:15;3095:16;;17:15:-1;;105:10;3095:16:13;88:34:-1;-1:-1;;;3144:9:13;;;;3121:7;;;;-1:-1:-1;;;;;;3144:9:13;;3121:7;;3144:9;;3121:7;;;;;;;;;;;;;:34;3183:4;;3165:7;;:4;;3170:1;;3165:7;;;;;;;;;;;:23;;;;;3216:15;3208:24;;3198:4;3203:1;3198:7;;;;;;;;;;;;;:34;;;;;3260:15;3252:24;;3242:4;3247:1;3242:7;;;;;;;;;;;;;;;;;;:34;;;;3286:7;;:42;;-1:-1:-1;;;3286:42:13;;;;;;;;;;;;;;-1:-1:-1;;;3286:42:13;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3286:7:13;;;;:17;;3319:4;;3286:42;;;;;;;;;;;;;;;;;;;;:7;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;3286:42:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3286:42:13;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;3376:4:13;;;2393:994;-1:-1:-1;;;;;;;;2393:994:13:o;5116:1408::-;5201:14;5218;;;:5;:14;;;;;;;;5267:10;5259:19;;:7;;;:19;;;;;;5459:16;;;;5444:12;:31;5436:63;;;;;-1:-1:-1;;;5436:63:13;;;;;;;;;;;;-1:-1:-1;;;5436:63:13;;;;;;;;;;;;;;;5533:1;:16;;;5517:12;:32;;5509:61;;;;;-1:-1:-1;;;5509:61:13;;;;;;;;;;;;-1:-1:-1;;;5509:61:13;;;;;;;;;;;;;;;5600:10;5588:23;;;;:11;;;:23;;;;;;;;5580:60;;;;;-1:-1:-1;;;5580:60:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;5671:10;5659:23;;;;:11;;;:23;;;;;;;;5658:24;5650:57;;;;;-1:-1:-1;;;5650:57:13;;;;;;;;;;;;-1:-1:-1;;;5650:57:13;;;;;;;;;;;;;;;5801:40;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;6:49;;5801:40:13;;;;;;;5791:51;;;;;5860:12;;:27;;5852:58;;;;;-1:-1:-1;;;5852:58:13;;;;;;;;;;;;-1:-1:-1;;;5852:58:13;;;;;;;;;;;;;;;5996:6;;;:18;;;6024:12;;;:26;;;6072:10;-1:-1:-1;6060:23:13;;;:11;;;:23;;;;;;;;:30;;-1:-1:-1;;6060:30:13;6086:4;6060:30;;;;;;6158:17;;;6128:25;;;:12;;;:25;;;;;;;:48;;;:29;:48;:::i;:::-;6100:25;;;;:12;;;:25;;;;;:76;6236:17;;;;6210:21;;;;:44;;;:25;:44;:::i;:::-;6186:21;;;:68;6306:22;;;;:37;;;;;:84;;-1:-1:-1;6375:15:13;;;;6347:25;;;;:12;;;:25;;;;;;:43;6306:84;6303:150;;;6406:22;;;:36;;;6303:150;-1:-1:-1;;6494:22:13;;;;6481:36;;;;:12;;;:36;;;;;;6463:15;;;;:54;-1:-1:-1;;;5116:1408:13:o;8071:427::-;8148:10;8160:11;8183:13;;:::i;:::-;-1:-1:-1;8199:14:13;;;;:5;:14;;;;;;;;;8183:30;;;;;;;;;;;;;;;-1:-1:-1;;;;;8183:30:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8246:12;-1:-1:-1;8224:78:13;;;-1:-1:-1;8282:5:13;;-1:-1:-1;8282:5:13;;-1:-1:-1;8274:17:13;;8224:78;8312:13;;:::i;:::-;-1:-1:-1;8328:14:13;;;;:5;:14;;;;;;;;-1:-1:-1;;;;;8328:27:13;;;;:20;;:27;;;;;;8312:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8369:22;;;;:38;8366:94;;;8432:1;:17;;;8423:26;;8366:94;-1:-1:-1;8478:4:13;;-1:-1:-1;;8071:427:13;;;;;;:::o;3819:870::-;3936:14;3953;;;:5;:14;;;;;;;;4002:10;3994:19;;:7;;;:19;;;;;;4160:16;;;;4144:12;:32;;4136:61;;;;;-1:-1:-1;;;4136:61:13;;;;;;;;;;;;-1:-1:-1;;;4136:61:13;;;;;;;;;;;;;;;4228:10;4216:23;;;;:11;;;:23;;;;;;;;4215:24;4207:54;;;;;-1:-1:-1;;;4207:54:13;;;;;;;;;;;;-1:-1:-1;;;4207:54:13;;;;;;;;;;;;;;;4279:8;;;4339:15;;;;;4356:14;;;;4279:92;;;-1:-1:-1;;;4279:92:13;;4301:10;4279:92;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;4279:8:13;;;;:21;;:92;;;;;;;;;;;;;;;;;:8;:92;;;5:2:-1;;;;30:1;27;20:12;5:2;4279:92:13;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4279:92:13;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4279:92:13;4271:124;;;;;-1:-1:-1;;;4271:124:13;;;;;;;;;;;;-1:-1:-1;;;4271:124:13;;;;;;;;;;;;;;;4431:1;4413:15;:19;4405:58;;;;;-1:-1:-1;;;4405:58:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;4526:17;;;;:35;;;;4571:20;;;;4664:10;4571:12;4652:23;;;:11;;;;:23;;;;;;:30;;-1:-1:-1;;4652:30:13;;;;;;-1:-1:-1;3819:870:13:o;1431:145:0:-;1489:7;1520:5;;;1543:6;;;;1535:15;;;;;;1568:1;1431:145;-1:-1:-1;;;1431:145:0:o;398:8102:13:-;;;;;;;;;;;;;;;-1:-1:-1;;;;;398:8102:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o"
            }
        }
    },
    "sources": {
        "voting/Voting.sol": {
            "id": 13
        },
        "treasury/Treasury.sol": {
            "id": 10
        },
        "base/Authorizable.sol": {
            "id": 5
        },
        "access_control/AuthorizedAddresses.sol": {
            "id": 4
        },
        "openzeppelin-solidity/contracts/ownership/Ownable.sol": {
            "id": 1
        },
        "lib/KosuToken.sol": {
            "id": 8
        },
        "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol": {
            "id": 2
        },
        "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol": {
            "id": 3
        },
        "openzeppelin-solidity/contracts/math/SafeMath.sol": {
            "id": 0
        },
        "lib/Formula.sol": {
            "id": 7
        },
        "voting/IVoting.sol": {
            "id": 12
        },
        "event/EventEmitter.sol": {
            "id": 6
        }
    },
    "sourceCodes": {
        "voting/Voting.sol": "pragma solidity ^0.5.0;\n\nimport \"../treasury/Treasury.sol\";\nimport \"../event/EventEmitter.sol\";\nimport \"openzeppelin-solidity/contracts/math/SafeMath.sol\";\nimport \"./IVoting.sol\";\n\n/** @title Voting\n    @author Freydal\n    @dev Voting manages polls and votes on governance matters within the Kosu system.  Poll resolution logic will be the responsibility of the contract utilizing this service.\n*/\ncontract Voting is IVoting {\n    using SafeMath for uint;\n\n    Treasury private treasury;\n    EventEmitter private emitter;\n    uint public nextPollId = 1;\n    mapping(uint => Poll) polls;\n\n    struct Poll {\n        uint id;\n        address creator;\n        uint commitEndBlock;\n        uint revealEndBlock;\n        uint winnerLockEnd;\n        uint loserLockEnd;\n        uint currentLeadingOption;\n        uint leadingTokens;\n        uint totalRevealedTokens;\n        mapping(uint => uint) voteValues;\n        mapping(address => bool) didCommit;\n        mapping(address => bool) didReveal;\n        mapping(address => Vote) votes;\n    }\n\n    struct Vote {\n        bytes32 hiddenVote;\n        uint tokensCommitted;\n        uint salt;\n        uint voteOption;\n    }\n\n    /** @dev Initializes the voting contract with the shared event emitter and treasury contracts.\n        @notice Initializes the voting contract with the shared event emitter and treasury contracts.\n        @param treasuryAddress Deployed Treasury address.\n        @param _emitterAddress Deployed EventEmitter address.\n    */\n    constructor(address payable treasuryAddress, address _emitterAddress) public {\n        emitter = EventEmitter(_emitterAddress);\n        treasury = Treasury(treasuryAddress);\n    }\n\n    /** @dev Create a new poll. The commit and reveal periods must be provided. The creation of the poll is notified with an event from the shared EventEmitter.\n        @notice Create a new poll. The commit and reveal periods must be provided. The creation of the poll is notified with an event from the shared EventEmitter.\n        @param _commitEndBlock Block number when commit phase ends.\n        @param _revealEndBlock Block number when reveal phase ends.\n        @param _winnerLock Blocks after poll winning voters' tokens are locked.\n        @param _loserLock Blocks after poll losing voters' tokens are locked.\n        @return Poll index number. Will be used as the key for interacting with a vote.\n    */\n    function createPoll(uint _commitEndBlock, uint _revealEndBlock, uint _winnerLock, uint _loserLock) public returns (uint) {\n        // Reveal end after commit\n        require(_commitEndBlock < _revealEndBlock, \"commit must end before reveal\");\n\n        // Set poll data\n        Poll storage p = polls[nextPollId];\n        p.id = nextPollId;\n        p.creator = msg.sender;\n        p.commitEndBlock = _commitEndBlock;\n        p.revealEndBlock = _revealEndBlock;\n        p.winnerLockEnd = _revealEndBlock + _winnerLock;\n        p.loserLockEnd = _revealEndBlock + _loserLock;\n\n        // Increase next poll index\n        nextPollId++;\n\n        // Format data and emit event\n        bytes32[] memory data = new bytes32[](4);\n        data[0] = bytes32(uint(p.creator));\n        data[1] = bytes32(p.id);\n        data[2] = bytes32(_commitEndBlock);\n        data[3] = bytes32(_revealEndBlock);\n        emitter.emitEvent('PollCreated', data, \"\");\n\n        // Return the poll id\n        return p.id;\n    }\n\n    /** @dev Commit a vote in a poll to be later revealed. The salt and option must be retained for a successful reveal.\n        @notice Commit a vote in a poll to be later revealed. The salt and option must be retained for a successful reveal.\n        @param _pollId Poll id to commit vote to.\n        @param _vote Hash encoded vote option with salt.\n        @param _tokensToCommit Number of tokens to commit to vote.\n    */\n    function commitVote(uint _pollId, bytes32 _vote, uint _tokensToCommit) public {\n        //load Poll and Vote\n        Poll storage p = polls[_pollId];\n        Vote storage v = p.votes[msg.sender];\n\n        //Ensure commit phase hasn't ended, the user has not committed and has adequate balance in the treasury\n        require(block.number <= p.commitEndBlock, \"commit has ended\");\n        require(!p.didCommit[msg.sender], \"address committed\");\n        require(treasury.registerVote(msg.sender, _pollId, _tokensToCommit, p.winnerLockEnd, p.loserLockEnd), \"insufficient tokens\");\n        require(_tokensToCommit > 0, \"must commit tokens to lock\");\n\n        //Set the tokens committed hidden vote data\n        v.tokensCommitted = _tokensToCommit;\n        v.hiddenVote = _vote;\n\n        //Track voter address and set did commit.\n        p.didCommit[msg.sender] = true;\n    }\n\n    /** @dev Reveal a previously committed vote by providing the vote option and salt used to generate the vote hash.\n        @notice Reveal a previously committed vote by providing the vote option and salt used to generate the vote hash.\n        @param _pollId Poll id to commit vote to.\n        @param _voteOption Vote option used to generate vote hash.\n        @param _voteSalt Salt used to generate vote hash.\n    */\n    function revealVote(uint _pollId, uint _voteOption, uint _voteSalt) public {\n        Poll storage p = polls[_pollId];\n        Vote storage v = p.votes[msg.sender];\n\n        // Ensure commit phase has passed,  reveal phase has not.  User has commited but not revealed.  User has adequate balance in the treasury.\n        require(block.number > p.commitEndBlock, \"commit hasn't ended\");\n        require(block.number <= p.revealEndBlock, \"reveal has ended\");\n        require(p.didCommit[msg.sender], \"address hasn't committed\");\n        require(!p.didReveal[msg.sender], \"address has revealed\");\n\n        // Calculate and compare the commited vote\n        bytes32 exposedVote = keccak256(abi.encodePacked(_voteOption, _voteSalt));\n        require(v.hiddenVote == exposedVote, \"vote doesn't match\");\n\n        // Store info from a valid revealed vote. Remove the pending vote.\n        v.salt = _voteSalt;\n        v.voteOption = _voteOption;\n        p.didReveal[msg.sender] = true;\n        p.voteValues[_voteOption] = p.voteValues[_voteOption].add(v.tokensCommitted);\n        p.totalRevealedTokens = p.totalRevealedTokens.add(v.tokensCommitted);\n\n        // Update winner and tracking\n        if(p.currentLeadingOption != _voteOption && p.voteValues[_voteOption] > p.leadingTokens) {\n            p.currentLeadingOption = _voteOption;\n        }\n\n        p.leadingTokens = p.voteValues[p.currentLeadingOption];\n    }\n\n    /** @dev Retrieve the winning option for a finalized poll.\n        @param _pollId Poll index to check winning option for.\n        @return The winning option.\n    */\n    function winningOption(uint _pollId) public view returns (uint) {\n        Poll memory p = polls[_pollId];\n        require(p.revealEndBlock < block.number, \"poll hasn't ended\");\n        return p.currentLeadingOption;\n    }\n\n    /** @dev Retrieve the total number of tokens that supported the winning option of a finalized poll.\n        @param _pollId Poll index to check winning tokens for.\n        @return The uint number of tokens supporting the winning option.\n    */\n    function totalWinningTokens(uint _pollId) public view returns (uint) {\n        Poll memory p = polls[_pollId];\n        require(p.revealEndBlock < block.number, \"poll hasn't ended\");\n        return p.leadingTokens;\n    }\n\n    /** @dev Retrieve the total number of tokens revealed for a finalized poll.\n        @param _pollId Poll index to check total revealed tokens for.\n        @return The total number of tokens revealed in the poll.\n    */\n    function totalRevealedTokens(uint _pollId) public view returns (uint) {\n        Poll memory p = polls[_pollId];\n        require(p.revealEndBlock < block.number, \"poll hasn't ended\");\n        return p.totalRevealedTokens;\n    }\n\n    /** @dev Retrieve the number of tokens committed by a user for the winning option.\n        @param _pollId Poll index to check winning tokens for.\n        @param _user Address of user to check winning tokens.\n    */\n    function userWinningTokens(uint _pollId, address _user) public view returns (bool ended, uint tokens) {\n        Poll memory p = polls[_pollId];\n\n        if(p.revealEndBlock > block.number) {\n            return (false, 0);\n        }\n\n        Vote memory v = polls[_pollId].votes[_user];\n\n        if(p.currentLeadingOption == v.voteOption) {\n            tokens = v.tokensCommitted;\n        }\n\n        return (true, tokens);\n    }\n}\n",
        "treasury/Treasury.sol": "pragma solidity ^0.5.0;\n\nimport \"../base/Authorizable.sol\";\nimport \"../lib/KosuToken.sol\";\nimport \"../voting/IVoting.sol\";\n\n/** @title Treasury\n    @author Freydal\n    @dev The Kosu Treasury manages KosuToken balances to allow tokens in use within the contract system to be available for voting operations.\n*/\ncontract Treasury is Authorizable {\n    using SafeMath for uint;\n\n    IVoting voting;\n\n    struct TokenLock {\n        uint value;\n        uint pollId;\n        uint tokenLockEnd;\n        uint pollEarlyUnlock;\n    }\n\n    KosuToken public kosuToken;\n    mapping(address => uint) private currentBalances;\n    mapping(address => uint) private systemBalances;\n    mapping(address => TokenLock[]) private addressTokenLocks;\n\n    /** @dev Initializes the treasury with the kosuToken and authorizedAddresses contracts.\n        @notice Initializes the treasury with the kosuToken and authorizedAddresses contracts.\n        @param kosuTokenAddress The deployed KosuToken contract address.\n        @param auth AuthorizedAddresses deployed address.\n    */\n    constructor(address payable kosuTokenAddress, address auth) Authorizable(auth) public {\n        kosuToken = KosuToken(kosuTokenAddress);\n    }\n\n    function setVoting(address votingAddress) isAuthorized public {\n        voting = IVoting(votingAddress);\n    }\n\n    /** @dev Fallback payable function to allow ether but be bonded and directly deposit tokens into the Treasury.\n        @notice Fallback payable function to allow ether but be bonded and directly deposit tokens into the Treasury.\n    */\n    function () external payable {\n        _bond(msg.sender);\n    }\n\n    /** @dev Allows Kosu contracts to bond ether on on the accounts behalf.\n        @notice Allows Kosu contracts to bond ether on on the accounts behalf.\n        @param account The address the calling contract is acting on behalf of.\n    */\n    function contractBond(address account) isAuthorized payable public returns (uint) {\n        return _bond(account);\n    }\n\n    /** @dev Deposits tokens into the treasury.\n        @notice Deposits tokens into the treasury.\n        @param amount Number of tokens to deposit.\n    */\n    function deposit(uint amount) public {\n        _deposit(msg.sender, amount);\n    }\n\n    /** @dev Allows contracts to deposit tokens from an accounts balance.\n        @notice Allows contracts to deposit tokens from an accounts balance.\n        @param account Account address the tokens will be deposited from.\n        @param amount Number of tokens to deposit.\n    */\n    function contractDeposit(address account, uint amount) isAuthorized public {\n        _deposit(account, amount);\n    }\n\n    /** @dev Withdraw tokens from the treasury.\n        @notice Withdraw tokens from the treasury.\n        @param amount Number of tokens to withdraw.\n    */\n    function withdraw(uint amount) public {\n        require(getSystemBalance(msg.sender).sub(amount) >= _getLockedTokens(msg.sender), \"tokens are locked\");\n\n        _withdraw(msg.sender, amount);\n    }\n\n    /** @dev Allows contracts to withdraw tokens back to an account address.\n        @notice Allows contracts to withdraw tokens back to an account address.\n        @param account Address to withdraw tokens for.\n        @param amount Number of tokens to withdraw.\n    */\n    function contractWithdraw(address account, uint amount) isAuthorized public {\n        _withdraw(account, amount);\n    }\n\n    /** @dev Allows contracts to claim tokens. Claimed tokens are not available for other system contract and leave the treasury under control of the calling contract.  These tokens are still available for voting.\n        @notice Allows contracts to claim tokens. Claimed tokens are not available for other system contract and leave the treasury under control of the calling contract.  These tokens are still available for voting.\n        @param account Account to claim tokens from.\n        @param amount Number of tokens to claim.\n    */\n    function claimTokens(address account, uint amount) isAuthorized public {\n        //Attempt to get more balance if balance is insufficient\n        if(getCurrentBalance(account) < amount) {\n            uint currentBalance = getCurrentBalance(account);\n            uint amountToDeposit = amount.sub(currentBalance);\n            _deposit(account, amountToDeposit);\n        }\n\n        //Transfer to requesting contract and update balance held in contract\n        require(kosuToken.transfer(msg.sender, amount));\n        setCurrentBalance(account, getCurrentBalance(account).sub(amount));\n    }\n\n    /** @dev Allows contracts to release claimed tokens. Allowing them to be used elsewhere by the user again.\n        @notice Allows contracts to release claimed tokens. Allowing them to be used elsewhere by the user again.\n        @param account Account to release tokens to.\n        @param amount Number of tokens to release.\n    */\n    function releaseTokens(address account, uint amount) isAuthorized public {\n        //Transfer from requesting contract and update balance held in contract\n        require(kosuToken.transferFrom(msg.sender, address(this), amount));\n        setCurrentBalance(account, getCurrentBalance(account).add(amount));\n    }\n\n    /** @dev Allows contracts to confiscate tokens the account has lost access to. These previously claimed tokens are no longer owned by the account.\n        @notice Allows contracts to confiscate tokens the account has lost access to. These previously claimed tokens are no longer owned by the account.\n        @param account Account to confiscate tokens from.\n        @param amount Number of tokens to confiscate.\n    */\n    function confiscate(address account, uint amount) isAuthorized public {\n        //Remove the system balance\n        setSystemBalance(account, getSystemBalance(account).sub(amount));\n        // Require the tokens being confiscated are only tokens already in kosu system contract control\n        require(getSystemBalance(account) >= getCurrentBalance(account), \"system balance overburn\");\n    }\n\n    /** @dev Allows accounts to be rewarded with tokens. These tokens were previously obtained by the calling contract and are now being redistributed to the provided account.\n        @notice Allows accounts to be rewarded with tokens. These tokens were previously obtained by the calling contract and are now being redistributed to the provided account.\n        @param account Account to award tokens to.\n        @param amount Number of tokens to award.\n    */\n    function award(address account, uint amount) isAuthorized public {\n        //Transfer from requesting contract and update balance held in contract\n        require(kosuToken.transferFrom(msg.sender, address(this), amount));\n        //Increase current balance\n        setCurrentBalance(account, getCurrentBalance(account).add(amount));\n        //Increase systemBalance these tokens are new to the account\n        setSystemBalance(account, getSystemBalance(account).add(amount));\n    }\n\n    /** @dev Allows contracts to burn an accounts held tokens.\n        @notice Allows contracts to burn an accounts held tokens.\n        @param account Account to burn tokens for.\n        @param amount Number of tokens to burn.\n    */\n    function burnFrom(address account, uint amount) isAuthorized public {\n        require(getCurrentBalance(account) >= amount, \"insufficient current balance\");\n        kosuToken.burn(amount);\n        setCurrentBalance(account, getCurrentBalance(account).sub(amount));\n        setSystemBalance(account, getSystemBalance(account).sub(amount));\n    }\n\n    /** @dev Allows voting contract to register a poll to ensure tokens aren't removed.\n        @notice Allows voting contract to register a poll to ensure tokens aren't removed.\n        @param account The account voting.\n        @param pollId The poll the account is voting on.\n        @param amount Number of tokens contributed.\n    */\n    function registerVote(address account, uint pollId, uint amount, uint endBlock, uint losingEndBlock) isAuthorized public returns (bool) {\n        if(systemBalances[account] < amount) {\n            return false;\n        }\n\n        addressTokenLocks[account].push(TokenLock(amount, pollId, endBlock, losingEndBlock));\n\n        return true;\n    }\n\n    /** @dev Allows validator registry to lock tokens in treasury after an exit.\n        @notice Allows validator registry to lock tokens in treasury after an exit.\n        @param account The account validator is locking.\n        @param amount Number of tokens to lock.\n        @param endBlock The end of the lock.\n    */\n    function validatorLock(address account, uint amount, uint endBlock) isAuthorized public {\n        addressTokenLocks[account].push(TokenLock(\n            amount,\n            0,\n            endBlock,\n            0\n        ));\n    }\n\n    /** @dev Allows tokens to determine when all tokens are unlocked for a given account.\n        @notice Allows tokens to determine when all tokens are unlocked for a given account.\n        @param account The account to look at locks for.\n        @return Final block of the last lock to expire.\n    */\n    function tokenLocksExpire(address account) public returns (uint lastBlock) {\n        _removeInactiveTokenLocks(msg.sender);\n        for(uint i = addressTokenLocks[account].length; i > 0; i--) {\n            if(addressTokenLocks[account][i - 1].tokenLockEnd > lastBlock) {\n                lastBlock = addressTokenLocks[account][i - 1].tokenLockEnd;\n            }\n        }\n        return lastBlock;\n    }\n\n    /** @dev Reports the total balance within the entire contract system for an account.\n        @notice Reports the total balance within the entire contract system for an account.\n        @param account Account to report balance on.\n        @return The number of tokens within the entire contract system.\n    */\n    function systemBalance(address account) public view returns (uint)  {\n        return getSystemBalance(account);\n    }\n\n    /** @dev Reports the available balance held within the treasury for an account.\n        @notice Reports the available balance held within the treasury for an account.\n        @param account Account to report balance on.\n        @return Number of available tokens the treasury holds for the account.\n    */\n    function currentBalance(address account) public view returns (uint)  {\n        return getCurrentBalance(account);\n    }\n\n    // INTERNAL\n    /** @dev Bonds tokens by passing the transaction value to the bonding functions of the KosuToken then provides the added balance to the provided account address.\n    */\n    function _bond(address account) internal returns (uint) {\n        uint initialBalance = kosuToken.balanceOf(address(this));\n        uint minted = kosuToken.bondTokens.value(msg.value)(0);\n        require(initialBalance + minted == kosuToken.balanceOf(address(this)), \"tokens not minted\");\n\n        setSystemBalance(account, getSystemBalance(account).add(minted));\n        setCurrentBalance(account, getCurrentBalance(account).add(minted));\n\n        return minted;\n    }\n\n    /** @dev Transfers tokens from the account address to the treasury.  Increases the available and total system balance by the added amount.\n    */\n    function _deposit(address account, uint amount) internal {\n        //Pulls token from the account and increases both internal ans system balances by the value.\n        require(kosuToken.transferFrom(account, address(this), amount));\n        setSystemBalance(account, getSystemBalance(account).add(amount));\n        setCurrentBalance(account, getCurrentBalance(account).add(amount));\n    }\n\n    /** @dev Transfers tokens held within the treasury to the provided account address and removes the amount from the accounts available and system balances.\n    */\n    function _withdraw(address account, uint amount) internal {\n        //Sends tokens to the account reduce the values of internal and system balances by the value.\n        require(getCurrentBalance(account) >= amount, \"insufficient tokens\");\n        require(kosuToken.transfer(account, amount));\n        setSystemBalance(account, getSystemBalance(account).sub(amount));\n        setCurrentBalance(account, getCurrentBalance(account).sub(amount));\n    }\n\n    /** @dev Removes expired locks.\n    */\n    function _removeInactiveTokenLocks(address account) internal {\n        for(uint i = addressTokenLocks[account].length; i > 0; i--) {\n            TokenLock storage v = addressTokenLocks[account][i - 1];\n            (bool finished, uint winningTokens) = voting.userWinningTokens(v.pollId, msg.sender);\n            if(v.pollId > 0 && finished && winningTokens == 0) {\n                v.tokenLockEnd = v.pollEarlyUnlock;\n            }\n            if(v.tokenLockEnd < block.number) {\n                if(i == addressTokenLocks[account].length) {\n                    delete addressTokenLocks[account][i - 1];\n                    addressTokenLocks[account].length = addressTokenLocks[account].length - 1;\n                } else {\n                    addressTokenLocks[account][i - 1] = addressTokenLocks[account][addressTokenLocks[account].length - 1];\n                    delete addressTokenLocks[account][addressTokenLocks[account].length - 1];\n                    addressTokenLocks[account].length = addressTokenLocks[account].length - 1;\n                }\n            }\n        }\n    }\n\n    /** @dev Calculates addresses total locked tokens\n    */\n    function _getLockedTokens(address account) internal returns (uint) {\n        //cleanup\n        _removeInactiveTokenLocks(account);\n        //Updates the systemBalance for the account\n        uint totalLocked;\n        uint maxVoteLock;\n        for(uint i = 0; i < addressTokenLocks[account].length; i++) {\n            TokenLock storage lock = addressTokenLocks[account][i];\n            if(lock.pollId == 0) {\n                totalLocked = totalLocked.add(addressTokenLocks[account][i].value);\n            } else {\n                if (lock.value > maxVoteLock) {\n                    maxVoteLock = lock.value;\n                }\n            }\n        }\n        return totalLocked + maxVoteLock;\n    }\n    /** @dev Reads the account addresses system balance.\n    */\n    function getSystemBalance(address account) internal view returns (uint) {\n        //Reports the systemBalance for the account\n        return systemBalances[account];\n    }\n\n    /** @dev Sets the accounts system balance.\n    */\n    function setSystemBalance(address account, uint amount) internal {\n        systemBalances[account] = amount;\n    }\n\n    /** @dev Reads the accounts current balance.\n    */\n    function getCurrentBalance(address account) internal view returns (uint) {\n        //Reports the held balance for the account\n        return currentBalances[account];\n    }\n\n    /** @dev Sets the accounts current balance.\n    */\n    function setCurrentBalance(address account, uint amount) internal {\n        //Updates the held balance for the account\n        currentBalances[account] = amount;\n    }\n}\n",
        "base/Authorizable.sol": "pragma solidity ^0.5.0;\n\nimport \"../access_control/AuthorizedAddresses.sol\";\n\n/** @title Authorizable\n    @author Freydal\n    @dev Implements a modifier to verify authorization with the AuthorizedAddresses contract\n*/\ncontract Authorizable {\n\n    // Contract storing system level permissions\n    AuthorizedAddresses authorizedAddress;\n\n    /** @dev Initializes contract with deployed AuthorizedAddresses contract.\n        @notice Initializes contract with deployed AuthorizedAddresses contract.\n        @param authorizedAddressesAddress Deployed AuthorizedAddresses address.\n    */\n    constructor(address authorizedAddressesAddress) public {\n        authorizedAddress = AuthorizedAddresses(authorizedAddressesAddress);\n    }\n\n    /** @dev Ensures msg.sender is authorized within the AuthorizedAddresses contract\n        @notice Ensures msg.sender is authorized within the AuthorizedAddresses contract\n    */\n    modifier isAuthorized() {\n        require(authorizedAddress.isAddressAuthorized(msg.sender), \"unauthorized\");\n        _;\n    }\n}\n",
        "access_control/AuthorizedAddresses.sol": "pragma solidity ^0.5.0;\n\nimport \"openzeppelin-solidity/contracts/ownership/Ownable.sol\";\n\n/** @title AuthorizedAddresses\n    @author Freydal\n    @dev Common registry of system contract addresses authorized to access internal methods.\n*/\ncontract AuthorizedAddresses is Ownable {\n\n    // Mapping storing address permissions\n    mapping(address => bool) private authorizedAddresses;\n\n    /** @dev Initializes contract with the creators permissions set to true.\n        @notice Initializes contract with the creators permissions set to true.\n    */\n    constructor() Ownable() public {\n        authorizedAddresses[owner()] = true;\n    }\n\n    /** @dev Authorizes the address by setting the mapping value to true.\n        @notice Authorizes the address by setting the mapping value to true.\n        @param a Address to authorize\n    */\n    function authorizeAddress(address a) public {\n        require(authorizedAddresses[msg.sender], \"unauthorized\");\n        authorizedAddresses[a] = true;\n    }\n\n    /** @dev Disables the address previous authorization by setting the mapping value to false.\n        @notice Disables the address previous authorization by setting the mapping value to false\n        @param a Address to unauthorize\n    */\n    function unauthorizeAddress(address a) public {\n        require(authorizedAddresses[msg.sender]);\n        authorizedAddresses[a] = false;\n    }\n\n    /** @dev Verify address authorization.\n        @notice Verify address authorization.\n        @param a Address to authorize.\n        @return Address authorization\n    */\n    function isAddressAuthorized(address a) public view returns (bool) {\n        return authorizedAddresses[a];\n    }\n}\n",
        "openzeppelin-solidity/contracts/ownership/Ownable.sol": "pragma solidity ^0.5.0;\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n    address private _owner;\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n     * account.\n     */\n    constructor () internal {\n        _owner = msg.sender;\n        emit OwnershipTransferred(address(0), _owner);\n    }\n\n    /**\n     * @return the address of the owner.\n     */\n    function owner() public view returns (address) {\n        return _owner;\n    }\n\n    /**\n     * @dev Throws if called by any account other than the owner.\n     */\n    modifier onlyOwner() {\n        require(isOwner());\n        _;\n    }\n\n    /**\n     * @return true if `msg.sender` is the owner of the contract.\n     */\n    function isOwner() public view returns (bool) {\n        return msg.sender == _owner;\n    }\n\n    /**\n     * @dev Allows the current owner to relinquish control of the contract.\n     * @notice Renouncing to ownership will leave the contract without an owner.\n     * It will not be possible to call the functions with the `onlyOwner`\n     * modifier anymore.\n     */\n    function renounceOwnership() public onlyOwner {\n        emit OwnershipTransferred(_owner, address(0));\n        _owner = address(0);\n    }\n\n    /**\n     * @dev Allows the current owner to transfer control of the contract to a newOwner.\n     * @param newOwner The address to transfer ownership to.\n     */\n    function transferOwnership(address newOwner) public onlyOwner {\n        _transferOwnership(newOwner);\n    }\n\n    /**\n     * @dev Transfers control of the contract to a newOwner.\n     * @param newOwner The address to transfer ownership to.\n     */\n    function _transferOwnership(address newOwner) internal {\n        require(newOwner != address(0));\n        emit OwnershipTransferred(_owner, newOwner);\n        _owner = newOwner;\n    }\n}\n",
        "lib/KosuToken.sol": "pragma solidity ^0.5.0;\n\nimport \"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\";\nimport \"../base/Authorizable.sol\";\nimport \"./Formula.sol\";\n\n/** @title KosuToken\n    @author Freydal\n    @dev KosuToken (KOSU) is an implementation of the ERC-20 interface and supporting bonding curve for mints and burns.\n*/\ncontract KosuToken is ERC20, Authorizable {\n\n    string public name = \"KOSU\";\n    string public symbol = \"KOSU\";\n    uint8 public decimals = 18;\n    uint private _weiPaid = 0;\n    uint32 constant private r = 290000; // ppm\n\n    /** @dev Initializes KosuToken with the authorizedAddresses shared permission contract to protect functions.\n        @notice Initializes KosuToken with the authorizedAddresses shared permission contract to protect functions.\n    */\n    constructor(address _auth) Authorizable(_auth) public {\n    }\n\n    /** @dev Fallback payable function to allow the contract address to directly accept ether to be forwarded to the bonding function.\n        @notice Fallback payable function to allow the contract address to directly accept ether to be forwarded to the bonding function.\n    */\n    function () external payable {\n        bondTokens(0);\n    }\n\n    /** @dev Receives ether as a backing currency to be used against the bonding curve to mint tokens.\n        @notice Receives ether as a backing currency to be used against the bonding curve to mint tokens.\n        @param minPayout The minimum number of tokens to mint otherwise the transaction is reverted. This should prevent a front runner modifying the output.\n    */\n    function bondTokens(uint minPayout) payable public returns (uint) {\n        if (msg.value == 0) return 0;\n\n        uint tokensToMint = calculateEtherToToken(msg.value);\n\n        require(tokensToMint >= minPayout, \"payout below requested minimum\");\n\n        _weiPaid = _weiPaid.add(msg.value);\n        _mint(msg.sender, tokensToMint);\n        return tokensToMint;\n    }\n\n    /** @dev Burns the input tokens and releases the calculated amount of ether backing the tokens destroyed.\n        @notice Burns the input tokens and releases the calculated amount of ether backing the tokens destroyed.\n        @param tokensToBurn The number of the users tokens to burn.\n    */\n    function releaseTokens(uint tokensToBurn) public {\n        if (tokensToBurn == 0) return;\n\n        uint etherToRelease = calculateTokenToEther(tokensToBurn);\n\n        _burn(msg.sender, tokensToBurn);\n        msg.sender.transfer(etherToRelease);\n        _weiPaid = _weiPaid.sub(etherToRelease);\n    }\n\n    /** @dev Estimates the number of tokens that would be minted with the input ether at the current ether and token balances.\n        @notice Estimates the number of tokens that would be minted with the input ether at the current ether and token balances.\n        @param input The amount of ether to contribute.\n        @return Number of tokens that would be minted.\n    */\n    function estimateEtherToToken(uint input) public view returns (uint) {\n        return calculateEtherToToken(input);\n    }\n\n    /** @dev Estimates the amount of ether to be released with the input number of tokens to burn.\n        @notice Estimates the amount of ether to be released with the input number of tokens to burn.\n        @param input The number of tokens to burn.\n        @return Amount of ether to release.\n    */\n    function estimateTokenToEther(uint input) public view returns (uint) {\n        return calculateTokenToEther(input);\n    }\n\n    /** @dev Voluntarily burn tokens.\n        @notice Voluntarily burn tokens.\n        @param amount Number of tokens to burn.\n    */\n    function burn(uint amount) public isAuthorized {\n        _burn(msg.sender, amount);\n    }\n\n    /** @dev Authorized addresses (mostly contract systems) may manually mint new tokens to desired addresses.\n        @notice Authorized addresses (mostly contract systems) may manually mint new tokens to desired addresses.\n        @param _address Address to mint tokens to.\n        @param amount Number of tokens to mint.\n    */\n    function mintTo(address _address, uint amount) public isAuthorized {\n        _mint(_address, amount);\n    }\n\n    /** @dev Uses a modified BancorFormula to calculate the number of tokens to mint for input ether value.\n    */\n    function calculateEtherToToken(uint etherValue) internal view returns (uint) {\n        if (_weiPaid == 0 && totalSupply() == 0) {\n            require(etherValue == (2 ether)/10, \"first transaction must be .2 ether\");\n            return 10000 ether;\n        } else {\n            return Formula.calculatePurchaseReturn(totalSupply(), _weiPaid, r, etherValue);\n        }\n    }\n\n    /** @dev Uses a modified BancorFormula to calculate the amount of ether to release for input token value.\n    */\n    function calculateTokenToEther(uint numberOfTokens) internal view returns (uint) {\n        return Formula.calculateSaleReturn(totalSupply(), _weiPaid, r, numberOfTokens);\n    }\n}\n",
        "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol": "pragma solidity ^0.5.0;\n\nimport \"./IERC20.sol\";\nimport \"../../math/SafeMath.sol\";\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md\n * Originally based on code by FirstBlood:\n * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n *\n * This implementation emits additional Approval events, allowing applications to reconstruct the allowance status for\n * all accounts just by listening to said events. Note that this isn't required by the specification, and other\n * compliant implementations may not do it.\n */\ncontract ERC20 is IERC20 {\n    using SafeMath for uint256;\n\n    mapping (address => uint256) private _balances;\n\n    mapping (address => mapping (address => uint256)) private _allowed;\n\n    uint256 private _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 Gets the balance of the specified address.\n    * @param owner The address to query 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     * @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(address owner, address spender) public view returns (uint256) {\n        return _allowed[owner][spender];\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        _transfer(msg.sender, 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        require(spender != address(0));\n\n        _allowed[msg.sender][spender] = value;\n        emit Approval(msg.sender, spender, value);\n        return true;\n    }\n\n    /**\n     * @dev Transfer tokens from one address to another.\n     * Note that while this function emits an Approval event, this is not required as per the specification,\n     * and other compliant implementations may not emit the event.\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(address from, address to, uint256 value) public returns (bool) {\n        _allowed[from][msg.sender] = _allowed[from][msg.sender].sub(value);\n        _transfer(from, to, value);\n        emit Approval(from, msg.sender, _allowed[from][msg.sender]);\n        return true;\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     * Emits an Approval event.\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 increaseAllowance(address spender, uint256 addedValue) public returns (bool) {\n        require(spender != address(0));\n\n        _allowed[msg.sender][spender] = _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     * Emits an Approval event.\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 decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {\n        require(spender != address(0));\n\n        _allowed[msg.sender][spender] = _allowed[msg.sender][spender].sub(subtractedValue);\n        emit Approval(msg.sender, spender, _allowed[msg.sender][spender]);\n        return true;\n    }\n\n    /**\n    * @dev Transfer token for a specified addresses\n    * @param from The address to transfer from.\n    * @param to The address to transfer to.\n    * @param value The amount to be transferred.\n    */\n    function _transfer(address from, address to, uint256 value) internal {\n        require(to != address(0));\n\n        _balances[from] = _balances[from].sub(value);\n        _balances[to] = _balances[to].add(value);\n        emit Transfer(from, to, value);\n    }\n\n    /**\n     * @dev Internal function that mints an amount of the token and assigns it to\n     * an account. This encapsulates the modification of balances such that the\n     * proper events are emitted.\n     * @param account The account that will receive the created tokens.\n     * @param value The amount that will be created.\n     */\n    function _mint(address account, uint256 value) internal {\n        require(account != address(0));\n\n        _totalSupply = _totalSupply.add(value);\n        _balances[account] = _balances[account].add(value);\n        emit Transfer(address(0), account, value);\n    }\n\n    /**\n     * @dev Internal function that burns an amount of the token of a given\n     * account.\n     * @param account The account whose tokens will be burnt.\n     * @param value The amount that will be burnt.\n     */\n    function _burn(address account, uint256 value) internal {\n        require(account != address(0));\n\n        _totalSupply = _totalSupply.sub(value);\n        _balances[account] = _balances[account].sub(value);\n        emit Transfer(account, address(0), value);\n    }\n\n    /**\n     * @dev Internal function that burns an amount of the token of a given\n     * account, deducting from the sender's allowance for said account. Uses the\n     * internal burn function.\n     * Emits an Approval event (reflecting the reduced allowance).\n     * @param account The account whose tokens will be burnt.\n     * @param value The amount that will be burnt.\n     */\n    function _burnFrom(address account, uint256 value) internal {\n        _allowed[account][msg.sender] = _allowed[account][msg.sender].sub(value);\n        _burn(account, value);\n        emit Approval(account, msg.sender, _allowed[account][msg.sender]);\n    }\n}\n",
        "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol": "pragma solidity ^0.5.0;\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ninterface IERC20 {\n    function transfer(address to, uint256 value) external returns (bool);\n\n    function approve(address spender, uint256 value) external returns (bool);\n\n    function transferFrom(address from, address to, uint256 value) external returns (bool);\n\n    function totalSupply() external view returns (uint256);\n\n    function balanceOf(address who) external view returns (uint256);\n\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n",
        "openzeppelin-solidity/contracts/math/SafeMath.sol": "pragma solidity ^0.5.0;\n\n/**\n * @title SafeMath\n * @dev Unsigned math operations with safety checks that revert on error\n */\nlibrary SafeMath {\n    /**\n    * @dev Multiplies two unsigned integers, reverts on overflow.\n    */\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n        // Gas optimization: this is cheaper than requiring '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        uint256 c = a * b;\n        require(c / a == b);\n\n        return c;\n    }\n\n    /**\n    * @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero.\n    */\n    function div(uint256 a, uint256 b) internal pure returns (uint256) {\n        // Solidity only automatically asserts when dividing by 0\n        require(b > 0);\n        uint256 c = a / b;\n        // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n        return c;\n    }\n\n    /**\n    * @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).\n    */\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n        require(b <= a);\n        uint256 c = a - b;\n\n        return c;\n    }\n\n    /**\n    * @dev Adds two unsigned integers, reverts on overflow.\n    */\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\n        uint256 c = a + b;\n        require(c >= a);\n\n        return c;\n    }\n\n    /**\n    * @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),\n    * reverts when dividing by zero.\n    */\n    function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n        require(b != 0);\n        return a % b;\n    }\n}\n",
        "lib/Formula.sol": "pragma solidity ^0.5.0;\n\nimport \"openzeppelin-solidity/contracts/math/SafeMath.sol\";\n\n/** @title Formula (from BancorFormula)\n    @author Freydal converted to library from https://github.com/bancorprotocol/contracts/blob/master/solidity/contracts/converter/BancorFormula.sol\n*/\nlibrary Formula {\n    using SafeMath for uint256;\n\n    uint256 private constant ONE = 1;\n    uint32 private constant MAX_WEIGHT = 1000000;\n    uint8 private constant MIN_PRECISION = 32;\n    uint8 private constant MAX_PRECISION = 127;\n\n    /**\n        Auto-generated via 'PrintIntScalingFactors.py'\n    */\n    uint256 private constant FIXED_1 = 0x080000000000000000000000000000000;\n    uint256 private constant FIXED_2 = 0x100000000000000000000000000000000;\n    uint256 private constant MAX_NUM = 0x200000000000000000000000000000000;\n\n    /**\n        Auto-generated via 'PrintLn2ScalingFactors.py'\n    */\n    uint256 private constant LN2_NUMERATOR   = 0x3f80fe03f80fe03f80fe03f80fe03f8;\n    uint256 private constant LN2_DENOMINATOR = 0x5b9de1d10bf4103d647b0955897ba80;\n\n    /**\n        Auto-generated via 'PrintFunctionOptimalLog.py' and 'PrintFunctionOptimalExp.py'\n    */\n    uint256 private constant OPT_LOG_MAX_VAL = 0x15bf0a8b1457695355fb8ac404e7a79e3;\n    uint256 private constant OPT_EXP_MAX_VAL = 0x800000000000000000000000000000000;\n\n    /**\n        Auto-generated via 'PrintFunctionConstructor.py'\n    */\n\n    /**\n        @dev given a token supply, connector balance, weight and a deposit amount (in the connector token),\n        calculates the return for a given conversion (in the main token)\n\n        Formula:\n        Return = _supply * ((1 + _depositAmount / _connectorBalance) ^ (_connectorWeight / 1000000) - 1)\n\n        @param _supply              token total supply\n        @param _connectorBalance    total connector balance\n        @param _connectorWeight     connector weight, represented in ppm, 1-1000000\n        @param _depositAmount       deposit amount, in connector token\n\n        @return purchase return amount\n    */\n    function calculatePurchaseReturn(uint256 _supply, uint256 _connectorBalance, uint32 _connectorWeight, uint256 _depositAmount) internal view returns (uint256) {\n        // validate input\n        require(_supply > 0 && _connectorBalance > 0 && _connectorWeight > 0 && _connectorWeight <= MAX_WEIGHT);\n\n        // special case for 0 deposit amount\n        if (_depositAmount == 0)\n            return 0;\n\n        // special case if the weight = 100%\n        if (_connectorWeight == MAX_WEIGHT)\n            return _supply.mul(_depositAmount) / _connectorBalance;\n\n        uint256 result;\n        uint8 precision;\n        uint256 baseN = _depositAmount.add(_connectorBalance);\n        (result, precision) = power(baseN, _connectorBalance, _connectorWeight, MAX_WEIGHT);\n        uint256 temp = _supply.mul(result) >> precision;\n        return temp - _supply;\n    }\n\n    /**\n        @dev given a token supply, connector balance, weight and a sell amount (in the main token),\n        calculates the return for a given conversion (in the connector token)\n\n        Formula:\n        Return = _connectorBalance * (1 - (1 - _sellAmount / _supply) ^ (1 / (_connectorWeight / 1000000)))\n\n        @param _supply              token total supply\n        @param _connectorBalance    total connector\n        @param _connectorWeight     constant connector Weight, represented in ppm, 1-1000000\n        @param _sellAmount          sell amount, in the token itself\n\n        @return sale return amount\n    */\n    function calculateSaleReturn(uint256 _supply, uint256 _connectorBalance, uint32 _connectorWeight, uint256 _sellAmount) internal view returns (uint256) {\n        // validate input\n        require(_supply > 0 && _connectorBalance > 0 && _connectorWeight > 0 && _connectorWeight <= MAX_WEIGHT && _sellAmount <= _supply);\n\n        // special case for 0 sell amount\n        if (_sellAmount == 0)\n            return 0;\n\n        // special case for selling the entire supply\n        if (_sellAmount == _supply)\n            return _connectorBalance;\n\n        // special case if the weight = 100%\n        if (_connectorWeight == MAX_WEIGHT)\n            return _connectorBalance.mul(_sellAmount) / _supply;\n\n        uint256 result;\n        uint8 precision;\n        uint256 baseD = _supply - _sellAmount;\n        (result, precision) = power(_supply, baseD, MAX_WEIGHT, _connectorWeight);\n        uint256 temp1 = _connectorBalance.mul(result);\n        uint256 temp2 = _connectorBalance << precision;\n        return (temp1 - temp2) / result;\n    }\n\n    /**\n        @dev given two connector balances/weights and a sell amount (in the first connector token),\n        calculates the return for a conversion from the first connector token to the second connector token (in the second connector token)\n\n        Formula:\n        Return = _toConnectorBalance * (1 - (_fromConnectorBalance / (_fromConnectorBalance + _amount)) ^ (_fromConnectorWeight / _toConnectorWeight))\n\n        @param _fromConnectorBalance    input connector balance\n        @param _fromConnectorWeight     input connector weight, represented in ppm, 1-1000000\n        @param _toConnectorBalance      output connector balance\n        @param _toConnectorWeight       output connector weight, represented in ppm, 1-1000000\n        @param _amount                  input connector amount\n\n        @return second connector amount\n    */\n    function calculateCrossConnectorReturn(uint256 _fromConnectorBalance, uint32 _fromConnectorWeight, uint256 _toConnectorBalance, uint32 _toConnectorWeight, uint256 _amount) internal view returns (uint256) {\n        // validate input\n        require(_fromConnectorBalance > 0 && _fromConnectorWeight > 0 && _fromConnectorWeight <= MAX_WEIGHT && _toConnectorBalance > 0 && _toConnectorWeight > 0 && _toConnectorWeight <= MAX_WEIGHT);\n\n        // special case for equal weights\n        if (_fromConnectorWeight == _toConnectorWeight)\n            return _toConnectorBalance.mul(_amount) / _fromConnectorBalance.add(_amount);\n\n        uint256 result;\n        uint8 precision;\n        uint256 baseN = _fromConnectorBalance.add(_amount);\n        (result, precision) = power(baseN, _fromConnectorBalance, _fromConnectorWeight, _toConnectorWeight);\n        uint256 temp1 = _toConnectorBalance.mul(result);\n        uint256 temp2 = _toConnectorBalance << precision;\n        return (temp1 - temp2) / result;\n    }\n\n    /**\n        General Description:\n            Determine a value of precision.\n            Calculate an integer approximation of (_baseN / _baseD) ^ (_expN / _expD) * 2 ^ precision.\n            Return the result along with the precision used.\n\n        Detailed Description:\n            Instead of calculating \"base ^ exp\", we calculate \"e ^ (log(base) * exp)\".\n            The value of \"log(base)\" is represented with an integer slightly smaller than \"log(base) * 2 ^ precision\".\n            The larger \"precision\" is, the more accurately this value represents the real value.\n            However, the larger \"precision\" is, the more bits are required in order to store this value.\n            And the exponentiation function, which takes \"x\" and calculates \"e ^ x\", is limited to a maximum exponent (maximum value of \"x\").\n            This maximum exponent depends on the \"precision\" used, and it is given by \"maxExpArray[precision] >> (MAX_PRECISION - precision)\".\n            Hence we need to determine the highest precision which can be used for the given input, before calling the exponentiation function.\n            This allows us to compute \"base ^ exp\" with maximum accuracy and without exceeding 256 bits in any of the intermediate computations.\n            This functions assumes that \"_expN < 2 ^ 256 / log(MAX_NUM - 1)\", otherwise the multiplication should be replaced with a \"safeMul\".\n    */\n    function power(uint256 _baseN, uint256 _baseD, uint32 _expN, uint32 _expD) internal view returns (uint256, uint8) {\n        require(_baseN < MAX_NUM);\n\n        uint256 baseLog;\n        uint256 base = _baseN * FIXED_1 / _baseD;\n        if (base < OPT_LOG_MAX_VAL) {\n            baseLog = optimalLog(base);\n        }\n        else {\n            baseLog = generalLog(base);\n        }\n\n        uint256 baseLogTimesExp = baseLog * _expN / _expD;\n        if (baseLogTimesExp < OPT_EXP_MAX_VAL) {\n            return (optimalExp(baseLogTimesExp), MAX_PRECISION);\n        }\n        else {\n            uint8 precision = findPositionInMaxExpArray(baseLogTimesExp);\n            return (generalExp(baseLogTimesExp >> (MAX_PRECISION - precision), precision), precision);\n        }\n    }\n\n    /**\n        Compute log(x / FIXED_1) * FIXED_1.\n        This functions assumes that \"x >= FIXED_1\", because the output would be negative otherwise.\n    */\n    function generalLog(uint256 x) internal pure returns (uint256) {\n        uint256 res = 0;\n\n        // If x >= 2, then we compute the integer part of log2(x), which is larger than 0.\n        if (x >= FIXED_2) {\n            uint8 count = floorLog2(x / FIXED_1);\n            x >>= count; // now x < 2\n            res = count * FIXED_1;\n        }\n\n        // If x > 1, then we compute the fraction part of log2(x), which is larger than 0.\n        if (x > FIXED_1) {\n            for (uint8 i = MAX_PRECISION; i > 0; --i) {\n                x = (x * x) / FIXED_1; // now 1 < x < 4\n                if (x >= FIXED_2) {\n                    x >>= 1; // now 1 < x < 2\n                    res += ONE << (i - 1);\n                }\n            }\n        }\n\n        return res * LN2_NUMERATOR / LN2_DENOMINATOR;\n    }\n\n    /**\n        Compute the largest integer smaller than or equal to the binary logarithm of the input.\n    */\n    function floorLog2(uint256 _n) internal pure returns (uint8) {\n        uint8 res = 0;\n\n        if (_n < 256) {\n            // At most 8 iterations\n            while (_n > 1) {\n                _n >>= 1;\n                res += 1;\n            }\n        }\n        else {\n            // Exactly 8 iterations\n            for (uint8 s = 128; s > 0; s >>= 1) {\n                if (_n >= (ONE << s)) {\n                    _n >>= s;\n                    res |= s;\n                }\n            }\n        }\n\n        return res;\n    }\n\n    /**\n        The global \"maxExpArray\" is sorted in descending order, and therefore the following statements are equivalent:\n        - This function finds the position of [the smallest value in \"maxExpArray\" larger than or equal to \"x\"]\n        - This function finds the highest position of [a value in \"maxExpArray\" larger than or equal to \"x\"]\n    */\n    function findPositionInMaxExpArray(uint256 _x) internal view returns (uint8) {\n        uint256[128] memory maxExpArray = [uint256(0x6bffffffffffffffffffffffffffffffff), uint256(0x67ffffffffffffffffffffffffffffffff), uint256(0x637fffffffffffffffffffffffffffffff), uint256(0x5f6fffffffffffffffffffffffffffffff), uint256(0x5b77ffffffffffffffffffffffffffffff), uint256(0x57b3ffffffffffffffffffffffffffffff), uint256(0x5419ffffffffffffffffffffffffffffff), uint256(0x50a2ffffffffffffffffffffffffffffff), uint256(0x4d517fffffffffffffffffffffffffffff), uint256(0x4a233fffffffffffffffffffffffffffff), uint256(0x47165fffffffffffffffffffffffffffff), uint256(0x4429afffffffffffffffffffffffffffff), uint256(0x415bc7ffffffffffffffffffffffffffff), uint256(0x3eab73ffffffffffffffffffffffffffff), uint256(0x3c1771ffffffffffffffffffffffffffff), uint256(0x399e96ffffffffffffffffffffffffffff), uint256(0x373fc47fffffffffffffffffffffffffff), uint256(0x34f9e8ffffffffffffffffffffffffffff), uint256(0x32cbfd5fffffffffffffffffffffffffff), uint256(0x30b5057fffffffffffffffffffffffffff), uint256(0x2eb40f9fffffffffffffffffffffffffff), uint256(0x2cc8340fffffffffffffffffffffffffff), uint256(0x2af09481ffffffffffffffffffffffffff), uint256(0x292c5bddffffffffffffffffffffffffff), uint256(0x277abdcdffffffffffffffffffffffffff), uint256(0x25daf6657fffffffffffffffffffffffff), uint256(0x244c49c65fffffffffffffffffffffffff), uint256(0x22ce03cd5fffffffffffffffffffffffff), uint256(0x215f77c047ffffffffffffffffffffffff), uint256(0x1fffffffffffffffffffffffffffffffff), uint256(0x1eaefdbdabffffffffffffffffffffffff), uint256(0x1d6bd8b2ebffffffffffffffffffffffff), uint256(0x1c35fedd14ffffffffffffffffffffffff), uint256(0x1b0ce43b323fffffffffffffffffffffff), uint256(0x19f0028ec1ffffffffffffffffffffffff), uint256(0x18ded91f0e7fffffffffffffffffffffff), uint256(0x17d8ec7f0417ffffffffffffffffffffff), uint256(0x16ddc6556cdbffffffffffffffffffffff), uint256(0x15ecf52776a1ffffffffffffffffffffff), uint256(0x15060c256cb2ffffffffffffffffffffff), uint256(0x1428a2f98d72ffffffffffffffffffffff), uint256(0x13545598e5c23fffffffffffffffffffff), uint256(0x1288c4161ce1dfffffffffffffffffffff), uint256(0x11c592761c666fffffffffffffffffffff), uint256(0x110a688680a757ffffffffffffffffffff), uint256(0x1056f1b5bedf77ffffffffffffffffffff), uint256(0x0faadceceeff8bffffffffffffffffffff), uint256(0x0f05dc6b27edadffffffffffffffffffff), uint256(0x0e67a5a25da4107fffffffffffffffffff), uint256(0x0dcff115b14eedffffffffffffffffffff), uint256(0x0d3e7a392431239fffffffffffffffffff), uint256(0x0cb2ff529eb71e4fffffffffffffffffff), uint256(0x0c2d415c3db974afffffffffffffffffff), uint256(0x0bad03e7d883f69bffffffffffffffffff), uint256(0x0b320d03b2c343d5ffffffffffffffffff), uint256(0x0abc25204e02828dffffffffffffffffff), uint256(0x0a4b16f74ee4bb207fffffffffffffffff), uint256(0x09deaf736ac1f569ffffffffffffffffff), uint256(0x0976bd9952c7aa957fffffffffffffffff), uint256(0x09131271922eaa606fffffffffffffffff), uint256(0x08b380f3558668c46fffffffffffffffff), uint256(0x0857ddf0117efa215bffffffffffffffff), uint256(0x07ffffffffffffffffffffffffffffffff), uint256(0x07abbf6f6abb9d087fffffffffffffffff), uint256(0x075af62cbac95f7dfa7fffffffffffffff), uint256(0x070d7fb7452e187ac13fffffffffffffff), uint256(0x06c3390ecc8af379295fffffffffffffff), uint256(0x067c00a3b07ffc01fd6fffffffffffffff), uint256(0x0637b647c39cbb9d3d27ffffffffffffff), uint256(0x05f63b1fc104dbd39587ffffffffffffff), uint256(0x05b771955b36e12f7235ffffffffffffff), uint256(0x057b3d49dda84556d6f6ffffffffffffff), uint256(0x054183095b2c8ececf30ffffffffffffff), uint256(0x050a28be635ca2b888f77fffffffffffff), uint256(0x04d5156639708c9db33c3fffffffffffff), uint256(0x04a23105873875bd52dfdfffffffffffff), uint256(0x0471649d87199aa990756fffffffffffff), uint256(0x04429a21a029d4c1457cfbffffffffffff), uint256(0x0415bc6d6fb7dd71af2cb3ffffffffffff), uint256(0x03eab73b3bbfe282243ce1ffffffffffff), uint256(0x03c1771ac9fb6b4c18e229ffffffffffff), uint256(0x0399e96897690418f785257fffffffffff), uint256(0x0373fc456c53bb779bf0ea9fffffffffff), uint256(0x034f9e8e490c48e67e6ab8bfffffffffff), uint256(0x032cbfd4a7adc790560b3337ffffffffff), uint256(0x030b50570f6e5d2acca94613ffffffffff), uint256(0x02eb40f9f620fda6b56c2861ffffffffff), uint256(0x02cc8340ecb0d0f520a6af58ffffffffff), uint256(0x02af09481380a0a35cf1ba02ffffffffff), uint256(0x0292c5bdd3b92ec810287b1b3fffffffff), uint256(0x0277abdcdab07d5a77ac6d6b9fffffffff), uint256(0x025daf6654b1eaa55fd64df5efffffffff), uint256(0x0244c49c648baa98192dce88b7ffffffff), uint256(0x022ce03cd5619a311b2471268bffffffff), uint256(0x0215f77c045fbe885654a44a0fffffffff), uint256(0x01ffffffffffffffffffffffffffffffff), uint256(0x01eaefdbdaaee7421fc4d3ede5ffffffff), uint256(0x01d6bd8b2eb257df7e8ca57b09bfffffff), uint256(0x01c35fedd14b861eb0443f7f133fffffff), uint256(0x01b0ce43b322bcde4a56e8ada5afffffff), uint256(0x019f0028ec1fff007f5a195a39dfffffff), uint256(0x018ded91f0e72ee74f49b15ba527ffffff), uint256(0x017d8ec7f04136f4e5615fd41a63ffffff), uint256(0x016ddc6556cdb84bdc8d12d22e6fffffff), uint256(0x015ecf52776a1155b5bd8395814f7fffff), uint256(0x015060c256cb23b3b3cc3754cf40ffffff), uint256(0x01428a2f98d728ae223ddab715be3fffff), uint256(0x013545598e5c23276ccf0ede68034fffff), uint256(0x01288c4161ce1d6f54b7f61081194fffff), uint256(0x011c592761c666aa641d5a01a40f17ffff), uint256(0x0110a688680a7530515f3e6e6cfdcdffff), uint256(0x01056f1b5bedf75c6bcb2ce8aed428ffff), uint256(0x00faadceceeff8a0890f3875f008277fff), uint256(0x00f05dc6b27edad306388a600f6ba0bfff), uint256(0x00e67a5a25da41063de1495d5b18cdbfff), uint256(0x00dcff115b14eedde6fc3aa5353f2e4fff), uint256(0x00d3e7a3924312399f9aae2e0f868f8fff), uint256(0x00cb2ff529eb71e41582cccd5a1ee26fff), uint256(0x00c2d415c3db974ab32a51840c0b67edff), uint256(0x00bad03e7d883f69ad5b0a186184e06bff), uint256(0x00b320d03b2c343d4829abd6075f0cc5ff), uint256(0x00abc25204e02828d73c6e80bcdb1a95bf), uint256(0x00a4b16f74ee4bb2040a1ec6c15fbbf2df), uint256(0x009deaf736ac1f569deb1b5ae3f36c130f), uint256(0x00976bd9952c7aa957f5937d790ef65037), uint256(0x009131271922eaa6064b73a22d0bd4f2bf), uint256(0x008b380f3558668c46c91c49a2f8e967b9), uint256(0x00857ddf0117efa215952912839f6473e6)];\n\n        uint8 lo = MIN_PRECISION;\n        uint8 hi = MAX_PRECISION;\n\n        while (lo + 1 < hi) {\n            uint8 mid = (lo + hi) / 2;\n            if (maxExpArray[mid] >= _x)\n                lo = mid;\n            else\n                hi = mid;\n        }\n\n        if (maxExpArray[hi] >= _x)\n            return hi;\n        if (maxExpArray[lo] >= _x)\n            return lo;\n\n        require(false);\n        return 0;\n    }\n\n    /**\n        This function can be auto-generated by the script 'PrintFunctionGeneralExp.py'.\n        It approximates \"e ^ x\" via maclaurin summation: \"(x^0)/0! + (x^1)/1! + ... + (x^n)/n!\".\n        It returns \"e ^ (x / 2 ^ precision) * 2 ^ precision\", that is, the result is upshifted for accuracy.\n        The global \"maxExpArray\" maps each \"precision\" to \"((maximumExponent + 1) << (MAX_PRECISION - precision)) - 1\".\n        The maximum permitted value for \"x\" is therefore given by \"maxExpArray[precision] >> (MAX_PRECISION - precision)\".\n    */\n    function generalExp(uint256 _x, uint8 _precision) internal pure returns (uint256) {\n        uint256 xi = _x;\n        uint256 res = 0;\n\n        xi = (xi * _x) >> _precision; res += xi * 0x3442c4e6074a82f1797f72ac0000000; // add x^02 * (33! / 02!)\n        xi = (xi * _x) >> _precision; res += xi * 0x116b96f757c380fb287fd0e40000000; // add x^03 * (33! / 03!)\n        xi = (xi * _x) >> _precision; res += xi * 0x045ae5bdd5f0e03eca1ff4390000000; // add x^04 * (33! / 04!)\n        xi = (xi * _x) >> _precision; res += xi * 0x00defabf91302cd95b9ffda50000000; // add x^05 * (33! / 05!)\n        xi = (xi * _x) >> _precision; res += xi * 0x002529ca9832b22439efff9b8000000; // add x^06 * (33! / 06!)\n        xi = (xi * _x) >> _precision; res += xi * 0x00054f1cf12bd04e516b6da88000000; // add x^07 * (33! / 07!)\n        xi = (xi * _x) >> _precision; res += xi * 0x0000a9e39e257a09ca2d6db51000000; // add x^08 * (33! / 08!)\n        xi = (xi * _x) >> _precision; res += xi * 0x000012e066e7b839fa050c309000000; // add x^09 * (33! / 09!)\n        xi = (xi * _x) >> _precision; res += xi * 0x000001e33d7d926c329a1ad1a800000; // add x^10 * (33! / 10!)\n        xi = (xi * _x) >> _precision; res += xi * 0x0000002bee513bdb4a6b19b5f800000; // add x^11 * (33! / 11!)\n        xi = (xi * _x) >> _precision; res += xi * 0x00000003a9316fa79b88eccf2a00000; // add x^12 * (33! / 12!)\n        xi = (xi * _x) >> _precision; res += xi * 0x0000000048177ebe1fa812375200000; // add x^13 * (33! / 13!)\n        xi = (xi * _x) >> _precision; res += xi * 0x0000000005263fe90242dcbacf00000; // add x^14 * (33! / 14!)\n        xi = (xi * _x) >> _precision; res += xi * 0x000000000057e22099c030d94100000; // add x^15 * (33! / 15!)\n        xi = (xi * _x) >> _precision; res += xi * 0x0000000000057e22099c030d9410000; // add x^16 * (33! / 16!)\n        xi = (xi * _x) >> _precision; res += xi * 0x00000000000052b6b54569976310000; // add x^17 * (33! / 17!)\n        xi = (xi * _x) >> _precision; res += xi * 0x00000000000004985f67696bf748000; // add x^18 * (33! / 18!)\n        xi = (xi * _x) >> _precision; res += xi * 0x000000000000003dea12ea99e498000; // add x^19 * (33! / 19!)\n        xi = (xi * _x) >> _precision; res += xi * 0x00000000000000031880f2214b6e000; // add x^20 * (33! / 20!)\n        xi = (xi * _x) >> _precision; res += xi * 0x000000000000000025bcff56eb36000; // add x^21 * (33! / 21!)\n        xi = (xi * _x) >> _precision; res += xi * 0x000000000000000001b722e10ab1000; // add x^22 * (33! / 22!)\n        xi = (xi * _x) >> _precision; res += xi * 0x0000000000000000001317c70077000; // add x^23 * (33! / 23!)\n        xi = (xi * _x) >> _precision; res += xi * 0x00000000000000000000cba84aafa00; // add x^24 * (33! / 24!)\n        xi = (xi * _x) >> _precision; res += xi * 0x00000000000000000000082573a0a00; // add x^25 * (33! / 25!)\n        xi = (xi * _x) >> _precision; res += xi * 0x00000000000000000000005035ad900; // add x^26 * (33! / 26!)\n        xi = (xi * _x) >> _precision; res += xi * 0x000000000000000000000002f881b00; // add x^27 * (33! / 27!)\n        xi = (xi * _x) >> _precision; res += xi * 0x0000000000000000000000001b29340; // add x^28 * (33! / 28!)\n        xi = (xi * _x) >> _precision; res += xi * 0x00000000000000000000000000efc40; // add x^29 * (33! / 29!)\n        xi = (xi * _x) >> _precision; res += xi * 0x0000000000000000000000000007fe0; // add x^30 * (33! / 30!)\n        xi = (xi * _x) >> _precision; res += xi * 0x0000000000000000000000000000420; // add x^31 * (33! / 31!)\n        xi = (xi * _x) >> _precision; res += xi * 0x0000000000000000000000000000021; // add x^32 * (33! / 32!)\n        xi = (xi * _x) >> _precision; res += xi * 0x0000000000000000000000000000001; // add x^33 * (33! / 33!)\n\n        return res / 0x688589cc0e9505e2f2fee5580000000 + _x + (ONE << _precision); // divide by 33! and then add x^1 / 1! + x^0 / 0!\n    }\n\n    /**\n        Return log(x / FIXED_1) * FIXED_1\n        Input range: FIXED_1 <= x <= LOG_EXP_MAX_VAL - 1\n        Auto-generated via 'PrintFunctionOptimalLog.py'\n        Detailed description:\n        - Rewrite the input as a product of natural exponents and a single residual r, such that 1 < r < 2\n        - The natural logarithm of each (pre-calculated) exponent is the degree of the exponent\n        - The natural logarithm of r is calculated via Taylor series for log(1 + x), where x = r - 1\n        - The natural logarithm of the input is calculated by summing up the intermediate results above\n        - For example: log(250) = log(e^4 * e^1 * e^0.5 * 1.021692859) = 4 + 1 + 0.5 + log(1 + 0.021692859)\n    */\n    function optimalLog(uint256 x) internal pure returns (uint256) {\n        uint256 res = 0;\n\n        uint256 y;\n        uint256 z;\n        uint256 w;\n\n        if (x >= 0xd3094c70f034de4b96ff7d5b6f99fcd8) {res += 0x40000000000000000000000000000000; x = x * FIXED_1 / 0xd3094c70f034de4b96ff7d5b6f99fcd8;} // add 1 / 2^1\n        if (x >= 0xa45af1e1f40c333b3de1db4dd55f29a7) {res += 0x20000000000000000000000000000000; x = x * FIXED_1 / 0xa45af1e1f40c333b3de1db4dd55f29a7;} // add 1 / 2^2\n        if (x >= 0x910b022db7ae67ce76b441c27035c6a1) {res += 0x10000000000000000000000000000000; x = x * FIXED_1 / 0x910b022db7ae67ce76b441c27035c6a1;} // add 1 / 2^3\n        if (x >= 0x88415abbe9a76bead8d00cf112e4d4a8) {res += 0x08000000000000000000000000000000; x = x * FIXED_1 / 0x88415abbe9a76bead8d00cf112e4d4a8;} // add 1 / 2^4\n        if (x >= 0x84102b00893f64c705e841d5d4064bd3) {res += 0x04000000000000000000000000000000; x = x * FIXED_1 / 0x84102b00893f64c705e841d5d4064bd3;} // add 1 / 2^5\n        if (x >= 0x8204055aaef1c8bd5c3259f4822735a2) {res += 0x02000000000000000000000000000000; x = x * FIXED_1 / 0x8204055aaef1c8bd5c3259f4822735a2;} // add 1 / 2^6\n        if (x >= 0x810100ab00222d861931c15e39b44e99) {res += 0x01000000000000000000000000000000; x = x * FIXED_1 / 0x810100ab00222d861931c15e39b44e99;} // add 1 / 2^7\n        if (x >= 0x808040155aabbbe9451521693554f733) {res += 0x00800000000000000000000000000000; x = x * FIXED_1 / 0x808040155aabbbe9451521693554f733;} // add 1 / 2^8\n\n        z = y = x - FIXED_1;\n        w = y * y / FIXED_1;\n        res += z * (0x100000000000000000000000000000000 - y) / 0x100000000000000000000000000000000; z = z * w / FIXED_1; // add y^01 / 01 - y^02 / 02\n        res += z * (0x0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - y) / 0x200000000000000000000000000000000; z = z * w / FIXED_1; // add y^03 / 03 - y^04 / 04\n        res += z * (0x099999999999999999999999999999999 - y) / 0x300000000000000000000000000000000; z = z * w / FIXED_1; // add y^05 / 05 - y^06 / 06\n        res += z * (0x092492492492492492492492492492492 - y) / 0x400000000000000000000000000000000; z = z * w / FIXED_1; // add y^07 / 07 - y^08 / 08\n        res += z * (0x08e38e38e38e38e38e38e38e38e38e38e - y) / 0x500000000000000000000000000000000; z = z * w / FIXED_1; // add y^09 / 09 - y^10 / 10\n        res += z * (0x08ba2e8ba2e8ba2e8ba2e8ba2e8ba2e8b - y) / 0x600000000000000000000000000000000; z = z * w / FIXED_1; // add y^11 / 11 - y^12 / 12\n        res += z * (0x089d89d89d89d89d89d89d89d89d89d89 - y) / 0x700000000000000000000000000000000; z = z * w / FIXED_1; // add y^13 / 13 - y^14 / 14\n        res += z * (0x088888888888888888888888888888888 - y) / 0x800000000000000000000000000000000;                      // add y^15 / 15 - y^16 / 16\n\n        return res;\n    }\n\n    /**\n        Return e ^ (x / FIXED_1) * FIXED_1\n        Input range: 0 <= x <= OPT_EXP_MAX_VAL - 1\n        Auto-generated via 'PrintFunctionOptimalExp.py'\n        Detailed description:\n        - Rewrite the input as a sum of binary exponents and a single residual r, as small as possible\n        - The exponentiation of each binary exponent is given (pre-calculated)\n        - The exponentiation of r is calculated via Taylor series for e^x, where x = r\n        - The exponentiation of the input is calculated by multiplying the intermediate results above\n        - For example: e^5.521692859 = e^(4 + 1 + 0.5 + 0.021692859) = e^4 * e^1 * e^0.5 * e^0.021692859\n    */\n    function optimalExp(uint256 x) internal pure returns (uint256) {\n        uint256 res = 0;\n\n        uint256 y;\n        uint256 z;\n\n        z = y = x % 0x10000000000000000000000000000000; // get the input modulo 2^(-3)\n        z = z * y / FIXED_1; res += z * 0x10e1b3be415a0000; // add y^02 * (20! / 02!)\n        z = z * y / FIXED_1; res += z * 0x05a0913f6b1e0000; // add y^03 * (20! / 03!)\n        z = z * y / FIXED_1; res += z * 0x0168244fdac78000; // add y^04 * (20! / 04!)\n        z = z * y / FIXED_1; res += z * 0x004807432bc18000; // add y^05 * (20! / 05!)\n        z = z * y / FIXED_1; res += z * 0x000c0135dca04000; // add y^06 * (20! / 06!)\n        z = z * y / FIXED_1; res += z * 0x0001b707b1cdc000; // add y^07 * (20! / 07!)\n        z = z * y / FIXED_1; res += z * 0x000036e0f639b800; // add y^08 * (20! / 08!)\n        z = z * y / FIXED_1; res += z * 0x00000618fee9f800; // add y^09 * (20! / 09!)\n        z = z * y / FIXED_1; res += z * 0x0000009c197dcc00; // add y^10 * (20! / 10!)\n        z = z * y / FIXED_1; res += z * 0x0000000e30dce400; // add y^11 * (20! / 11!)\n        z = z * y / FIXED_1; res += z * 0x000000012ebd1300; // add y^12 * (20! / 12!)\n        z = z * y / FIXED_1; res += z * 0x0000000017499f00; // add y^13 * (20! / 13!)\n        z = z * y / FIXED_1; res += z * 0x0000000001a9d480; // add y^14 * (20! / 14!)\n        z = z * y / FIXED_1; res += z * 0x00000000001c6380; // add y^15 * (20! / 15!)\n        z = z * y / FIXED_1; res += z * 0x000000000001c638; // add y^16 * (20! / 16!)\n        z = z * y / FIXED_1; res += z * 0x0000000000001ab8; // add y^17 * (20! / 17!)\n        z = z * y / FIXED_1; res += z * 0x000000000000017c; // add y^18 * (20! / 18!)\n        z = z * y / FIXED_1; res += z * 0x0000000000000014; // add y^19 * (20! / 19!)\n        z = z * y / FIXED_1; res += z * 0x0000000000000001; // add y^20 * (20! / 20!)\n        res = res / 0x21c3677c82b40000 + y + FIXED_1; // divide by 20! and then add y^1 / 1! + y^0 / 0!\n\n        if ((x & 0x010000000000000000000000000000000) != 0) res = res * 0x1c3d6a24ed82218787d624d3e5eba95f9 / 0x18ebef9eac820ae8682b9793ac6d1e776; // multiply by e^2^(-3)\n        if ((x & 0x020000000000000000000000000000000) != 0) res = res * 0x18ebef9eac820ae8682b9793ac6d1e778 / 0x1368b2fc6f9609fe7aceb46aa619baed4; // multiply by e^2^(-2)\n        if ((x & 0x040000000000000000000000000000000) != 0) res = res * 0x1368b2fc6f9609fe7aceb46aa619baed5 / 0x0bc5ab1b16779be3575bd8f0520a9f21f; // multiply by e^2^(-1)\n        if ((x & 0x080000000000000000000000000000000) != 0) res = res * 0x0bc5ab1b16779be3575bd8f0520a9f21e / 0x0454aaa8efe072e7f6ddbab84b40a55c9; // multiply by e^2^(+0)\n        if ((x & 0x100000000000000000000000000000000) != 0) res = res * 0x0454aaa8efe072e7f6ddbab84b40a55c5 / 0x00960aadc109e7a3bf4578099615711ea; // multiply by e^2^(+1)\n        if ((x & 0x200000000000000000000000000000000) != 0) res = res * 0x00960aadc109e7a3bf4578099615711d7 / 0x0002bf84208204f5977f9a8cf01fdce3d; // multiply by e^2^(+2)\n        if ((x & 0x400000000000000000000000000000000) != 0) res = res * 0x0002bf84208204f5977f9a8cf01fdc307 / 0x0000003c6ab775dd0b95b4cbee7e65d11; // multiply by e^2^(+3)\n\n        return res;\n    }\n}\n",
        "voting/IVoting.sol": "interface IVoting {\n    function userWinningTokens(uint, address) external view returns (bool, uint);\n}",
        "event/EventEmitter.sol": "pragma solidity ^0.5.0;\n\nimport \"../base/Authorizable.sol\";\n\n/** @title EventEmitter\n    @author Freydal\n    @dev A central event emitting contract supporting the Kosu contract system.\n*/\ncontract EventEmitter is Authorizable {\n\n    // Generic Kosu Event\n    event KosuEvent(string eventType, bytes32[] data, string stringData);\n\n    /** @dev Event emitter instantiated with Authorizable.\n        @notice Event emitter instantiated with Authorizable.\n        @param auth AuthorizedAddresses deployed address.\n    */\n    constructor(address auth) Authorizable(auth) public {\n    }\n\n    /** @dev Emits a standard event from the Kosu contract system.  The events can be decoded though the Kosu.js library.\n        @notice Emits a standard event from the Kosu contract system.  The events can be decoded though the Kosu.js library.\n        @param eventType String name/type of event.\n        @param data Bytes32 encoded data to be emitted.\n        @param stringData String containing optional additional information.\n    */\n    function emitEvent(string calldata eventType, bytes32[] calldata data, string calldata stringData) external isAuthorized {\n        emit KosuEvent(eventType, data, stringData);\n    }\n}\n\n\n\n"
    },
    "sourceTreeHashHex": "0x2fe57aeac28519f4bcbfe4c85f09efb5873561a8946ade69293964d3bb850efa",
    "compiler": {
        "name": "solc",
        "version": "soljson-v0.5.11+commit.c082d0b4.js",
        "settings": {
            "optimizer": {
                "enabled": true,
                "runs": 200,
                "details": {
                    "yul": true,
                    "deduplicate": true,
                    "cse": true,
                    "constantOptimizer": true
                }
            },
            "outputSelection": {
                "*": {
                    "*": [
                        "abi",
                        "devdoc",
                        "evm.bytecode.object",
                        "evm.bytecode.sourceMap",
                        "evm.deployedBytecode.object",
                        "evm.deployedBytecode.sourceMap"
                    ]
                }
            },
            "evmVersion": "constantinople",
            "remappings": [
                "openzeppelin-solidity=/Users/hen/GitHub/km/node_modules/openzeppelin-solidity"
            ]
        }
    },
    "networks": {}
}
