{
    "schemaVersion": "2.0.0",
    "contractName": "DydxBridge",
    "compilerOutput": {
        "abi": [
            {
                "anonymous": false,
                "inputs": [
                    {
                        "indexed": false,
                        "internalType": "address",
                        "name": "inputToken",
                        "type": "address"
                    },
                    {
                        "indexed": false,
                        "internalType": "address",
                        "name": "outputToken",
                        "type": "address"
                    },
                    {
                        "indexed": false,
                        "internalType": "uint256",
                        "name": "inputTokenAmount",
                        "type": "uint256"
                    },
                    {
                        "indexed": false,
                        "internalType": "uint256",
                        "name": "outputTokenAmount",
                        "type": "uint256"
                    },
                    {
                        "indexed": false,
                        "internalType": "address",
                        "name": "from",
                        "type": "address"
                    },
                    {
                        "indexed": false,
                        "internalType": "address",
                        "name": "to",
                        "type": "address"
                    }
                ],
                "name": "ERC20BridgeTransfer",
                "type": "event"
            },
            {
                "constant": false,
                "inputs": [
                    {
                        "internalType": "address",
                        "name": "",
                        "type": "address"
                    },
                    {
                        "internalType": "address",
                        "name": "from",
                        "type": "address"
                    },
                    {
                        "internalType": "address",
                        "name": "to",
                        "type": "address"
                    },
                    {
                        "internalType": "uint256",
                        "name": "amount",
                        "type": "uint256"
                    },
                    {
                        "internalType": "bytes",
                        "name": "encodedBridgeData",
                        "type": "bytes"
                    }
                ],
                "name": "bridgeTransferFrom",
                "outputs": [
                    {
                        "internalType": "bytes4",
                        "name": "success",
                        "type": "bytes4"
                    }
                ],
                "payable": false,
                "stateMutability": "nonpayable",
                "type": "function"
            }
        ],
        "devdoc": {
            "methods": {
                "bridgeTransferFrom(address,address,address,uint256,bytes)": {
                    "details": "Callback for `IERC20Bridge`. Deposits or withdraws tokens from a dydx account.      Notes:         1. This bridge must be set as an operator of the input dydx account.         2. This function may only be called in the context of the 0x Exchange.         3. The maker or taker of the 0x order must be the dydx account owner.         4. Deposits into dydx are made from the `from` address.         5. Withdrawals from dydx are made to the `to` address.         6. Calling this function must always withdraw at least `amount`,            otherwise the `ERC20Bridge` will revert.",
                    "params": {
                        "amount": "Minimum amount of `toTokenAddress` tokens to deposit or withdraw.",
                        "encodedBridgeData": "An abi-encoded `BridgeData` struct.",
                        "from": "The sender of the tokens and owner of the dydx account.",
                        "to": "The recipient of the tokens."
                    },
                    "return": "success The magic bytes if successful."
                }
            }
        },
        "evm": {
            "bytecode": {
                "linkReferences": {},
                "object": "0x608060405234801561001057600080fd5b50610e1c806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063c2df82e614610030575b600080fd5b61004361003e3660046108a1565b610059565b6040516100509190610c53565b60405180910390f35b60006100636101a7565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146100d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100c790610ca2565b60405180910390fd5b6100d86106d8565b6100e48385018561094b565b905060606100f288836101bf565b9050606061010289898986610275565b905061010c6103b2565b73ffffffffffffffffffffffffffffffffffffffff1663a67a6a4583836040518363ffffffff1660e01b8152600401610146929190610b96565b600060405180830381600087803b15801561016057600080fd5b505af1158015610174573d6000803e3d6000fd5b507fdc1600f3000000000000000000000000000000000000000000000000000000009d9c50505050505050505050505050565b738ed95d1746bf1e4dab58d8ed4724f1ef95b20db090565b80518051604080518281526020808402820101909152606092919081801561020157816020015b6101ee6106f2565b8152602001906001900390816101e65790505b50925060005b8181101561026c5760405180604001604052808773ffffffffffffffffffffffffffffffffffffffff16815260200184838151811061024257fe5b602002602001015181525084828151811061025957fe5b6020908102919091010152600101610207565b50505092915050565b602080820151805160408051828152828502810190940190526060928180156102b857816020015b6102a5610709565b81526020019060019003908161029d5790505b50925060005b818110156103a7576102ce610768565b8382815181106102da57fe5b602002602001015190506000808260800151111561030c57610305826060015183608001518a6103ca565b905061030f565b50865b60008251600181111561031e57fe5b141561034b5761032f8a8284610419565b86848151811061033b57fe5b602002602001018190525061039d565b60018251600181111561035a57fe5b141561036b5761032f8982846104c6565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100c790610cff565b50506001016102be565b505050949350505050565b731e0447b19bb6ecfdae1e4ae1694b0c3659614e4e90565b60006103d784848461050b565b156103ef576103ef6103ea858585610571565b610616565b61040f83610403868563ffffffff61061e16565b9063ffffffff61065816565b90505b9392505050565b610421610709565b610429610798565b6040805160808101909152600181526020810160008152602001600081526020018590526040805161010081019091529091508060005b81526020018460200151815260200182815260200184604001518152602001600081526020018673ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001604051806020016040528060008152508152509150509392505050565b6104ce610709565b6104d6610798565b506040805160808101825260008082526020820181905281830152606081018590528151610100810190925290806001610460565b60008261051d5761051d6103ea610682565b811580610528575083155b1561053557506000610412565b6000838061053f57fe5b8584099050610554858463ffffffff61061e16565b610566826103e863ffffffff61061e16565b101595945050505050565b606063339f3de260e01b84848460405160240161059093929190610d5c565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915290509392505050565b805160208201fd5b60008261062d57506000610652565b8282028284828161063a57fe5b041461064f5761064f6103ea600186866106b9565b90505b92915050565b60008161066e5761066e6103ea600385856106b9565b600082848161067957fe5b04949350505050565b60408051808201909152600481527fa791837c00000000000000000000000000000000000000000000000000000000602082015290565b606063e946c1bb60e01b84848460405160240161059093929190610c80565b604051806040016040528060608152602001606081525090565b604080518082019091526000808252602082015290565b604080516101008101825260008082526020820152908101610729610798565b81526020016000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001606081525090565b6040805160a081019091528060008152602001600081526020016000815260200160008152602001600081525090565b604080516080810190915260008082526020820190815260200160008152602001600081525090565b803573ffffffffffffffffffffffffffffffffffffffff8116811461065257600080fd5b600082601f8301126107f5578081fd5b813561080861080382610d99565b610d72565b818152915060208083019084810160a084028601820187101561082a57600080fd5b60005b848110156108965760a0828903121561084557600080fd5b61084f60a0610d72565b823561085a81610dc9565b8152828401358482015260408084013590820152606080840135908201526080808401359082015284529282019260a09091019060010161082d565b505050505092915050565b60008060008060008060a087890312156108b9578182fd5b6108c388886107c1565b95506108d288602089016107c1565b94506108e188604089016107c1565b935060608701359250608087013567ffffffffffffffff80821115610904578384fd5b8189018a601f820112610915578485fd5b8035925081831115610925578485fd5b8a6020848301011115610936578485fd5b979a9699509497509295602001949293505050565b6000602080838503121561095d578182fd5b823567ffffffffffffffff80821115610974578384fd5b81850160408188031215610986578485fd5b6109906040610d72565b92508035828111156109a0578586fd5b80820188601f8201126109b1578687fd5b803591506109c161080383610d99565b82815286810190828801888502840189018c10156109dd57898afd5b8993505b848410156109ff5780358352600193909301929188019188016109e1565b5086525050508084013582811115610a15578586fd5b610a21888284016107e5565b85850152505050809250505092915050565b73ffffffffffffffffffffffffffffffffffffffff169052565b60008151808452815b81811015610a7257602081850181015186830182015201610a56565b81811115610a835782602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b805173ffffffffffffffffffffffffffffffffffffffff168252602090810151910152565b6000610160825160098110610aec57fe5b80855250602083015160208501526040830151610b0c6040860182610b61565b50606083015160c0850152608083015160e085015260a0830151610b34610100860182610a33565b5060c083015161012085015260e083015181610140860152610b5882860182610a4d565b95945050505050565b805115158252610b746020820151610db9565b6020830152610b866040820151610db9565b6040830152606090810151910152565b604080825283519082018190526000906020906060840190828701845b82811015610bd957610bc6848351610ab6565b6040939093019290840190600101610bb3565b5050508381038285015284518082528282019080840283018401878501865b83811015610c44577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0868403018552610c32838351610adb565b94870194925090860190600101610bf8565b50909998505050505050505050565b7fffffffff0000000000000000000000000000000000000000000000000000000091909116815260200190565b6060810160048510610c8e57fe5b938152602081019290925260409091015290565b6020808252602e908201527f447964784272696467652f4f4e4c595f43414c4c41424c455f42595f4552433260408201527f305f4252494447455f50524f5859000000000000000000000000000000000000606082015260800190565b60208082526025908201527f447964784272696467652f554e5245434f474e495a45445f4252494447455f4160408201527f4354494f4e000000000000000000000000000000000000000000000000000000606082015260800190565b9283526020830191909152604082015260600190565b60405181810167ffffffffffffffff81118282101715610d9157600080fd5b604052919050565b600067ffffffffffffffff821115610daf578081fd5b5060209081020190565b8060028110610dc457fe5b919050565b60028110610dd657600080fd5b5056fea365627a7a7231582007e98d883659b747d41e8346ac88cbe6d6853952bd5d0904d924c15c095ff3526c6578706572696d656e74616cf564736f6c63430005110040",
                "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xE1C DUP1 PUSH2 0x20 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 0x2B JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0xC2DF82E6 EQ PUSH2 0x30 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x43 PUSH2 0x3E CALLDATASIZE PUSH1 0x4 PUSH2 0x8A1 JUMP JUMPDEST PUSH2 0x59 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x50 SWAP2 SWAP1 PUSH2 0xC53 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 PUSH2 0x63 PUSH2 0x1A7 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0xD0 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xC7 SWAP1 PUSH2 0xCA2 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0xD8 PUSH2 0x6D8 JUMP JUMPDEST PUSH2 0xE4 DUP4 DUP6 ADD DUP6 PUSH2 0x94B JUMP JUMPDEST SWAP1 POP PUSH1 0x60 PUSH2 0xF2 DUP9 DUP4 PUSH2 0x1BF JUMP JUMPDEST SWAP1 POP PUSH1 0x60 PUSH2 0x102 DUP10 DUP10 DUP10 DUP7 PUSH2 0x275 JUMP JUMPDEST SWAP1 POP PUSH2 0x10C PUSH2 0x3B2 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH4 0xA67A6A45 DUP4 DUP4 PUSH1 0x40 MLOAD DUP4 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x146 SWAP3 SWAP2 SWAP1 PUSH2 0xB96 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x160 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x174 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP PUSH32 0xDC1600F300000000000000000000000000000000000000000000000000000000 SWAP14 SWAP13 POP POP POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH20 0x8ED95D1746BF1E4DAB58D8ED4724F1EF95B20DB0 SWAP1 JUMP JUMPDEST DUP1 MLOAD DUP1 MLOAD PUSH1 0x40 DUP1 MLOAD DUP3 DUP2 MSTORE PUSH1 0x20 DUP1 DUP5 MUL DUP3 ADD ADD SWAP1 SWAP2 MSTORE PUSH1 0x60 SWAP3 SWAP2 SWAP1 DUP2 DUP1 ISZERO PUSH2 0x201 JUMPI DUP2 PUSH1 0x20 ADD JUMPDEST PUSH2 0x1EE PUSH2 0x6F2 JUMP JUMPDEST DUP2 MSTORE PUSH1 0x20 ADD SWAP1 PUSH1 0x1 SWAP1 SUB SWAP1 DUP2 PUSH2 0x1E6 JUMPI SWAP1 POP JUMPDEST POP SWAP3 POP PUSH1 0x0 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x26C JUMPI PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 DUP8 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP5 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x242 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP2 MSTORE POP DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x259 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x207 JUMP JUMPDEST POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 ADD MLOAD DUP1 MLOAD PUSH1 0x40 DUP1 MLOAD DUP3 DUP2 MSTORE DUP3 DUP6 MUL DUP2 ADD SWAP1 SWAP5 ADD SWAP1 MSTORE PUSH1 0x60 SWAP3 DUP2 DUP1 ISZERO PUSH2 0x2B8 JUMPI DUP2 PUSH1 0x20 ADD JUMPDEST PUSH2 0x2A5 PUSH2 0x709 JUMP JUMPDEST DUP2 MSTORE PUSH1 0x20 ADD SWAP1 PUSH1 0x1 SWAP1 SUB SWAP1 DUP2 PUSH2 0x29D JUMPI SWAP1 POP JUMPDEST POP SWAP3 POP PUSH1 0x0 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x3A7 JUMPI PUSH2 0x2CE PUSH2 0x768 JUMP JUMPDEST DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x2DA JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 DUP1 DUP3 PUSH1 0x80 ADD MLOAD GT ISZERO PUSH2 0x30C JUMPI PUSH2 0x305 DUP3 PUSH1 0x60 ADD MLOAD DUP4 PUSH1 0x80 ADD MLOAD DUP11 PUSH2 0x3CA JUMP JUMPDEST SWAP1 POP PUSH2 0x30F JUMP JUMPDEST POP DUP7 JUMPDEST PUSH1 0x0 DUP3 MLOAD PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x31E JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x34B JUMPI PUSH2 0x32F DUP11 DUP3 DUP5 PUSH2 0x419 JUMP JUMPDEST DUP7 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x33B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 SWAP1 MSTORE POP PUSH2 0x39D JUMP JUMPDEST PUSH1 0x1 DUP3 MLOAD PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x35A JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x36B JUMPI PUSH2 0x32F DUP10 DUP3 DUP5 PUSH2 0x4C6 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xC7 SWAP1 PUSH2 0xCFF JUMP JUMPDEST POP POP PUSH1 0x1 ADD PUSH2 0x2BE JUMP JUMPDEST POP POP POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH20 0x1E0447B19BB6ECFDAE1E4AE1694B0C3659614E4E SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x3D7 DUP5 DUP5 DUP5 PUSH2 0x50B JUMP JUMPDEST ISZERO PUSH2 0x3EF JUMPI PUSH2 0x3EF PUSH2 0x3EA DUP6 DUP6 DUP6 PUSH2 0x571 JUMP JUMPDEST PUSH2 0x616 JUMP JUMPDEST PUSH2 0x40F DUP4 PUSH2 0x403 DUP7 DUP6 PUSH4 0xFFFFFFFF PUSH2 0x61E AND JUMP JUMPDEST SWAP1 PUSH4 0xFFFFFFFF PUSH2 0x658 AND JUMP JUMPDEST SWAP1 POP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH2 0x421 PUSH2 0x709 JUMP JUMPDEST PUSH2 0x429 PUSH2 0x798 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x80 DUP2 ADD SWAP1 SWAP2 MSTORE PUSH1 0x1 DUP2 MSTORE PUSH1 0x20 DUP2 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD DUP6 SWAP1 MSTORE PUSH1 0x40 DUP1 MLOAD PUSH2 0x100 DUP2 ADD SWAP1 SWAP2 MSTORE SWAP1 SWAP2 POP DUP1 PUSH1 0x0 JUMPDEST DUP2 MSTORE PUSH1 0x20 ADD DUP5 PUSH1 0x20 ADD MLOAD DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP2 MSTORE PUSH1 0x20 ADD DUP5 PUSH1 0x40 ADD MLOAD DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD DUP7 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP DUP2 MSTORE POP SWAP2 POP POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH2 0x4CE PUSH2 0x709 JUMP JUMPDEST PUSH2 0x4D6 PUSH2 0x798 JUMP JUMPDEST POP PUSH1 0x40 DUP1 MLOAD PUSH1 0x80 DUP2 ADD DUP3 MSTORE PUSH1 0x0 DUP1 DUP3 MSTORE PUSH1 0x20 DUP3 ADD DUP2 SWAP1 MSTORE DUP2 DUP4 ADD MSTORE PUSH1 0x60 DUP2 ADD DUP6 SWAP1 MSTORE DUP2 MLOAD PUSH2 0x100 DUP2 ADD SWAP1 SWAP3 MSTORE SWAP1 DUP1 PUSH1 0x1 PUSH2 0x460 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH2 0x51D JUMPI PUSH2 0x51D PUSH2 0x3EA PUSH2 0x682 JUMP JUMPDEST DUP2 ISZERO DUP1 PUSH2 0x528 JUMPI POP DUP4 ISZERO JUMPDEST ISZERO PUSH2 0x535 JUMPI POP PUSH1 0x0 PUSH2 0x412 JUMP JUMPDEST PUSH1 0x0 DUP4 DUP1 PUSH2 0x53F JUMPI INVALID JUMPDEST DUP6 DUP5 MULMOD SWAP1 POP PUSH2 0x554 DUP6 DUP5 PUSH4 0xFFFFFFFF PUSH2 0x61E AND JUMP JUMPDEST PUSH2 0x566 DUP3 PUSH2 0x3E8 PUSH4 0xFFFFFFFF PUSH2 0x61E AND JUMP JUMPDEST LT ISZERO SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH4 0x339F3DE2 PUSH1 0xE0 SHL DUP5 DUP5 DUP5 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x590 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0xD5C JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 SWAP1 MSTORE PUSH1 0x20 DUP2 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP1 SWAP4 AND SWAP3 SWAP1 SWAP3 OR SWAP1 SWAP2 MSTORE SWAP1 POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST DUP1 MLOAD PUSH1 0x20 DUP3 ADD REVERT JUMPDEST PUSH1 0x0 DUP3 PUSH2 0x62D JUMPI POP PUSH1 0x0 PUSH2 0x652 JUMP JUMPDEST DUP3 DUP3 MUL DUP3 DUP5 DUP3 DUP2 PUSH2 0x63A JUMPI INVALID JUMPDEST DIV EQ PUSH2 0x64F JUMPI PUSH2 0x64F PUSH2 0x3EA PUSH1 0x1 DUP7 DUP7 PUSH2 0x6B9 JUMP JUMPDEST SWAP1 POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH2 0x66E JUMPI PUSH2 0x66E PUSH2 0x3EA PUSH1 0x3 DUP6 DUP6 PUSH2 0x6B9 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP5 DUP2 PUSH2 0x679 JUMPI INVALID JUMPDEST DIV SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x4 DUP2 MSTORE PUSH32 0xA791837C00000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x60 PUSH4 0xE946C1BB PUSH1 0xE0 SHL DUP5 DUP5 DUP5 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x590 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0xC80 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x0 DUP1 DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH2 0x100 DUP2 ADD DUP3 MSTORE PUSH1 0x0 DUP1 DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE SWAP1 DUP2 ADD PUSH2 0x729 PUSH2 0x798 JUMP JUMPDEST DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0xA0 DUP2 ADD SWAP1 SWAP2 MSTORE DUP1 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 DUP1 MLOAD PUSH1 0x80 DUP2 ADD SWAP1 SWAP2 MSTORE PUSH1 0x0 DUP1 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST DUP1 CALLDATALOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x652 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x7F5 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x808 PUSH2 0x803 DUP3 PUSH2 0xD99 JUMP JUMPDEST PUSH2 0xD72 JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD PUSH1 0xA0 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH2 0x82A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x896 JUMPI PUSH1 0xA0 DUP3 DUP10 SUB SLT ISZERO PUSH2 0x845 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x84F PUSH1 0xA0 PUSH2 0xD72 JUMP JUMPDEST DUP3 CALLDATALOAD PUSH2 0x85A DUP2 PUSH2 0xDC9 JUMP JUMPDEST DUP2 MSTORE DUP3 DUP5 ADD CALLDATALOAD DUP5 DUP3 ADD MSTORE PUSH1 0x40 DUP1 DUP5 ADD CALLDATALOAD SWAP1 DUP3 ADD MSTORE PUSH1 0x60 DUP1 DUP5 ADD CALLDATALOAD SWAP1 DUP3 ADD MSTORE PUSH1 0x80 DUP1 DUP5 ADD CALLDATALOAD SWAP1 DUP3 ADD MSTORE DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 PUSH1 0xA0 SWAP1 SWAP2 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x82D JUMP JUMPDEST POP POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0xA0 DUP8 DUP10 SUB SLT ISZERO PUSH2 0x8B9 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x8C3 DUP9 DUP9 PUSH2 0x7C1 JUMP JUMPDEST SWAP6 POP PUSH2 0x8D2 DUP9 PUSH1 0x20 DUP10 ADD PUSH2 0x7C1 JUMP JUMPDEST SWAP5 POP PUSH2 0x8E1 DUP9 PUSH1 0x40 DUP10 ADD PUSH2 0x7C1 JUMP JUMPDEST SWAP4 POP PUSH1 0x60 DUP8 ADD CALLDATALOAD SWAP3 POP PUSH1 0x80 DUP8 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x904 JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 DUP10 ADD DUP11 PUSH1 0x1F DUP3 ADD SLT PUSH2 0x915 JUMPI DUP5 DUP6 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP3 POP DUP2 DUP4 GT ISZERO PUSH2 0x925 JUMPI DUP5 DUP6 REVERT JUMPDEST DUP11 PUSH1 0x20 DUP5 DUP4 ADD ADD GT ISZERO PUSH2 0x936 JUMPI DUP5 DUP6 REVERT JUMPDEST SWAP8 SWAP11 SWAP7 SWAP10 POP SWAP5 SWAP8 POP SWAP3 SWAP6 PUSH1 0x20 ADD SWAP5 SWAP3 SWAP4 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x95D JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x974 JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 DUP6 ADD PUSH1 0x40 DUP2 DUP9 SUB SLT ISZERO PUSH2 0x986 JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0x990 PUSH1 0x40 PUSH2 0xD72 JUMP JUMPDEST SWAP3 POP DUP1 CALLDATALOAD DUP3 DUP2 GT ISZERO PUSH2 0x9A0 JUMPI DUP6 DUP7 REVERT JUMPDEST DUP1 DUP3 ADD DUP9 PUSH1 0x1F DUP3 ADD SLT PUSH2 0x9B1 JUMPI DUP7 DUP8 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP2 POP PUSH2 0x9C1 PUSH2 0x803 DUP4 PUSH2 0xD99 JUMP JUMPDEST DUP3 DUP2 MSTORE DUP7 DUP2 ADD SWAP1 DUP3 DUP9 ADD DUP9 DUP6 MUL DUP5 ADD DUP10 ADD DUP13 LT ISZERO PUSH2 0x9DD JUMPI DUP10 DUP11 REVERT JUMPDEST DUP10 SWAP4 POP JUMPDEST DUP5 DUP5 LT ISZERO PUSH2 0x9FF JUMPI DUP1 CALLDATALOAD DUP4 MSTORE PUSH1 0x1 SWAP4 SWAP1 SWAP4 ADD SWAP3 SWAP2 DUP9 ADD SWAP2 DUP9 ADD PUSH2 0x9E1 JUMP JUMPDEST POP DUP7 MSTORE POP POP POP DUP1 DUP5 ADD CALLDATALOAD DUP3 DUP2 GT ISZERO PUSH2 0xA15 JUMPI DUP6 DUP7 REVERT JUMPDEST PUSH2 0xA21 DUP9 DUP3 DUP5 ADD PUSH2 0x7E5 JUMP JUMPDEST DUP6 DUP6 ADD MSTORE POP POP POP DUP1 SWAP3 POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 MSTORE JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE DUP2 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0xA72 JUMPI PUSH1 0x20 DUP2 DUP6 ADD DUP2 ADD MLOAD DUP7 DUP4 ADD DUP3 ADD MSTORE ADD PUSH2 0xA56 JUMP JUMPDEST DUP2 DUP2 GT ISZERO PUSH2 0xA83 JUMPI DUP3 PUSH1 0x20 DUP4 DUP8 ADD ADD MSTORE JUMPDEST POP PUSH1 0x1F ADD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x20 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP1 MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP3 MSTORE PUSH1 0x20 SWAP1 DUP2 ADD MLOAD SWAP2 ADD MSTORE JUMP JUMPDEST PUSH1 0x0 PUSH2 0x160 DUP3 MLOAD PUSH1 0x9 DUP2 LT PUSH2 0xAEC JUMPI INVALID JUMPDEST DUP1 DUP6 MSTORE POP PUSH1 0x20 DUP4 ADD MLOAD PUSH1 0x20 DUP6 ADD MSTORE PUSH1 0x40 DUP4 ADD MLOAD PUSH2 0xB0C PUSH1 0x40 DUP7 ADD DUP3 PUSH2 0xB61 JUMP JUMPDEST POP PUSH1 0x60 DUP4 ADD MLOAD PUSH1 0xC0 DUP6 ADD MSTORE PUSH1 0x80 DUP4 ADD MLOAD PUSH1 0xE0 DUP6 ADD MSTORE PUSH1 0xA0 DUP4 ADD MLOAD PUSH2 0xB34 PUSH2 0x100 DUP7 ADD DUP3 PUSH2 0xA33 JUMP JUMPDEST POP PUSH1 0xC0 DUP4 ADD MLOAD PUSH2 0x120 DUP6 ADD MSTORE PUSH1 0xE0 DUP4 ADD MLOAD DUP2 PUSH2 0x140 DUP7 ADD MSTORE PUSH2 0xB58 DUP3 DUP7 ADD DUP3 PUSH2 0xA4D JUMP JUMPDEST SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST DUP1 MLOAD ISZERO ISZERO DUP3 MSTORE PUSH2 0xB74 PUSH1 0x20 DUP3 ADD MLOAD PUSH2 0xDB9 JUMP JUMPDEST PUSH1 0x20 DUP4 ADD MSTORE PUSH2 0xB86 PUSH1 0x40 DUP3 ADD MLOAD PUSH2 0xDB9 JUMP JUMPDEST PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x60 SWAP1 DUP2 ADD MLOAD SWAP2 ADD MSTORE JUMP JUMPDEST PUSH1 0x40 DUP1 DUP3 MSTORE DUP4 MLOAD SWAP1 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x0 SWAP1 PUSH1 0x20 SWAP1 PUSH1 0x60 DUP5 ADD SWAP1 DUP3 DUP8 ADD DUP5 JUMPDEST DUP3 DUP2 LT ISZERO PUSH2 0xBD9 JUMPI PUSH2 0xBC6 DUP5 DUP4 MLOAD PUSH2 0xAB6 JUMP JUMPDEST PUSH1 0x40 SWAP4 SWAP1 SWAP4 ADD SWAP3 SWAP1 DUP5 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0xBB3 JUMP JUMPDEST POP POP POP DUP4 DUP2 SUB DUP3 DUP6 ADD MSTORE DUP5 MLOAD DUP1 DUP3 MSTORE DUP3 DUP3 ADD SWAP1 DUP1 DUP5 MUL DUP4 ADD DUP5 ADD DUP8 DUP6 ADD DUP7 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xC44 JUMPI PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP7 DUP5 SUB ADD DUP6 MSTORE PUSH2 0xC32 DUP4 DUP4 MLOAD PUSH2 0xADB JUMP JUMPDEST SWAP5 DUP8 ADD SWAP5 SWAP3 POP SWAP1 DUP7 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0xBF8 JUMP JUMPDEST POP SWAP1 SWAP10 SWAP9 POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x60 DUP2 ADD PUSH1 0x4 DUP6 LT PUSH2 0xC8E JUMPI INVALID JUMPDEST SWAP4 DUP2 MSTORE PUSH1 0x20 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x40 SWAP1 SWAP2 ADD MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x2E SWAP1 DUP3 ADD MSTORE PUSH32 0x447964784272696467652F4F4E4C595F43414C4C41424C455F42595F45524332 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x305F4252494447455F50524F5859000000000000000000000000000000000000 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x25 SWAP1 DUP3 ADD MSTORE PUSH32 0x447964784272696467652F554E5245434F474E495A45445F4252494447455F41 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x4354494F4E000000000000000000000000000000000000000000000000000000 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST SWAP3 DUP4 MSTORE PUSH1 0x20 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0xD91 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0xDAF JUMPI DUP1 DUP2 REVERT JUMPDEST POP PUSH1 0x20 SWAP1 DUP2 MUL ADD SWAP1 JUMP JUMPDEST DUP1 PUSH1 0x2 DUP2 LT PUSH2 0xDC4 JUMPI INVALID JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x2 DUP2 LT PUSH2 0xDD6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID LOG3 PUSH6 0x627A7A723158 KECCAK256 SMOD 0xE9 DUP14 DUP9 CALLDATASIZE MSIZE 0xB7 SELFBALANCE 0xD4 0x1E DUP4 CHAINID 0xAC DUP9 0xCB 0xE6 0xD6 DUP6 CODECOPY MSTORE 0xBD 0x5D MULMOD DIV 0xD9 0x24 0xC1 0x5C MULMOD 0x5F RETURN MSTORE PUSH13 0x6578706572696D656E74616CF5 PUSH5 0x736F6C6343 STOP SDIV GT STOP BLOCKHASH ",
                "sourceMap": "948:8696:17:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;948:8696:17;;;;;;;"
            },
            "deployedBytecode": {
                "linkReferences": {},
                "object": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063c2df82e614610030575b600080fd5b61004361003e3660046108a1565b610059565b6040516100509190610c53565b60405180910390f35b60006100636101a7565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146100d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100c790610ca2565b60405180910390fd5b6100d86106d8565b6100e48385018561094b565b905060606100f288836101bf565b9050606061010289898986610275565b905061010c6103b2565b73ffffffffffffffffffffffffffffffffffffffff1663a67a6a4583836040518363ffffffff1660e01b8152600401610146929190610b96565b600060405180830381600087803b15801561016057600080fd5b505af1158015610174573d6000803e3d6000fd5b507fdc1600f3000000000000000000000000000000000000000000000000000000009d9c50505050505050505050505050565b738ed95d1746bf1e4dab58d8ed4724f1ef95b20db090565b80518051604080518281526020808402820101909152606092919081801561020157816020015b6101ee6106f2565b8152602001906001900390816101e65790505b50925060005b8181101561026c5760405180604001604052808773ffffffffffffffffffffffffffffffffffffffff16815260200184838151811061024257fe5b602002602001015181525084828151811061025957fe5b6020908102919091010152600101610207565b50505092915050565b602080820151805160408051828152828502810190940190526060928180156102b857816020015b6102a5610709565b81526020019060019003908161029d5790505b50925060005b818110156103a7576102ce610768565b8382815181106102da57fe5b602002602001015190506000808260800151111561030c57610305826060015183608001518a6103ca565b905061030f565b50865b60008251600181111561031e57fe5b141561034b5761032f8a8284610419565b86848151811061033b57fe5b602002602001018190525061039d565b60018251600181111561035a57fe5b141561036b5761032f8982846104c6565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100c790610cff565b50506001016102be565b505050949350505050565b731e0447b19bb6ecfdae1e4ae1694b0c3659614e4e90565b60006103d784848461050b565b156103ef576103ef6103ea858585610571565b610616565b61040f83610403868563ffffffff61061e16565b9063ffffffff61065816565b90505b9392505050565b610421610709565b610429610798565b6040805160808101909152600181526020810160008152602001600081526020018590526040805161010081019091529091508060005b81526020018460200151815260200182815260200184604001518152602001600081526020018673ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001604051806020016040528060008152508152509150509392505050565b6104ce610709565b6104d6610798565b506040805160808101825260008082526020820181905281830152606081018590528151610100810190925290806001610460565b60008261051d5761051d6103ea610682565b811580610528575083155b1561053557506000610412565b6000838061053f57fe5b8584099050610554858463ffffffff61061e16565b610566826103e863ffffffff61061e16565b101595945050505050565b606063339f3de260e01b84848460405160240161059093929190610d5c565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915290509392505050565b805160208201fd5b60008261062d57506000610652565b8282028284828161063a57fe5b041461064f5761064f6103ea600186866106b9565b90505b92915050565b60008161066e5761066e6103ea600385856106b9565b600082848161067957fe5b04949350505050565b60408051808201909152600481527fa791837c00000000000000000000000000000000000000000000000000000000602082015290565b606063e946c1bb60e01b84848460405160240161059093929190610c80565b604051806040016040528060608152602001606081525090565b604080518082019091526000808252602082015290565b604080516101008101825260008082526020820152908101610729610798565b81526020016000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001606081525090565b6040805160a081019091528060008152602001600081526020016000815260200160008152602001600081525090565b604080516080810190915260008082526020820190815260200160008152602001600081525090565b803573ffffffffffffffffffffffffffffffffffffffff8116811461065257600080fd5b600082601f8301126107f5578081fd5b813561080861080382610d99565b610d72565b818152915060208083019084810160a084028601820187101561082a57600080fd5b60005b848110156108965760a0828903121561084557600080fd5b61084f60a0610d72565b823561085a81610dc9565b8152828401358482015260408084013590820152606080840135908201526080808401359082015284529282019260a09091019060010161082d565b505050505092915050565b60008060008060008060a087890312156108b9578182fd5b6108c388886107c1565b95506108d288602089016107c1565b94506108e188604089016107c1565b935060608701359250608087013567ffffffffffffffff80821115610904578384fd5b8189018a601f820112610915578485fd5b8035925081831115610925578485fd5b8a6020848301011115610936578485fd5b979a9699509497509295602001949293505050565b6000602080838503121561095d578182fd5b823567ffffffffffffffff80821115610974578384fd5b81850160408188031215610986578485fd5b6109906040610d72565b92508035828111156109a0578586fd5b80820188601f8201126109b1578687fd5b803591506109c161080383610d99565b82815286810190828801888502840189018c10156109dd57898afd5b8993505b848410156109ff5780358352600193909301929188019188016109e1565b5086525050508084013582811115610a15578586fd5b610a21888284016107e5565b85850152505050809250505092915050565b73ffffffffffffffffffffffffffffffffffffffff169052565b60008151808452815b81811015610a7257602081850181015186830182015201610a56565b81811115610a835782602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b805173ffffffffffffffffffffffffffffffffffffffff168252602090810151910152565b6000610160825160098110610aec57fe5b80855250602083015160208501526040830151610b0c6040860182610b61565b50606083015160c0850152608083015160e085015260a0830151610b34610100860182610a33565b5060c083015161012085015260e083015181610140860152610b5882860182610a4d565b95945050505050565b805115158252610b746020820151610db9565b6020830152610b866040820151610db9565b6040830152606090810151910152565b604080825283519082018190526000906020906060840190828701845b82811015610bd957610bc6848351610ab6565b6040939093019290840190600101610bb3565b5050508381038285015284518082528282019080840283018401878501865b83811015610c44577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0868403018552610c32838351610adb565b94870194925090860190600101610bf8565b50909998505050505050505050565b7fffffffff0000000000000000000000000000000000000000000000000000000091909116815260200190565b6060810160048510610c8e57fe5b938152602081019290925260409091015290565b6020808252602e908201527f447964784272696467652f4f4e4c595f43414c4c41424c455f42595f4552433260408201527f305f4252494447455f50524f5859000000000000000000000000000000000000606082015260800190565b60208082526025908201527f447964784272696467652f554e5245434f474e495a45445f4252494447455f4160408201527f4354494f4e000000000000000000000000000000000000000000000000000000606082015260800190565b9283526020830191909152604082015260600190565b60405181810167ffffffffffffffff81118282101715610d9157600080fd5b604052919050565b600067ffffffffffffffff821115610daf578081fd5b5060209081020190565b8060028110610dc457fe5b919050565b60028110610dd657600080fd5b5056fea365627a7a7231582007e98d883659b747d41e8346ac88cbe6d6853952bd5d0904d924c15c095ff3526c6578706572696d656e74616cf564736f6c63430005110040",
                "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x2B JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0xC2DF82E6 EQ PUSH2 0x30 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x43 PUSH2 0x3E CALLDATASIZE PUSH1 0x4 PUSH2 0x8A1 JUMP JUMPDEST PUSH2 0x59 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x50 SWAP2 SWAP1 PUSH2 0xC53 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 PUSH2 0x63 PUSH2 0x1A7 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0xD0 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xC7 SWAP1 PUSH2 0xCA2 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0xD8 PUSH2 0x6D8 JUMP JUMPDEST PUSH2 0xE4 DUP4 DUP6 ADD DUP6 PUSH2 0x94B JUMP JUMPDEST SWAP1 POP PUSH1 0x60 PUSH2 0xF2 DUP9 DUP4 PUSH2 0x1BF JUMP JUMPDEST SWAP1 POP PUSH1 0x60 PUSH2 0x102 DUP10 DUP10 DUP10 DUP7 PUSH2 0x275 JUMP JUMPDEST SWAP1 POP PUSH2 0x10C PUSH2 0x3B2 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH4 0xA67A6A45 DUP4 DUP4 PUSH1 0x40 MLOAD DUP4 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x146 SWAP3 SWAP2 SWAP1 PUSH2 0xB96 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x160 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x174 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP PUSH32 0xDC1600F300000000000000000000000000000000000000000000000000000000 SWAP14 SWAP13 POP POP POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH20 0x8ED95D1746BF1E4DAB58D8ED4724F1EF95B20DB0 SWAP1 JUMP JUMPDEST DUP1 MLOAD DUP1 MLOAD PUSH1 0x40 DUP1 MLOAD DUP3 DUP2 MSTORE PUSH1 0x20 DUP1 DUP5 MUL DUP3 ADD ADD SWAP1 SWAP2 MSTORE PUSH1 0x60 SWAP3 SWAP2 SWAP1 DUP2 DUP1 ISZERO PUSH2 0x201 JUMPI DUP2 PUSH1 0x20 ADD JUMPDEST PUSH2 0x1EE PUSH2 0x6F2 JUMP JUMPDEST DUP2 MSTORE PUSH1 0x20 ADD SWAP1 PUSH1 0x1 SWAP1 SUB SWAP1 DUP2 PUSH2 0x1E6 JUMPI SWAP1 POP JUMPDEST POP SWAP3 POP PUSH1 0x0 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x26C JUMPI PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 DUP8 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP5 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x242 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP2 MSTORE POP DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x259 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x207 JUMP JUMPDEST POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 ADD MLOAD DUP1 MLOAD PUSH1 0x40 DUP1 MLOAD DUP3 DUP2 MSTORE DUP3 DUP6 MUL DUP2 ADD SWAP1 SWAP5 ADD SWAP1 MSTORE PUSH1 0x60 SWAP3 DUP2 DUP1 ISZERO PUSH2 0x2B8 JUMPI DUP2 PUSH1 0x20 ADD JUMPDEST PUSH2 0x2A5 PUSH2 0x709 JUMP JUMPDEST DUP2 MSTORE PUSH1 0x20 ADD SWAP1 PUSH1 0x1 SWAP1 SUB SWAP1 DUP2 PUSH2 0x29D JUMPI SWAP1 POP JUMPDEST POP SWAP3 POP PUSH1 0x0 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x3A7 JUMPI PUSH2 0x2CE PUSH2 0x768 JUMP JUMPDEST DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x2DA JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 DUP1 DUP3 PUSH1 0x80 ADD MLOAD GT ISZERO PUSH2 0x30C JUMPI PUSH2 0x305 DUP3 PUSH1 0x60 ADD MLOAD DUP4 PUSH1 0x80 ADD MLOAD DUP11 PUSH2 0x3CA JUMP JUMPDEST SWAP1 POP PUSH2 0x30F JUMP JUMPDEST POP DUP7 JUMPDEST PUSH1 0x0 DUP3 MLOAD PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x31E JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x34B JUMPI PUSH2 0x32F DUP11 DUP3 DUP5 PUSH2 0x419 JUMP JUMPDEST DUP7 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x33B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 SWAP1 MSTORE POP PUSH2 0x39D JUMP JUMPDEST PUSH1 0x1 DUP3 MLOAD PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x35A JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x36B JUMPI PUSH2 0x32F DUP10 DUP3 DUP5 PUSH2 0x4C6 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xC7 SWAP1 PUSH2 0xCFF JUMP JUMPDEST POP POP PUSH1 0x1 ADD PUSH2 0x2BE JUMP JUMPDEST POP POP POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH20 0x1E0447B19BB6ECFDAE1E4AE1694B0C3659614E4E SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x3D7 DUP5 DUP5 DUP5 PUSH2 0x50B JUMP JUMPDEST ISZERO PUSH2 0x3EF JUMPI PUSH2 0x3EF PUSH2 0x3EA DUP6 DUP6 DUP6 PUSH2 0x571 JUMP JUMPDEST PUSH2 0x616 JUMP JUMPDEST PUSH2 0x40F DUP4 PUSH2 0x403 DUP7 DUP6 PUSH4 0xFFFFFFFF PUSH2 0x61E AND JUMP JUMPDEST SWAP1 PUSH4 0xFFFFFFFF PUSH2 0x658 AND JUMP JUMPDEST SWAP1 POP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH2 0x421 PUSH2 0x709 JUMP JUMPDEST PUSH2 0x429 PUSH2 0x798 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x80 DUP2 ADD SWAP1 SWAP2 MSTORE PUSH1 0x1 DUP2 MSTORE PUSH1 0x20 DUP2 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD DUP6 SWAP1 MSTORE PUSH1 0x40 DUP1 MLOAD PUSH2 0x100 DUP2 ADD SWAP1 SWAP2 MSTORE SWAP1 SWAP2 POP DUP1 PUSH1 0x0 JUMPDEST DUP2 MSTORE PUSH1 0x20 ADD DUP5 PUSH1 0x20 ADD MLOAD DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP2 MSTORE PUSH1 0x20 ADD DUP5 PUSH1 0x40 ADD MLOAD DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD DUP7 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP DUP2 MSTORE POP SWAP2 POP POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH2 0x4CE PUSH2 0x709 JUMP JUMPDEST PUSH2 0x4D6 PUSH2 0x798 JUMP JUMPDEST POP PUSH1 0x40 DUP1 MLOAD PUSH1 0x80 DUP2 ADD DUP3 MSTORE PUSH1 0x0 DUP1 DUP3 MSTORE PUSH1 0x20 DUP3 ADD DUP2 SWAP1 MSTORE DUP2 DUP4 ADD MSTORE PUSH1 0x60 DUP2 ADD DUP6 SWAP1 MSTORE DUP2 MLOAD PUSH2 0x100 DUP2 ADD SWAP1 SWAP3 MSTORE SWAP1 DUP1 PUSH1 0x1 PUSH2 0x460 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH2 0x51D JUMPI PUSH2 0x51D PUSH2 0x3EA PUSH2 0x682 JUMP JUMPDEST DUP2 ISZERO DUP1 PUSH2 0x528 JUMPI POP DUP4 ISZERO JUMPDEST ISZERO PUSH2 0x535 JUMPI POP PUSH1 0x0 PUSH2 0x412 JUMP JUMPDEST PUSH1 0x0 DUP4 DUP1 PUSH2 0x53F JUMPI INVALID JUMPDEST DUP6 DUP5 MULMOD SWAP1 POP PUSH2 0x554 DUP6 DUP5 PUSH4 0xFFFFFFFF PUSH2 0x61E AND JUMP JUMPDEST PUSH2 0x566 DUP3 PUSH2 0x3E8 PUSH4 0xFFFFFFFF PUSH2 0x61E AND JUMP JUMPDEST LT ISZERO SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH4 0x339F3DE2 PUSH1 0xE0 SHL DUP5 DUP5 DUP5 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x590 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0xD5C JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 SWAP1 MSTORE PUSH1 0x20 DUP2 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP1 SWAP4 AND SWAP3 SWAP1 SWAP3 OR SWAP1 SWAP2 MSTORE SWAP1 POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST DUP1 MLOAD PUSH1 0x20 DUP3 ADD REVERT JUMPDEST PUSH1 0x0 DUP3 PUSH2 0x62D JUMPI POP PUSH1 0x0 PUSH2 0x652 JUMP JUMPDEST DUP3 DUP3 MUL DUP3 DUP5 DUP3 DUP2 PUSH2 0x63A JUMPI INVALID JUMPDEST DIV EQ PUSH2 0x64F JUMPI PUSH2 0x64F PUSH2 0x3EA PUSH1 0x1 DUP7 DUP7 PUSH2 0x6B9 JUMP JUMPDEST SWAP1 POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH2 0x66E JUMPI PUSH2 0x66E PUSH2 0x3EA PUSH1 0x3 DUP6 DUP6 PUSH2 0x6B9 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP5 DUP2 PUSH2 0x679 JUMPI INVALID JUMPDEST DIV SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x4 DUP2 MSTORE PUSH32 0xA791837C00000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x60 PUSH4 0xE946C1BB PUSH1 0xE0 SHL DUP5 DUP5 DUP5 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x590 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0xC80 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x0 DUP1 DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH2 0x100 DUP2 ADD DUP3 MSTORE PUSH1 0x0 DUP1 DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE SWAP1 DUP2 ADD PUSH2 0x729 PUSH2 0x798 JUMP JUMPDEST DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0xA0 DUP2 ADD SWAP1 SWAP2 MSTORE DUP1 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 DUP1 MLOAD PUSH1 0x80 DUP2 ADD SWAP1 SWAP2 MSTORE PUSH1 0x0 DUP1 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST DUP1 CALLDATALOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x652 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x7F5 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x808 PUSH2 0x803 DUP3 PUSH2 0xD99 JUMP JUMPDEST PUSH2 0xD72 JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD PUSH1 0xA0 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH2 0x82A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x896 JUMPI PUSH1 0xA0 DUP3 DUP10 SUB SLT ISZERO PUSH2 0x845 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x84F PUSH1 0xA0 PUSH2 0xD72 JUMP JUMPDEST DUP3 CALLDATALOAD PUSH2 0x85A DUP2 PUSH2 0xDC9 JUMP JUMPDEST DUP2 MSTORE DUP3 DUP5 ADD CALLDATALOAD DUP5 DUP3 ADD MSTORE PUSH1 0x40 DUP1 DUP5 ADD CALLDATALOAD SWAP1 DUP3 ADD MSTORE PUSH1 0x60 DUP1 DUP5 ADD CALLDATALOAD SWAP1 DUP3 ADD MSTORE PUSH1 0x80 DUP1 DUP5 ADD CALLDATALOAD SWAP1 DUP3 ADD MSTORE DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 PUSH1 0xA0 SWAP1 SWAP2 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x82D JUMP JUMPDEST POP POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0xA0 DUP8 DUP10 SUB SLT ISZERO PUSH2 0x8B9 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x8C3 DUP9 DUP9 PUSH2 0x7C1 JUMP JUMPDEST SWAP6 POP PUSH2 0x8D2 DUP9 PUSH1 0x20 DUP10 ADD PUSH2 0x7C1 JUMP JUMPDEST SWAP5 POP PUSH2 0x8E1 DUP9 PUSH1 0x40 DUP10 ADD PUSH2 0x7C1 JUMP JUMPDEST SWAP4 POP PUSH1 0x60 DUP8 ADD CALLDATALOAD SWAP3 POP PUSH1 0x80 DUP8 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x904 JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 DUP10 ADD DUP11 PUSH1 0x1F DUP3 ADD SLT PUSH2 0x915 JUMPI DUP5 DUP6 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP3 POP DUP2 DUP4 GT ISZERO PUSH2 0x925 JUMPI DUP5 DUP6 REVERT JUMPDEST DUP11 PUSH1 0x20 DUP5 DUP4 ADD ADD GT ISZERO PUSH2 0x936 JUMPI DUP5 DUP6 REVERT JUMPDEST SWAP8 SWAP11 SWAP7 SWAP10 POP SWAP5 SWAP8 POP SWAP3 SWAP6 PUSH1 0x20 ADD SWAP5 SWAP3 SWAP4 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x95D JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x974 JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 DUP6 ADD PUSH1 0x40 DUP2 DUP9 SUB SLT ISZERO PUSH2 0x986 JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0x990 PUSH1 0x40 PUSH2 0xD72 JUMP JUMPDEST SWAP3 POP DUP1 CALLDATALOAD DUP3 DUP2 GT ISZERO PUSH2 0x9A0 JUMPI DUP6 DUP7 REVERT JUMPDEST DUP1 DUP3 ADD DUP9 PUSH1 0x1F DUP3 ADD SLT PUSH2 0x9B1 JUMPI DUP7 DUP8 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP2 POP PUSH2 0x9C1 PUSH2 0x803 DUP4 PUSH2 0xD99 JUMP JUMPDEST DUP3 DUP2 MSTORE DUP7 DUP2 ADD SWAP1 DUP3 DUP9 ADD DUP9 DUP6 MUL DUP5 ADD DUP10 ADD DUP13 LT ISZERO PUSH2 0x9DD JUMPI DUP10 DUP11 REVERT JUMPDEST DUP10 SWAP4 POP JUMPDEST DUP5 DUP5 LT ISZERO PUSH2 0x9FF JUMPI DUP1 CALLDATALOAD DUP4 MSTORE PUSH1 0x1 SWAP4 SWAP1 SWAP4 ADD SWAP3 SWAP2 DUP9 ADD SWAP2 DUP9 ADD PUSH2 0x9E1 JUMP JUMPDEST POP DUP7 MSTORE POP POP POP DUP1 DUP5 ADD CALLDATALOAD DUP3 DUP2 GT ISZERO PUSH2 0xA15 JUMPI DUP6 DUP7 REVERT JUMPDEST PUSH2 0xA21 DUP9 DUP3 DUP5 ADD PUSH2 0x7E5 JUMP JUMPDEST DUP6 DUP6 ADD MSTORE POP POP POP DUP1 SWAP3 POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 MSTORE JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE DUP2 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0xA72 JUMPI PUSH1 0x20 DUP2 DUP6 ADD DUP2 ADD MLOAD DUP7 DUP4 ADD DUP3 ADD MSTORE ADD PUSH2 0xA56 JUMP JUMPDEST DUP2 DUP2 GT ISZERO PUSH2 0xA83 JUMPI DUP3 PUSH1 0x20 DUP4 DUP8 ADD ADD MSTORE JUMPDEST POP PUSH1 0x1F ADD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x20 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP1 MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP3 MSTORE PUSH1 0x20 SWAP1 DUP2 ADD MLOAD SWAP2 ADD MSTORE JUMP JUMPDEST PUSH1 0x0 PUSH2 0x160 DUP3 MLOAD PUSH1 0x9 DUP2 LT PUSH2 0xAEC JUMPI INVALID JUMPDEST DUP1 DUP6 MSTORE POP PUSH1 0x20 DUP4 ADD MLOAD PUSH1 0x20 DUP6 ADD MSTORE PUSH1 0x40 DUP4 ADD MLOAD PUSH2 0xB0C PUSH1 0x40 DUP7 ADD DUP3 PUSH2 0xB61 JUMP JUMPDEST POP PUSH1 0x60 DUP4 ADD MLOAD PUSH1 0xC0 DUP6 ADD MSTORE PUSH1 0x80 DUP4 ADD MLOAD PUSH1 0xE0 DUP6 ADD MSTORE PUSH1 0xA0 DUP4 ADD MLOAD PUSH2 0xB34 PUSH2 0x100 DUP7 ADD DUP3 PUSH2 0xA33 JUMP JUMPDEST POP PUSH1 0xC0 DUP4 ADD MLOAD PUSH2 0x120 DUP6 ADD MSTORE PUSH1 0xE0 DUP4 ADD MLOAD DUP2 PUSH2 0x140 DUP7 ADD MSTORE PUSH2 0xB58 DUP3 DUP7 ADD DUP3 PUSH2 0xA4D JUMP JUMPDEST SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST DUP1 MLOAD ISZERO ISZERO DUP3 MSTORE PUSH2 0xB74 PUSH1 0x20 DUP3 ADD MLOAD PUSH2 0xDB9 JUMP JUMPDEST PUSH1 0x20 DUP4 ADD MSTORE PUSH2 0xB86 PUSH1 0x40 DUP3 ADD MLOAD PUSH2 0xDB9 JUMP JUMPDEST PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x60 SWAP1 DUP2 ADD MLOAD SWAP2 ADD MSTORE JUMP JUMPDEST PUSH1 0x40 DUP1 DUP3 MSTORE DUP4 MLOAD SWAP1 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x0 SWAP1 PUSH1 0x20 SWAP1 PUSH1 0x60 DUP5 ADD SWAP1 DUP3 DUP8 ADD DUP5 JUMPDEST DUP3 DUP2 LT ISZERO PUSH2 0xBD9 JUMPI PUSH2 0xBC6 DUP5 DUP4 MLOAD PUSH2 0xAB6 JUMP JUMPDEST PUSH1 0x40 SWAP4 SWAP1 SWAP4 ADD SWAP3 SWAP1 DUP5 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0xBB3 JUMP JUMPDEST POP POP POP DUP4 DUP2 SUB DUP3 DUP6 ADD MSTORE DUP5 MLOAD DUP1 DUP3 MSTORE DUP3 DUP3 ADD SWAP1 DUP1 DUP5 MUL DUP4 ADD DUP5 ADD DUP8 DUP6 ADD DUP7 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xC44 JUMPI PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP7 DUP5 SUB ADD DUP6 MSTORE PUSH2 0xC32 DUP4 DUP4 MLOAD PUSH2 0xADB JUMP JUMPDEST SWAP5 DUP8 ADD SWAP5 SWAP3 POP SWAP1 DUP7 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0xBF8 JUMP JUMPDEST POP SWAP1 SWAP10 SWAP9 POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x60 DUP2 ADD PUSH1 0x4 DUP6 LT PUSH2 0xC8E JUMPI INVALID JUMPDEST SWAP4 DUP2 MSTORE PUSH1 0x20 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x40 SWAP1 SWAP2 ADD MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x2E SWAP1 DUP3 ADD MSTORE PUSH32 0x447964784272696467652F4F4E4C595F43414C4C41424C455F42595F45524332 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x305F4252494447455F50524F5859000000000000000000000000000000000000 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x25 SWAP1 DUP3 ADD MSTORE PUSH32 0x447964784272696467652F554E5245434F474E495A45445F4252494447455F41 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x4354494F4E000000000000000000000000000000000000000000000000000000 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST SWAP3 DUP4 MSTORE PUSH1 0x20 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0xD91 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0xDAF JUMPI DUP1 DUP2 REVERT JUMPDEST POP PUSH1 0x20 SWAP1 DUP2 MUL ADD SWAP1 JUMP JUMPDEST DUP1 PUSH1 0x2 DUP2 LT PUSH2 0xDC4 JUMPI INVALID JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x2 DUP2 LT PUSH2 0xDD6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID LOG3 PUSH6 0x627A7A723158 KECCAK256 SMOD 0xE9 DUP14 DUP9 CALLDATASIZE MSIZE 0xB7 SELFBALANCE 0xD4 0x1E DUP4 CHAINID 0xAC DUP9 0xCB 0xE6 0xD6 DUP6 CODECOPY MSTORE 0xBD 0x5D MULMOD DIV 0xD9 0x24 0xC1 0x5C MULMOD 0x5F RETURN MSTORE PUSH13 0x6578706572696D656E74616CF5 PUSH5 0x736F6C6343 STOP SDIV GT STOP BLOCKHASH ",
                "sourceMap": "948:8696:17:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;948:8696:17;;;;;;;;;;;;;;;;;;;2062:1082;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;2276:14;2416:29;:27;:29::i;:::-;2402:43;;:10;:43;;;2381:136;;;;;;;;;;;;;;;;;;;;;;2560:28;;:::i;:::-;2592:43;;;;2603:17;2592:43;;;2559:76;;2708:35;2746:33;2762:4;2768:10;2746:15;:33::i;:::-;2708:71;;2850:33;2886:102;2914:4;2932:2;2948:6;2968:10;2886:14;:102::i;:::-;2850:138;;3060:17;:15;:17::i;:::-;3054:32;;;3087:8;3097:7;3054:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3054:51:17;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;3123:14:17;;2062:1082;-1:-1:-1;;;;;;;;;;;;;2062:1082:17:o;11785:173:68:-;1880:42;11785:173;:::o;3377:557:17:-;3595:25;;3650:21;;3692:34;;;;;;;;;;;;;;;;3510:35;;3595:25;3650:21;;3692:34;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;-1:-1:-1;3681:45:17;-1:-1:-1;3741:9:17;3736:192;3760:9;3756:1;:13;3736:192;;;3804:113;;;;;;;;3847:12;3804:113;;;;;;3885:14;3900:1;3885:17;;;;;;;;;;;;;;3804:113;;;3790:8;3799:1;3790:11;;;;;;;;;;;;;;;;;:127;3771:3;;3736:192;;;;3377:557;;;;;;:::o;4265:2015::-;4535:18;;;;;4588:20;;4628:38;;;;;;;;;;;;;;;;4448:33;;4588:20;4628:38;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;-1:-1:-1;4618:48:17;-1:-1:-1;4681:9:17;4676:1598;4700:14;4696:1;:18;4676:1598;;;4779:32;;:::i;:::-;4814:13;4828:1;4814:16;;;;;;;;;;;;;;4779:51;;4901:20;4980:1;4939:12;:38;;;:42;4935:353;;;5016:197;5071:12;:36;;;5129:12;:38;;;5189:6;5016:33;:197::i;:::-;5001:212;;4935:353;;;-1:-1:-1;5267:6:17;4935:353;5371:24;5344:23;;:51;;;;;;;;;5340:924;;;5510:139;5552:11;5585:12;5619;5510:20;:139::i;:::-;5497:7;5505:1;5497:10;;;;;;;;;;;;;:152;;;;5340:924;;;5701:25;5674:23;;:52;;;;;;;;;5670:594;;;5827:139;5870:10;5902:12;5936;5827:21;:139::i;5670:594::-;6202:47;;;;;;;;;;;5670:594;-1:-1:-1;;4716:3:17;;4676:1598;;;;4265:2015;;;;;;;;:::o;12864:135:68:-;2599:42;12864:135;:::o;1141:603:65:-;1309:21;1350:110;1388:9;1415:11;1444:6;1350:20;:110::i;:::-;1346:289;;;1476:148;1498:125;1547:9;1574:11;1603:6;1498:31;:125::i;:::-;1476:21;:148::i;:::-;1661:46;1695:11;1661:25;:9;1679:6;1661:25;:17;:25;:::i;:::-;:33;:46;:33;:46;:::i;:::-;1645:62;-1:-1:-1;1141:603:65;;;;;;:::o;6574:1391:17:-;6765:37;;:::i;:::-;6858:35;;:::i;:::-;6896:379;;;;;;;;;6934:4;6896:379;;;;;-1:-1:-1;6896:379:17;;;;7113:26;6896:379;;;;;;;7341:617;;;;;;;;;6858:417;;-1:-1:-1;7341:617:17;-1:-1:-1;7341:617:17;;;;;7545:12;:23;;;7341:617;;;;7459:10;7341:617;;;;7662:12;:21;;;7341:617;;;;7889:1;7341:617;;;;7756:11;7341:617;;;;;;7921:1;7341:617;;;;;;;;;;;;;;;;;;;7325:633;;6574:1391;;;;;;:::o;8230:1412::-;8421:38;;:::i;:::-;8515:41;;:::i;:::-;-1:-1:-1;8559:393:17;;;;;;;;-1:-1:-1;8559:393:17;;;;;;;;;;;;;;;;;;;9015:620;;;;;;;;8559:393;9015:620;9058:25;9015:620;;4566:1880:65;4729:12;4761:16;4757:109;;4793:62;4815:39;:37;:39::i;4793:62::-;5676:11;;;:29;;-1:-1:-1;5691:14:65;;5676:29;5672:72;;;-1:-1:-1;5728:5:65;5721:12;;5672:72;6239:17;6322:11;6259:84;;;;;6299:9;6279:6;6259:84;6239:104;-1:-1:-1;6390:25:65;:9;6408:6;6390:25;:17;:25;:::i;:::-;6363:23;:9;6381:4;6363:23;:17;:23;:::i;:::-;:52;;;4566:1880;-1:-1:-1;;;;;4566:1880:65:o;520:335:66:-;676:12;312:10;747:23;;784:9;807:11;832:6;711:137;;;;;;;;;;;;;;;22:32:-1;26:21;;;22:32;6:49;;711:137:66;;;49:4:-1;25:18;;61:17;;711:137:66;182:15:-1;711:137:66;;;;179:29:-1;;;;160:49;;;711:137:66;-1:-1:-1;520:335:66;;;;;:::o;1511:170:75:-;1654:9;1648:16;1641:4;1630:9;1626:20;1619:46;122:448:76;208:7;235:6;231:45;;-1:-1:-1;264:1:76;257:8;;231:45;297:5;;;301:1;297;:5;:1;316:5;;;;;:10;312:234;;342:193;364:170;421:61;500:1;519;364:39;:170::i;342:193::-;562:1;-1:-1:-1;122:448:76;;;;;:::o;576:383::-;662:7;689:6;685:223;;711:186;733:163;790:54;862:1;881;733:39;:163::i;711:186::-;917:9;933:1;929;:5;;;;;;;576:383;-1:-1:-1;;;;576:383:76:o;372:142:66:-;485:22;;;;;;;;;;;;;;;;;372:142;:::o;731:322:77:-;884:12;196:10;955:28;;997:9;1020:1;1035;919:127;;;;;;;;;;;948:8696:17;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;-1:-1:-1;948:8696:17;;;;;;;;:::o;:::-;;;;;;;;;-1:-1:-1;948:8696:17;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;-1:-1:-1;948:8696:17;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;-1:-1:-1;948:8696:17;;;;;;;;;;;;;;;;;;;;;:::o;5:130:-1:-;72:20;;19998:42;19987:54;;21648:35;;21638:2;;21697:1;;21687:12;184:777;;323:3;316:4;308:6;304:17;300:27;290:2;;-1:-1;;331:12;290:2;378:6;365:20;400:102;415:86;494:6;415:86;;;400:102;;;530:21;;;391:111;-1:-1;574:4;587:14;;;;562:17;;;688:4;676:17;;667:27;;;;664:36;-1:-1;661:2;;;713:1;;703:12;661:2;738:1;723:232;748:6;745:1;742:13;723:232;;;688:4;2372:9;2367:3;2363:19;2359:30;2356:2;;;738:1;;2392:12;2356:2;2420:20;688:4;2420:20;;;2153:6;2140:20;2165:54;2213:5;2165:54;;;2503:96;;2720:22;;;4083:20;2681:16;;;2674:75;2814:2;2868:22;;;4083:20;2829:16;;;2822:75;2977:2;3031:22;;;4083:20;2992:16;;;2985:75;3142:3;3197:22;;;4083:20;3158:16;;;3151:75;816:76;;906:14;;;;688:4;934:14;;;;770:1;763:9;723:232;;;727:14;;;;;283:678;;;;;4153:867;;;;;;;4344:3;4332:9;4323:7;4319:23;4315:33;4312:2;;;-1:-1;;4351:12;4312:2;4413:53;4458:7;4434:22;4413:53;;;4403:63;;4521:53;4566:7;4503:2;4546:9;4542:22;4521:53;;;4511:63;;4629:53;4674:7;4611:2;4654:9;4650:22;4629:53;;;4619:63;;4719:2;4762:9;4758:22;4083:20;4727:63;;4855:3;4844:9;4840:19;4827:33;4880:18;;4872:6;4869:30;4866:2;;;-1:-1;;4902:12;4866:2;4987:6;4976:9;4972:22;1822:3;1815:4;1807:6;1803:17;1799:27;1789:2;;-1:-1;;1830:12;1789:2;1873:6;1860:20;1850:30;;4880:18;1892:6;1889:30;1886:2;;;-1:-1;;1922:12;1886:2;2017:3;4503:2;1997:17;1958:6;1983:32;;1980:41;1977:2;;;-1:-1;;2024:12;1977:2;4306:714;;;;-1:-1;4306:714;;-1:-1;4306:714;;4503:2;1954:17;;4930:74;;-1:-1;;;4306:714;5027:375;;5155:2;;5143:9;5134:7;5130:23;5126:32;5123:2;;;-1:-1;;5161:12;5123:2;5219:17;5206:31;5257:18;;5249:6;5246:30;5243:2;;;-1:-1;;5279:12;5243:2;5369:6;5358:9;5354:22;3403:4;3391:9;3386:3;3382:19;3378:30;3375:2;;;-1:-1;;3411:12;3375:2;3439:20;3403:4;3439:20;;;3430:29;;3532:17;3519:31;5257:18;3562:6;3559:30;3556:2;;;-1:-1;;3592:12;3556:2;3694:6;3683:9;3679:22;1100:3;1093:4;1085:6;1081:17;1077:27;1067:2;;-1:-1;;1108:12;1067:2;1155:6;1142:20;1128:34;;1177:76;1192:60;1245:6;1192:60;;1177:76;1281:21;;;1338:14;;;;1313:17;;;1427;;;1418:27;;;;1415:36;-1:-1;1412:2;;;-1:-1;;1454:12;1412:2;-1:-1;1480:10;;1474:206;1499:6;1496:1;1493:13;1474:206;;;4083:20;;1567:50;;1521:1;1514:9;;;;;1631:14;;;;1659;;1474:206;;;-1:-1;3612:96;;-1:-1;;;3785:18;;;3772:32;3813:30;;;3810:2;;;-1:-1;;3846:12;3810:2;3891:96;3983:3;3974:6;3963:9;3959:22;3891:96;;;5155:2;3877:5;3873:16;3866:122;;;;5299:87;;;;;5117:285;;;;;5957:103;19998:42;19987:54;6018:37;;6012:48;8359:315;;8483:5;17610:12;18378:6;18373:3;18366:19;-1:-1;20811:101;20825:6;20822:1;20819:13;20811:101;;;18415:4;20892:11;;;;;20886:18;20873:11;;;;;20866:39;20840:10;20811:101;;;20927:6;20924:1;20921:13;20918:2;;;-1:-1;18415:4;20983:6;18410:3;20974:16;;20967:27;20918:2;-1:-1;21103:2;21083:14;21099:7;21079:28;8630:39;;;;18415:4;8630:39;;8435:239;-1:-1;;8435:239;10155:473;10359:23;;19998:42;19987:54;6018:37;;10532:4;10521:16;;;10515:23;10592:14;;13256:37;10265:363;10692:1613;;10835:6;10915:16;10909:23;21204:1;21197:5;21194:12;21184:2;;21210:9;21184:2;20224:39;8762:3;8755:63;;11099:4;11092:5;11088:16;11082:23;11099:4;11163:3;11159:14;13256:37;11255:4;11248:5;11244:16;11238:23;11267:117;11255:4;11373:3;11369:14;11355:12;11267:117;;;;11474:4;11467:5;11463:16;11457:23;11543:4;11538:3;11534:14;13256:37;11641:4;11634:5;11630:16;11624:23;11710:4;11705:3;11701:14;13256:37;11803:4;11796:5;11792:16;11786:23;11815:65;11872:6;11867:3;11863:16;11849:12;11815:65;;;;11543:4;11963:5;11959:16;11953:23;12039:6;12034:3;12030:16;13256:37;11710:4;12119:5;12115:16;12109:23;10835:6;12161;12156:3;12152:16;12145:40;12200:67;10835:6;10830:3;10826:16;12248:12;12200:67;;;12289:11;10808:1497;-1:-1;;;;;10808:1497;12371:817;12580:16;12574:23;19142:13;19135:21;8203:3;8196:34;20374:46;12747:4;12740:5;12736:16;12730:23;20374:46;;;12747:4;12831:3;12827:14;8911:70;20528:43;12920:4;12913:5;12909:16;12903:23;20528:43;;;12920:4;12997:14;;9071:67;13092:4;13081:16;;;13075:23;13152:14;;13256:37;12481:707;13425:816;13769:2;13783:47;;;17610:12;;13754:18;;;18366:19;;;13425:816;;18415:4;;18406:14;;;;17257;;;13425:816;6665:335;6690:6;6687:1;6684:13;6665:335;;;5547:100;5643:3;6757:6;6751:13;5547:100;;;13769:2;5667:14;;;;;18057;;;;6712:1;6705:9;6665:335;;;-1:-1;;;14040:20;;;14020:18;;;14013:48;17610:12;;18366:19;;;18406:14;;;;7540:17;;;7531:27;;;;17257:14;;;-1:-1;7692:402;7717:6;7714:1;7711:13;7692:402;;;7769:20;18410:3;7773:4;7769:20;;7764:3;7757:33;5845:98;5939:3;7824:6;7818:13;5845:98;;;8073:14;;;;7838:120;-1:-1;18057:14;;;;6712:1;7732:9;7692:402;;;-1:-1;14067:164;;13740:501;-1:-1;;;;;;;;;13740:501;14248:209;19240:66;19229:78;;;;8311:36;;14364:2;14349:18;;14335:122;14464:473;14657:2;14642:18;;21560:1;21550:12;;21540:2;;21566:9;21540:2;9240:69;;;14840:2;14825:18;;13256:37;;;;14923:2;14908:18;;;13256:37;14628:309;;14944:407;15135:2;15149:47;;;9546:2;15120:18;;;18366:19;9582:34;18406:14;;;9562:55;9651:16;9637:12;;;9630:38;9687:12;;;15106:245;15358:407;15549:2;15563:47;;;9938:2;15534:18;;;18366:19;9974:34;18406:14;;;9954:55;10043:7;10029:12;;;10022:29;10070:12;;;15520:245;15772:435;13256:37;;;16110:2;16095:18;;13256:37;;;;16193:2;16178:18;;13256:37;15946:2;15931:18;;15917:290;16214:256;16276:2;16270:9;16302:17;;;16377:18;16362:34;;16398:22;;;16359:62;16356:2;;;16434:1;;16424:12;16356:2;16276;16443:22;16254:216;;-1:-1;16254:216;16477:326;;16658:18;16650:6;16647:30;16644:2;;;-1:-1;;16680:12;16644:2;-1:-1;16725:4;16713:17;;;16778:15;;16581:222;19462:150;19535:16;21324:1;21314:12;;21304:2;;21330:9;21304:2;19529:83;;;;21713:115;21803:1;21796:5;21793:12;21783:2;;21819:1;;21809:12;21783:2;21777:51;"
            }
        }
    },
    "sourceTreeHashHex": "0x3b6cc58ccd881bef313bb9d9dbc82e9399bab242301fcaf93cff831421594809",
    "sources": {
        "./DydxBridge.sol": {
            "id": 17,
            "content": "/*\n\n  Copyright 2019 ZeroEx Intl.\n\n  Licensed under the Apache License, Version 2.0 (the \"License\");\n  you may not use this file except in compliance with the License.\n  You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing, software\n  distributed under the License is distributed on an \"AS IS\" BASIS,\n  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  See the License for the specific language governing permissions and\n  limitations under the License.\n\n*/\n\npragma solidity ^0.5.9;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-utils/contracts/src/DeploymentConstants.sol\";\nimport \"@0x/contracts-utils/contracts/src/LibSafeMath.sol\";\nimport \"@0x/contracts-exchange-libs/contracts/src/LibMath.sol\";\nimport \"../interfaces/IERC20Bridge.sol\";\nimport \"../interfaces/IDydxBridge.sol\";\nimport \"../interfaces/IDydx.sol\";\n\n\ncontract DydxBridge is\n    IERC20Bridge,\n    IDydxBridge,\n    DeploymentConstants\n{\n\n    using LibSafeMath for uint256;\n\n    /// @dev Callback for `IERC20Bridge`. Deposits or withdraws tokens from a dydx account.\n    ///      Notes:\n    ///         1. This bridge must be set as an operator of the input dydx account.\n    ///         2. This function may only be called in the context of the 0x Exchange.\n    ///         3. The maker or taker of the 0x order must be the dydx account owner.\n    ///         4. Deposits into dydx are made from the `from` address.\n    ///         5. Withdrawals from dydx are made to the `to` address.\n    ///         6. Calling this function must always withdraw at least `amount`,\n    ///            otherwise the `ERC20Bridge` will revert.\n    /// @param from The sender of the tokens and owner of the dydx account.\n    /// @param to The recipient of the tokens.\n    /// @param amount Minimum amount of `toTokenAddress` tokens to deposit or withdraw.\n    /// @param encodedBridgeData An abi-encoded `BridgeData` struct.\n    /// @return success The magic bytes if successful.\n    function bridgeTransferFrom(\n        address, /* toTokenAddress */\n        address from,\n        address to,\n        uint256 amount,\n        bytes calldata encodedBridgeData\n    )\n        external\n        returns (bytes4 success)\n    {\n        // Ensure that only the `ERC20BridgeProxy` can call this function.\n        require(\n            msg.sender == _getERC20BridgeProxyAddress(),\n            \"DydxBridge/ONLY_CALLABLE_BY_ERC20_BRIDGE_PROXY\"\n        );\n\n        // Decode bridge data.\n        (BridgeData memory bridgeData) = abi.decode(encodedBridgeData, (BridgeData));\n\n        // The dydx accounts are owned by the `from` address.\n        IDydx.AccountInfo[] memory accounts = _createAccounts(from, bridgeData);\n\n        // Create dydx actions to run on the dydx accounts.\n        IDydx.ActionArgs[] memory actions = _createActions(\n            from,\n            to,\n            amount,\n            bridgeData\n        );\n\n        // Run operation. This will revert on failure.\n        IDydx(_getDydxAddress()).operate(accounts, actions);\n\n        return BRIDGE_SUCCESS;\n    }\n\n    /// @dev Creates an array of accounts for dydx to operate on.\n    ///      All accounts must belong to the same owner.\n    /// @param accountOwner Owner of the dydx account.\n    /// @param bridgeData A `BridgeData` struct.\n    function _createAccounts(\n        address accountOwner,\n        BridgeData memory bridgeData\n    )\n        internal\n        returns (IDydx.AccountInfo[] memory accounts)\n    {\n        uint256[] memory accountNumbers = bridgeData.accountNumbers;\n        uint256 nAccounts = accountNumbers.length;\n        accounts = new IDydx.AccountInfo[](nAccounts);\n        for (uint256 i = 0; i < nAccounts; ++i) {\n            accounts[i] = IDydx.AccountInfo({\n                owner: accountOwner,\n                number: accountNumbers[i]\n            });\n        }\n    }\n\n    /// @dev Creates an array of actions to carry out on dydx.\n    /// @param depositFrom Deposit value from this address (owner of the dydx account).\n    /// @param withdrawTo Withdraw value to this address.\n    /// @param amount The amount of value available to operate on.\n    /// @param bridgeData A `BridgeData` struct.\n    function _createActions(\n        address depositFrom,\n        address withdrawTo,\n        uint256 amount,\n        BridgeData memory bridgeData\n    )\n        internal\n        returns (IDydx.ActionArgs[] memory actions)\n    {\n        BridgeAction[] memory bridgeActions = bridgeData.actions;\n        uint256 nBridgeActions = bridgeActions.length;\n        actions = new IDydx.ActionArgs[](nBridgeActions);\n        for (uint256 i = 0; i < nBridgeActions; ++i) {\n            // Cache current bridge action.\n            BridgeAction memory bridgeAction = bridgeActions[i];\n\n            // Scale amount, if conversion rate is set.\n            uint256 scaledAmount;\n            if (bridgeAction.conversionRateDenominator > 0) {\n                scaledAmount = LibMath.safeGetPartialAmountFloor(\n                    bridgeAction.conversionRateNumerator,\n                    bridgeAction.conversionRateDenominator,\n                    amount\n                );\n            } else {\n                scaledAmount = amount;\n            }\n\n            // Construct dydx action.\n            if (bridgeAction.actionType == BridgeActionType.Deposit) {\n                // Deposit tokens from the account owner into their dydx account.\n                actions[i] = _createDepositAction(\n                    depositFrom,\n                    scaledAmount,\n                    bridgeAction\n                );\n            } else if (bridgeAction.actionType == BridgeActionType.Withdraw) {\n                // Withdraw tokens from dydx to the `otherAccount`.\n                actions[i] = _createWithdrawAction(\n                    withdrawTo,\n                    scaledAmount,\n                    bridgeAction\n                );\n            } else {\n                // If all values in the `Action` enum are handled then this\n                // revert is unreachable: Solidity will revert when casting\n                // from `uint8` to `Action`.\n                revert(\"DydxBridge/UNRECOGNIZED_BRIDGE_ACTION\");\n            }\n        }\n    }\n\n    /// @dev Returns a dydx `DepositAction`.\n    /// @param depositFrom Deposit tokens from this address who is also the account owner.\n    /// @param amount of tokens to deposit.\n    /// @param bridgeAction A `BridgeAction` struct.\n    /// @return depositAction The encoded dydx action.\n    function _createDepositAction(\n        address depositFrom,\n        uint256 amount,\n        BridgeAction memory bridgeAction\n    )\n        internal\n        pure\n        returns (\n            IDydx.ActionArgs memory depositAction\n        )\n    {\n        // Create dydx amount.\n        IDydx.AssetAmount memory dydxAmount = IDydx.AssetAmount({\n            sign: true,                                 // true if positive.\n            denomination: IDydx.AssetDenomination.Wei,  // Wei => actual token amount held in account.\n            ref: IDydx.AssetReference.Delta,                // Delta => a relative amount.\n            value: amount                               // amount to deposit.\n        });\n\n        // Create dydx deposit action.\n        depositAction = IDydx.ActionArgs({\n            actionType: IDydx.ActionType.Deposit,           // deposit tokens.\n            amount: dydxAmount,                             // amount to deposit.\n            accountIdx: bridgeAction.accountIdx,             // index in the `accounts` when calling `operate`.\n            primaryMarketId: bridgeAction.marketId,         // indicates which token to deposit.\n            otherAddress: depositFrom,                      // deposit from the account owner.\n            // unused parameters\n            secondaryMarketId: 0,\n            otherAccountIdx: 0,\n            data: hex''\n        });\n    }\n\n    /// @dev Returns a dydx `WithdrawAction`.\n    /// @param withdrawTo Withdraw tokens to this address.\n    /// @param amount of tokens to withdraw.\n    /// @param bridgeAction A `BridgeAction` struct.\n    /// @return withdrawAction The encoded dydx action.\n    function _createWithdrawAction(\n        address withdrawTo,\n        uint256 amount,\n        BridgeAction memory bridgeAction\n    )\n        internal\n        pure\n        returns (\n            IDydx.ActionArgs memory withdrawAction\n        )\n    {\n        // Create dydx amount.\n        IDydx.AssetAmount memory amountToWithdraw = IDydx.AssetAmount({\n            sign: false,                                    // false if negative.\n            denomination: IDydx.AssetDenomination.Wei,      // Wei => actual token amount held in account.\n            ref: IDydx.AssetReference.Delta,                // Delta => a relative amount.\n            value: amount                                   // amount to withdraw.\n        });\n\n        // Create withdraw action.\n        withdrawAction = IDydx.ActionArgs({\n            actionType: IDydx.ActionType.Withdraw,          // withdraw tokens.\n            amount: amountToWithdraw,                       // amount to withdraw.\n            accountIdx: bridgeAction.accountIdx,            // index in the `accounts` when calling `operate`.\n            primaryMarketId: bridgeAction.marketId,         // indicates which token to withdraw.\n            otherAddress: withdrawTo,                       // withdraw tokens to this address.\n            // unused parameters\n            secondaryMarketId: 0,\n            otherAccountIdx: 0,\n            data: hex''\n        });\n    }\n}\n"
        },
        "@0x/contracts-utils/contracts/src/DeploymentConstants.sol": {
            "id": 68,
            "content": "/*\n\n  Copyright 2020 ZeroEx Intl.\n\n  Licensed under the Apache License, Version 2.0 (the \"License\");\n  you may not use this file except in compliance with the License.\n  You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing, software\n  distributed under the License is distributed on an \"AS IS\" BASIS,\n  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  See the License for the specific language governing permissions and\n  limitations under the License.\n\n*/\n\npragma solidity ^0.5.9;\n\n\ncontract DeploymentConstants {\n\n    // solhint-disable separate-by-one-line-in-contract\n\n    // Mainnet addresses ///////////////////////////////////////////////////////\n    /// @dev Mainnet address of the WETH contract.\n    address constant private WETH_ADDRESS = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\n    /// @dev Mainnet address of the KyberNetworkProxy contract.\n    address constant private KYBER_NETWORK_PROXY_ADDRESS = 0x9AAb3f75489902f3a48495025729a0AF77d4b11e;\n    /// @dev Mainnet address of the KyberHintHandler contract.\n    address constant private KYBER_HINT_HANDLER_ADDRESS = 0xa1C0Fa73c39CFBcC11ec9Eb1Afc665aba9996E2C;\n    /// @dev Mainnet address of the `UniswapExchangeFactory` contract.\n    address constant private UNISWAP_EXCHANGE_FACTORY_ADDRESS = 0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95;\n    /// @dev Mainnet address of the `UniswapV2Router01` contract.\n    address constant private UNISWAP_V2_ROUTER_01_ADDRESS = 0xf164fC0Ec4E93095b804a4795bBe1e041497b92a;\n    /// @dev Mainnet address of the Eth2Dai `MatchingMarket` contract.\n    address constant private ETH2DAI_ADDRESS = 0x794e6e91555438aFc3ccF1c5076A74F42133d08D;\n    /// @dev Mainnet address of the `ERC20BridgeProxy` contract\n    address constant private ERC20_BRIDGE_PROXY_ADDRESS = 0x8ED95d1746bf1E4dAb58d8ED4724f1Ef95B20Db0;\n    ///@dev Mainnet address of the `Dai` (multi-collateral) contract\n    address constant private DAI_ADDRESS = 0x6B175474E89094C44Da98b954EedeAC495271d0F;\n    /// @dev Mainnet address of the `Chai` contract\n    address constant private CHAI_ADDRESS = 0x06AF07097C9Eeb7fD685c692751D5C66dB49c215;\n    /// @dev Mainnet address of the 0x DevUtils contract.\n    address constant private DEV_UTILS_ADDRESS = 0x74134CF88b21383713E096a5ecF59e297dc7f547;\n    /// @dev Kyber ETH pseudo-address.\n    address constant internal KYBER_ETH_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n    /// @dev Mainnet address of the dYdX contract.\n    address constant private DYDX_ADDRESS = 0x1E0447b19BB6EcFdAe1e4AE1694b0C3659614e4e;\n    /// @dev Mainnet address of the GST2 contract\n    address constant private GST_ADDRESS = 0x0000000000b3F879cb30FE243b4Dfee438691c04;\n    /// @dev Mainnet address of the GST Collector\n    address constant private GST_COLLECTOR_ADDRESS = 0x000000D3b08566BE75A6DB803C03C85C0c1c5B96;\n    /// @dev Mainnet address of the mStable mUSD contract.\n    address constant private MUSD_ADDRESS = 0xe2f2a5C287993345a840Db3B0845fbC70f5935a5;\n    /// @dev Mainnet address of the Mooniswap Registry contract\n    address constant private MOONISWAP_REGISTRY = 0x71CD6666064C3A1354a3B4dca5fA1E2D3ee7D303;\n    /// @dev Mainnet address of the DODO Registry (ZOO) contract\n    address constant private DODO_REGISTRY = 0x3A97247DF274a17C59A3bd12735ea3FcDFb49950;\n    /// @dev Mainnet address of the DODO Helper contract\n    address constant private DODO_HELPER = 0x533dA777aeDCE766CEAe696bf90f8541A4bA80Eb;\n\n    // // Ropsten addresses ///////////////////////////////////////////////////////\n    // /// @dev Mainnet address of the WETH contract.\n    // address constant private WETH_ADDRESS = 0xc778417E063141139Fce010982780140Aa0cD5Ab;\n    // /// @dev Mainnet address of the KyberNetworkProxy contract.\n    // address constant private KYBER_NETWORK_PROXY_ADDRESS = 0xd719c34261e099Fdb33030ac8909d5788D3039C4;\n    // /// @dev Mainnet address of the `UniswapExchangeFactory` contract.\n    // address constant private UNISWAP_EXCHANGE_FACTORY_ADDRESS = 0x9c83dCE8CA20E9aAF9D3efc003b2ea62aBC08351;\n    // /// @dev Mainnet address of the `UniswapV2Router01` contract.\n    // address constant private UNISWAP_V2_ROUTER_01_ADDRESS = 0xf164fC0Ec4E93095b804a4795bBe1e041497b92a;\n    // /// @dev Mainnet address of the Eth2Dai `MatchingMarket` contract.\n    // address constant private ETH2DAI_ADDRESS = address(0);\n    // /// @dev Mainnet address of the `ERC20BridgeProxy` contract\n    // address constant private ERC20_BRIDGE_PROXY_ADDRESS = 0xb344afeD348de15eb4a9e180205A2B0739628339;\n    // ///@dev Mainnet address of the `Dai` (multi-collateral) contract\n    // address constant private DAI_ADDRESS = address(0);\n    // /// @dev Mainnet address of the `Chai` contract\n    // address constant private CHAI_ADDRESS = address(0);\n    // /// @dev Mainnet address of the 0x DevUtils contract.\n    // address constant private DEV_UTILS_ADDRESS = 0xC812AF3f3fBC62F76ea4262576EC0f49dB8B7f1c;\n    // /// @dev Kyber ETH pseudo-address.\n    // address constant internal KYBER_ETH_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n    // /// @dev Mainnet address of the dYdX contract.\n    // address constant private DYDX_ADDRESS = address(0);\n    // /// @dev Mainnet address of the GST2 contract\n    // address constant private GST_ADDRESS = address(0);\n    // /// @dev Mainnet address of the GST Collector\n    // address constant private GST_COLLECTOR_ADDRESS = address(0);\n    // /// @dev Mainnet address of the mStable mUSD contract.\n    // address constant private MUSD_ADDRESS = 0x4E1000616990D83e56f4b5fC6CC8602DcfD20459;\n\n    // // Rinkeby addresses ///////////////////////////////////////////////////////\n    // /// @dev Mainnet address of the WETH contract.\n    // address constant private WETH_ADDRESS = 0xc778417E063141139Fce010982780140Aa0cD5Ab;\n    // /// @dev Mainnet address of the KyberNetworkProxy contract.\n    // address constant private KYBER_NETWORK_PROXY_ADDRESS = 0x0d5371e5EE23dec7DF251A8957279629aa79E9C5;\n    // /// @dev Mainnet address of the `UniswapExchangeFactory` contract.\n    // address constant private UNISWAP_EXCHANGE_FACTORY_ADDRESS = 0xf5D915570BC477f9B8D6C0E980aA81757A3AaC36;\n    // /// @dev Mainnet address of the `UniswapV2Router01` contract.\n    // address constant private UNISWAP_V2_ROUTER_01_ADDRESS = 0xf164fC0Ec4E93095b804a4795bBe1e041497b92a;\n    // /// @dev Mainnet address of the Eth2Dai `MatchingMarket` contract.\n    // address constant private ETH2DAI_ADDRESS = address(0);\n    // /// @dev Mainnet address of the `ERC20BridgeProxy` contract\n    // address constant private ERC20_BRIDGE_PROXY_ADDRESS = 0xA2AA4bEFED748Fba27a3bE7Dfd2C4b2c6DB1F49B;\n    // ///@dev Mainnet address of the `Dai` (multi-collateral) contract\n    // address constant private DAI_ADDRESS = address(0);\n    // /// @dev Mainnet address of the `Chai` contract\n    // address constant private CHAI_ADDRESS = address(0);\n    // /// @dev Mainnet address of the 0x DevUtils contract.\n    // address constant private DEV_UTILS_ADDRESS = 0x46B5BC959e8A754c0256FFF73bF34A52Ad5CdfA9;\n    // /// @dev Kyber ETH pseudo-address.\n    // address constant internal KYBER_ETH_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n    // /// @dev Mainnet address of the dYdX contract.\n    // address constant private DYDX_ADDRESS = address(0);\n    // /// @dev Mainnet address of the GST2 contract\n    // address constant private GST_ADDRESS = address(0);\n    // /// @dev Mainnet address of the GST Collector\n    // address constant private GST_COLLECTOR_ADDRESS = address(0);\n    // /// @dev Mainnet address of the mStable mUSD contract.\n    // address constant private MUSD_ADDRESS = address(0);\n\n    // // Kovan addresses /////////////////////////////////////////////////////////\n    // /// @dev Kovan address of the WETH contract.\n    // address constant private WETH_ADDRESS = 0xd0A1E359811322d97991E03f863a0C30C2cF029C;\n    // /// @dev Kovan address of the KyberNetworkProxy contract.\n    // address constant private KYBER_NETWORK_PROXY_ADDRESS = 0x692f391bCc85cefCe8C237C01e1f636BbD70EA4D;\n    // /// @dev Kovan address of the `UniswapExchangeFactory` contract.\n    // address constant private UNISWAP_EXCHANGE_FACTORY_ADDRESS = 0xD3E51Ef092B2845f10401a0159B2B96e8B6c3D30;\n    // /// @dev Kovan address of the `UniswapV2Router01` contract.\n    // address constant private UNISWAP_V2_ROUTER_01_ADDRESS = 0xf164fC0Ec4E93095b804a4795bBe1e041497b92a;\n    // /// @dev Kovan address of the Eth2Dai `MatchingMarket` contract.\n    // address constant private ETH2DAI_ADDRESS = 0xe325acB9765b02b8b418199bf9650972299235F4;\n    // /// @dev Kovan address of the `ERC20BridgeProxy` contract\n    // address constant private ERC20_BRIDGE_PROXY_ADDRESS = 0x3577552C1Fb7A44aD76BeEB7aB53251668A21F8D;\n    // /// @dev Kovan address of the `Chai` contract\n    // address constant private CHAI_ADDRESS = address(0);\n    // /// @dev Kovan address of the `Dai` (multi-collateral) contract\n    // address constant private DAI_ADDRESS = 0x4F96Fe3b7A6Cf9725f59d353F723c1bDb64CA6Aa;\n    // /// @dev Kovan address of the 0x DevUtils contract.\n    // address constant private DEV_UTILS_ADDRESS = 0x9402639A828BdF4E9e4103ac3B69E1a6E522eB59;\n    // /// @dev Kyber ETH pseudo-address.\n    // address constant internal KYBER_ETH_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n    // /// @dev Kovan address of the dYdX contract.\n    // address constant private DYDX_ADDRESS = address(0);\n    // /// @dev Kovan address of the GST2 contract\n    // address constant private GST_ADDRESS = address(0);\n    // /// @dev Kovan address of the GST Collector\n    // address constant private GST_COLLECTOR_ADDRESS = address(0);\n    // /// @dev Mainnet address of the mStable mUSD contract.\n    // address constant private MUSD_ADDRESS = address(0);\n\n    /// @dev Overridable way to get the `KyberNetworkProxy` address.\n    /// @return kyberAddress The `IKyberNetworkProxy` address.\n    function _getKyberNetworkProxyAddress()\n        internal\n        view\n        returns (address kyberAddress)\n    {\n        return KYBER_NETWORK_PROXY_ADDRESS;\n    }\n\n    /// @dev Overridable way to get the `KyberHintHandler` address.\n    /// @return kyberAddress The `IKyberHintHandler` address.\n    function _getKyberHintHandlerAddress()\n        internal\n        view\n        returns (address hintHandlerAddress)\n    {\n        return KYBER_HINT_HANDLER_ADDRESS;\n    }\n\n    /// @dev Overridable way to get the WETH address.\n    /// @return wethAddress The WETH address.\n    function _getWethAddress()\n        internal\n        view\n        returns (address wethAddress)\n    {\n        return WETH_ADDRESS;\n    }\n\n    /// @dev Overridable way to get the `UniswapExchangeFactory` address.\n    /// @return uniswapAddress The `UniswapExchangeFactory` address.\n    function _getUniswapExchangeFactoryAddress()\n        internal\n        view\n        returns (address uniswapAddress)\n    {\n        return UNISWAP_EXCHANGE_FACTORY_ADDRESS;\n    }\n\n    /// @dev Overridable way to get the `UniswapV2Router01` address.\n    /// @return uniswapRouterAddress The `UniswapV2Router01` address.\n    function _getUniswapV2Router01Address()\n        internal\n        view\n        returns (address uniswapRouterAddress)\n    {\n        return UNISWAP_V2_ROUTER_01_ADDRESS;\n    }\n\n    /// @dev An overridable way to retrieve the Eth2Dai `MatchingMarket` contract.\n    /// @return eth2daiAddress The Eth2Dai `MatchingMarket` contract.\n    function _getEth2DaiAddress()\n        internal\n        view\n        returns (address eth2daiAddress)\n    {\n        return ETH2DAI_ADDRESS;\n    }\n\n    /// @dev An overridable way to retrieve the `ERC20BridgeProxy` contract.\n    /// @return erc20BridgeProxyAddress The `ERC20BridgeProxy` contract.\n    function _getERC20BridgeProxyAddress()\n        internal\n        view\n        returns (address erc20BridgeProxyAddress)\n    {\n        return ERC20_BRIDGE_PROXY_ADDRESS;\n    }\n\n    /// @dev An overridable way to retrieve the `Dai` contract.\n    /// @return daiAddress The `Dai` contract.\n    function _getDaiAddress()\n        internal\n        view\n        returns (address daiAddress)\n    {\n        return DAI_ADDRESS;\n    }\n\n    /// @dev An overridable way to retrieve the `Chai` contract.\n    /// @return chaiAddress The `Chai` contract.\n    function _getChaiAddress()\n        internal\n        view\n        returns (address chaiAddress)\n    {\n        return CHAI_ADDRESS;\n    }\n\n    /// @dev An overridable way to retrieve the 0x `DevUtils` contract address.\n    /// @return devUtils The 0x `DevUtils` contract address.\n    function _getDevUtilsAddress()\n        internal\n        view\n        returns (address devUtils)\n    {\n        return DEV_UTILS_ADDRESS;\n    }\n\n    /// @dev Overridable way to get the DyDx contract.\n    /// @return exchange The DyDx exchange contract.\n    function _getDydxAddress()\n        internal\n        view\n        returns (address dydxAddress)\n    {\n        return DYDX_ADDRESS;\n    }\n\n    /// @dev An overridable way to retrieve the GST2 contract address.\n    /// @return gst The GST contract.\n    function _getGstAddress()\n        internal\n        view\n        returns (address gst)\n    {\n        return GST_ADDRESS;\n    }\n\n    /// @dev An overridable way to retrieve the GST Collector address.\n    /// @return collector The GST collector address.\n    function _getGstCollectorAddress()\n        internal\n        view\n        returns (address collector)\n    {\n        return GST_COLLECTOR_ADDRESS;\n    }\n\n    /// @dev An overridable way to retrieve the mStable mUSD address.\n    /// @return musd The mStable mUSD address.\n    function _getMUsdAddress()\n        internal\n        view\n        returns (address musd)\n    {\n        return MUSD_ADDRESS;\n    }\n\n    /// @dev An overridable way to retrieve the Mooniswap registry address.\n    /// @return registry The Mooniswap registry address.\n    function _getMooniswapAddress()\n        internal\n        view\n        returns (address)\n    {\n        return MOONISWAP_REGISTRY;\n    }\n\n    /// @dev An overridable way to retrieve the DODO Registry contract address.\n    /// @return registry The DODO Registry contract address.\n    function _getDODORegistryAddress()\n        internal\n        view\n        returns (address)\n    {\n        return DODO_REGISTRY;\n    }\n\n    /// @dev An overridable way to retrieve the DODO Helper contract address.\n    /// @return registry The DODO Helper contract address.\n    function _getDODOHelperAddress()\n        internal\n        view\n        returns (address)\n    {\n        return DODO_HELPER;\n    }\n}\n"
        },
        "@0x/contracts-utils/contracts/src/LibSafeMath.sol": {
            "id": 76,
            "content": "pragma solidity ^0.5.9;\n\nimport \"./LibRichErrors.sol\";\nimport \"./LibSafeMathRichErrors.sol\";\n\n\nlibrary LibSafeMath {\n\n    function safeMul(uint256 a, uint256 b)\n        internal\n        pure\n        returns (uint256)\n    {\n        if (a == 0) {\n            return 0;\n        }\n        uint256 c = a * b;\n        if (c / a != b) {\n            LibRichErrors.rrevert(LibSafeMathRichErrors.Uint256BinOpError(\n                LibSafeMathRichErrors.BinOpErrorCodes.MULTIPLICATION_OVERFLOW,\n                a,\n                b\n            ));\n        }\n        return c;\n    }\n\n    function safeDiv(uint256 a, uint256 b)\n        internal\n        pure\n        returns (uint256)\n    {\n        if (b == 0) {\n            LibRichErrors.rrevert(LibSafeMathRichErrors.Uint256BinOpError(\n                LibSafeMathRichErrors.BinOpErrorCodes.DIVISION_BY_ZERO,\n                a,\n                b\n            ));\n        }\n        uint256 c = a / b;\n        return c;\n    }\n\n    function safeSub(uint256 a, uint256 b)\n        internal\n        pure\n        returns (uint256)\n    {\n        if (b > a) {\n            LibRichErrors.rrevert(LibSafeMathRichErrors.Uint256BinOpError(\n                LibSafeMathRichErrors.BinOpErrorCodes.SUBTRACTION_UNDERFLOW,\n                a,\n                b\n            ));\n        }\n        return a - b;\n    }\n\n    function safeAdd(uint256 a, uint256 b)\n        internal\n        pure\n        returns (uint256)\n    {\n        uint256 c = a + b;\n        if (c < a) {\n            LibRichErrors.rrevert(LibSafeMathRichErrors.Uint256BinOpError(\n                LibSafeMathRichErrors.BinOpErrorCodes.ADDITION_OVERFLOW,\n                a,\n                b\n            ));\n        }\n        return c;\n    }\n\n    function max256(uint256 a, uint256 b)\n        internal\n        pure\n        returns (uint256)\n    {\n        return a >= b ? a : b;\n    }\n\n    function min256(uint256 a, uint256 b)\n        internal\n        pure\n        returns (uint256)\n    {\n        return a < b ? a : b;\n    }\n}\n"
        },
        "@0x/contracts-utils/contracts/src/LibRichErrors.sol": {
            "id": 75,
            "content": "/*\n\n  Copyright 2019 ZeroEx Intl.\n\n  Licensed under the Apache License, Version 2.0 (the \"License\");\n  you may not use this file except in compliance with the License.\n  You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing, software\n  distributed under the License is distributed on an \"AS IS\" BASIS,\n  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  See the License for the specific language governing permissions and\n  limitations under the License.\n\n*/\n\npragma solidity ^0.5.9;\n\n\nlibrary LibRichErrors {\n\n    // bytes4(keccak256(\"Error(string)\"))\n    bytes4 internal constant STANDARD_ERROR_SELECTOR =\n        0x08c379a0;\n\n    // solhint-disable func-name-mixedcase\n    /// @dev ABI encode a standard, string revert error payload.\n    ///      This is the same payload that would be included by a `revert(string)`\n    ///      solidity statement. It has the function signature `Error(string)`.\n    /// @param message The error string.\n    /// @return The ABI encoded error.\n    function StandardError(\n        string memory message\n    )\n        internal\n        pure\n        returns (bytes memory)\n    {\n        return abi.encodeWithSelector(\n            STANDARD_ERROR_SELECTOR,\n            bytes(message)\n        );\n    }\n    // solhint-enable func-name-mixedcase\n\n    /// @dev Reverts an encoded rich revert reason `errorData`.\n    /// @param errorData ABI encoded error data.\n    function rrevert(bytes memory errorData)\n        internal\n        pure\n    {\n        assembly {\n            revert(add(errorData, 0x20), mload(errorData))\n        }\n    }\n}\n"
        },
        "@0x/contracts-utils/contracts/src/LibSafeMathRichErrors.sol": {
            "id": 77,
            "content": "pragma solidity ^0.5.9;\n\n\nlibrary LibSafeMathRichErrors {\n\n    // bytes4(keccak256(\"Uint256BinOpError(uint8,uint256,uint256)\"))\n    bytes4 internal constant UINT256_BINOP_ERROR_SELECTOR =\n        0xe946c1bb;\n\n    // bytes4(keccak256(\"Uint256DowncastError(uint8,uint256)\"))\n    bytes4 internal constant UINT256_DOWNCAST_ERROR_SELECTOR =\n        0xc996af7b;\n\n    enum BinOpErrorCodes {\n        ADDITION_OVERFLOW,\n        MULTIPLICATION_OVERFLOW,\n        SUBTRACTION_UNDERFLOW,\n        DIVISION_BY_ZERO\n    }\n\n    enum DowncastErrorCodes {\n        VALUE_TOO_LARGE_TO_DOWNCAST_TO_UINT32,\n        VALUE_TOO_LARGE_TO_DOWNCAST_TO_UINT64,\n        VALUE_TOO_LARGE_TO_DOWNCAST_TO_UINT96\n    }\n\n    // solhint-disable func-name-mixedcase\n    function Uint256BinOpError(\n        BinOpErrorCodes errorCode,\n        uint256 a,\n        uint256 b\n    )\n        internal\n        pure\n        returns (bytes memory)\n    {\n        return abi.encodeWithSelector(\n            UINT256_BINOP_ERROR_SELECTOR,\n            errorCode,\n            a,\n            b\n        );\n    }\n\n    function Uint256DowncastError(\n        DowncastErrorCodes errorCode,\n        uint256 a\n    )\n        internal\n        pure\n        returns (bytes memory)\n    {\n        return abi.encodeWithSelector(\n            UINT256_DOWNCAST_ERROR_SELECTOR,\n            errorCode,\n            a\n        );\n    }\n}\n"
        },
        "@0x/contracts-exchange-libs/contracts/src/LibMath.sol": {
            "id": 65,
            "content": "/*\n\n  Copyright 2019 ZeroEx Intl.\n\n  Licensed under the Apache License, Version 2.0 (the \"License\");\n  you may not use this file except in compliance with the License.\n  You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing, software\n  distributed under the License is distributed on an \"AS IS\" BASIS,\n  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  See the License for the specific language governing permissions and\n  limitations under the License.\n\n*/\n\npragma solidity ^0.5.9;\n\nimport \"@0x/contracts-utils/contracts/src/LibSafeMath.sol\";\nimport \"@0x/contracts-utils/contracts/src/LibRichErrors.sol\";\nimport \"./LibMathRichErrors.sol\";\n\n\nlibrary LibMath {\n\n    using LibSafeMath for uint256;\n\n    /// @dev Calculates partial value given a numerator and denominator rounded down.\n    ///      Reverts if rounding error is >= 0.1%\n    /// @param numerator Numerator.\n    /// @param denominator Denominator.\n    /// @param target Value to calculate partial of.\n    /// @return Partial value of target rounded down.\n    function safeGetPartialAmountFloor(\n        uint256 numerator,\n        uint256 denominator,\n        uint256 target\n    )\n        internal\n        pure\n        returns (uint256 partialAmount)\n    {\n        if (isRoundingErrorFloor(\n                numerator,\n                denominator,\n                target\n        )) {\n            LibRichErrors.rrevert(LibMathRichErrors.RoundingError(\n                numerator,\n                denominator,\n                target\n            ));\n        }\n\n        partialAmount = numerator.safeMul(target).safeDiv(denominator);\n        return partialAmount;\n    }\n\n    /// @dev Calculates partial value given a numerator and denominator rounded down.\n    ///      Reverts if rounding error is >= 0.1%\n    /// @param numerator Numerator.\n    /// @param denominator Denominator.\n    /// @param target Value to calculate partial of.\n    /// @return Partial value of target rounded up.\n    function safeGetPartialAmountCeil(\n        uint256 numerator,\n        uint256 denominator,\n        uint256 target\n    )\n        internal\n        pure\n        returns (uint256 partialAmount)\n    {\n        if (isRoundingErrorCeil(\n                numerator,\n                denominator,\n                target\n        )) {\n            LibRichErrors.rrevert(LibMathRichErrors.RoundingError(\n                numerator,\n                denominator,\n                target\n            ));\n        }\n\n        // safeDiv computes `floor(a / b)`. We use the identity (a, b integer):\n        //       ceil(a / b) = floor((a + b - 1) / b)\n        // To implement `ceil(a / b)` using safeDiv.\n        partialAmount = numerator.safeMul(target)\n            .safeAdd(denominator.safeSub(1))\n            .safeDiv(denominator);\n\n        return partialAmount;\n    }\n\n    /// @dev Calculates partial value given a numerator and denominator rounded down.\n    /// @param numerator Numerator.\n    /// @param denominator Denominator.\n    /// @param target Value to calculate partial of.\n    /// @return Partial value of target rounded down.\n    function getPartialAmountFloor(\n        uint256 numerator,\n        uint256 denominator,\n        uint256 target\n    )\n        internal\n        pure\n        returns (uint256 partialAmount)\n    {\n        partialAmount = numerator.safeMul(target).safeDiv(denominator);\n        return partialAmount;\n    }\n\n    /// @dev Calculates partial value given a numerator and denominator rounded down.\n    /// @param numerator Numerator.\n    /// @param denominator Denominator.\n    /// @param target Value to calculate partial of.\n    /// @return Partial value of target rounded up.\n    function getPartialAmountCeil(\n        uint256 numerator,\n        uint256 denominator,\n        uint256 target\n    )\n        internal\n        pure\n        returns (uint256 partialAmount)\n    {\n        // safeDiv computes `floor(a / b)`. We use the identity (a, b integer):\n        //       ceil(a / b) = floor((a + b - 1) / b)\n        // To implement `ceil(a / b)` using safeDiv.\n        partialAmount = numerator.safeMul(target)\n            .safeAdd(denominator.safeSub(1))\n            .safeDiv(denominator);\n\n        return partialAmount;\n    }\n\n    /// @dev Checks if rounding error >= 0.1% when rounding down.\n    /// @param numerator Numerator.\n    /// @param denominator Denominator.\n    /// @param target Value to multiply with numerator/denominator.\n    /// @return Rounding error is present.\n    function isRoundingErrorFloor(\n        uint256 numerator,\n        uint256 denominator,\n        uint256 target\n    )\n        internal\n        pure\n        returns (bool isError)\n    {\n        if (denominator == 0) {\n            LibRichErrors.rrevert(LibMathRichErrors.DivisionByZeroError());\n        }\n\n        // The absolute rounding error is the difference between the rounded\n        // value and the ideal value. The relative rounding error is the\n        // absolute rounding error divided by the absolute value of the\n        // ideal value. This is undefined when the ideal value is zero.\n        //\n        // The ideal value is `numerator * target / denominator`.\n        // Let's call `numerator * target % denominator` the remainder.\n        // The absolute error is `remainder / denominator`.\n        //\n        // When the ideal value is zero, we require the absolute error to\n        // be zero. Fortunately, this is always the case. The ideal value is\n        // zero iff `numerator == 0` and/or `target == 0`. In this case the\n        // remainder and absolute error are also zero.\n        if (target == 0 || numerator == 0) {\n            return false;\n        }\n\n        // Otherwise, we want the relative rounding error to be strictly\n        // less than 0.1%.\n        // The relative error is `remainder / (numerator * target)`.\n        // We want the relative error less than 1 / 1000:\n        //        remainder / (numerator * denominator)  <  1 / 1000\n        // or equivalently:\n        //        1000 * remainder  <  numerator * target\n        // so we have a rounding error iff:\n        //        1000 * remainder  >=  numerator * target\n        uint256 remainder = mulmod(\n            target,\n            numerator,\n            denominator\n        );\n        isError = remainder.safeMul(1000) >= numerator.safeMul(target);\n        return isError;\n    }\n\n    /// @dev Checks if rounding error >= 0.1% when rounding up.\n    /// @param numerator Numerator.\n    /// @param denominator Denominator.\n    /// @param target Value to multiply with numerator/denominator.\n    /// @return Rounding error is present.\n    function isRoundingErrorCeil(\n        uint256 numerator,\n        uint256 denominator,\n        uint256 target\n    )\n        internal\n        pure\n        returns (bool isError)\n    {\n        if (denominator == 0) {\n            LibRichErrors.rrevert(LibMathRichErrors.DivisionByZeroError());\n        }\n\n        // See the comments in `isRoundingError`.\n        if (target == 0 || numerator == 0) {\n            // When either is zero, the ideal value and rounded value are zero\n            // and there is no rounding error. (Although the relative error\n            // is undefined.)\n            return false;\n        }\n        // Compute remainder as before\n        uint256 remainder = mulmod(\n            target,\n            numerator,\n            denominator\n        );\n        remainder = denominator.safeSub(remainder) % denominator;\n        isError = remainder.safeMul(1000) >= numerator.safeMul(target);\n        return isError;\n    }\n}\n"
        },
        "@0x/contracts-exchange-libs/contracts/src/LibMathRichErrors.sol": {
            "id": 66,
            "content": "pragma solidity ^0.5.9;\n\n\nlibrary LibMathRichErrors {\n\n    // bytes4(keccak256(\"DivisionByZeroError()\"))\n    bytes internal constant DIVISION_BY_ZERO_ERROR =\n        hex\"a791837c\";\n\n    // bytes4(keccak256(\"RoundingError(uint256,uint256,uint256)\"))\n    bytes4 internal constant ROUNDING_ERROR_SELECTOR =\n        0x339f3de2;\n\n    // solhint-disable func-name-mixedcase\n    function DivisionByZeroError()\n        internal\n        pure\n        returns (bytes memory)\n    {\n        return DIVISION_BY_ZERO_ERROR;\n    }\n\n    function RoundingError(\n        uint256 numerator,\n        uint256 denominator,\n        uint256 target\n    )\n        internal\n        pure\n        returns (bytes memory)\n    {\n        return abi.encodeWithSelector(\n            ROUNDING_ERROR_SELECTOR,\n            numerator,\n            denominator,\n            target\n        );\n    }\n}\n"
        },
        "../interfaces/IERC20Bridge.sol": {
            "id": 39,
            "content": "/*\n\n  Copyright 2019 ZeroEx Intl.\n\n  Licensed under the Apache License, Version 2.0 (the \"License\");\n  you may not use this file except in compliance with the License.\n  You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing, software\n  distributed under the License is distributed on an \"AS IS\" BASIS,\n  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  See the License for the specific language governing permissions and\n  limitations under the License.\n\n*/\n\npragma solidity ^0.5.9;\n\n\ncontract IERC20Bridge {\n\n    /// @dev Result of a successful bridge call.\n    bytes4 constant internal BRIDGE_SUCCESS = 0xdc1600f3;\n\n    /// @dev Emitted when a trade occurs.\n    /// @param inputToken The token the bridge is converting from.\n    /// @param outputToken The token the bridge is converting to.\n    /// @param inputTokenAmount Amount of input token.\n    /// @param outputTokenAmount Amount of output token.\n    /// @param from The `from` address in `bridgeTransferFrom()`\n    /// @param to The `to` address in `bridgeTransferFrom()`\n    event ERC20BridgeTransfer(\n        address inputToken,\n        address outputToken,\n        uint256 inputTokenAmount,\n        uint256 outputTokenAmount,\n        address from,\n        address to\n    );\n\n    /// @dev Transfers `amount` of the ERC20 `tokenAddress` from `from` to `to`.\n    /// @param tokenAddress The address of the ERC20 token to transfer.\n    /// @param from Address to transfer asset from.\n    /// @param to Address to transfer asset to.\n    /// @param amount Amount of asset to transfer.\n    /// @param bridgeData Arbitrary asset data needed by the bridge contract.\n    /// @return success The magic bytes `0xdc1600f3` if successful.\n    function bridgeTransferFrom(\n        address tokenAddress,\n        address from,\n        address to,\n        uint256 amount,\n        bytes calldata bridgeData\n    )\n        external\n        returns (bytes4 success);\n}\n"
        },
        "../interfaces/IDydxBridge.sol": {
            "id": 38,
            "content": "/*\n\n  Copyright 2019 ZeroEx Intl.\n\n  Licensed under the Apache License, Version 2.0 (the \"License\");\n  you may not use this file except in compliance with the License.\n  You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing, software\n  distributed under the License is distributed on an \"AS IS\" BASIS,\n  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  See the License for the specific language governing permissions and\n  limitations under the License.\n\n*/\n\npragma solidity ^0.5.9;\n\n\ninterface IDydxBridge {\n\n    /// @dev This is the subset of `IDydx.ActionType` that are supported by the bridge.\n    enum BridgeActionType {\n        Deposit,                    // Deposit tokens into dydx account.\n        Withdraw                    // Withdraw tokens from dydx account.\n    }\n\n    struct BridgeAction {\n        BridgeActionType actionType;            // Action to run on dydx account.\n        uint256 accountIdx;                     // Index in `BridgeData.accountNumbers` for this action.\n        uint256 marketId;                       // Market to operate on.\n        uint256 conversionRateNumerator;        // Optional. If set, transfer amount is scaled by (conversionRateNumerator/conversionRateDenominator).\n        uint256 conversionRateDenominator;      // Optional. If set, transfer amount is scaled by (conversionRateNumerator/conversionRateDenominator).\n    }\n\n    struct BridgeData {\n        uint256[] accountNumbers;               // Account number used to identify the owner's specific account.\n        BridgeAction[] actions;                 // Actions to carry out on the owner's accounts.\n    }\n}\n"
        },
        "../interfaces/IDydx.sol": {
            "id": 37,
            "content": "/*\n\n  Copyright 2019 ZeroEx Intl.\n\n  Licensed under the Apache License, Version 2.0 (the \"License\");\n  you may not use this file except in compliance with the License.\n  You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing, software\n  distributed under the License is distributed on an \"AS IS\" BASIS,\n  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  See the License for the specific language governing permissions and\n  limitations under the License.\n\n*/\n\npragma solidity ^0.5.9;\npragma experimental ABIEncoderV2;\n\n\ninterface IDydx {\n\n    /// @dev Represents the unique key that specifies an account\n    struct AccountInfo {\n        address owner;  // The address that owns the account\n        uint256 number; // A nonce that allows a single address to control many accounts\n    }\n\n    enum ActionType {\n        Deposit,   // supply tokens\n        Withdraw,  // borrow tokens\n        Transfer,  // transfer balance between accounts\n        Buy,       // buy an amount of some token (externally)\n        Sell,      // sell an amount of some token (externally)\n        Trade,     // trade tokens against another account\n        Liquidate, // liquidate an undercollateralized or expiring account\n        Vaporize,  // use excess tokens to zero-out a completely negative account\n        Call       // send arbitrary data to an address\n    }\n\n    /// @dev Arguments that are passed to Solo in an ordered list as part of a single operation.\n    /// Each ActionArgs has an actionType which specifies which action struct that this data will be\n    /// parsed into before being processed.\n    struct ActionArgs {\n        ActionType actionType;\n        uint256 accountIdx;\n        AssetAmount amount;\n        uint256 primaryMarketId;\n        uint256 secondaryMarketId;\n        address otherAddress;\n        uint256 otherAccountIdx;\n        bytes data;\n    }\n\n    enum AssetDenomination {\n        Wei, // the amount is denominated in wei\n        Par  // the amount is denominated in par\n    }\n\n    enum AssetReference {\n        Delta, // the amount is given as a delta from the current value\n        Target // the amount is given as an exact number to end up at\n    }\n\n    struct AssetAmount {\n        bool sign; // true if positive\n        AssetDenomination denomination;\n        AssetReference ref;\n        uint256 value;\n    }\n\n    struct D256 {\n        uint256 value;\n    }\n\n    struct Value {\n        uint256 value;\n    }\n\n    struct Price {\n        uint256 value;\n    }\n\n    struct OperatorArg {\n        address operator;\n        bool trusted;\n    }\n\n    /// @dev The global risk parameters that govern the health and security of the system\n    struct RiskParams {\n        // Required ratio of over-collateralization\n        D256 marginRatio;\n        // Percentage penalty incurred by liquidated accounts\n        D256 liquidationSpread;\n        // Percentage of the borrower's interest fee that gets passed to the suppliers\n        D256 earningsRate;\n        // The minimum absolute borrow value of an account\n        // There must be sufficient incentivize to liquidate undercollateralized accounts\n        Value minBorrowedValue;\n    }\n\n    /// @dev The main entry-point to Solo that allows users and contracts to manage accounts.\n    ///      Take one or more actions on one or more accounts. The msg.sender must be the owner or\n    ///      operator of all accounts except for those being liquidated, vaporized, or traded with.\n    ///      One call to operate() is considered a singular \"operation\". Account collateralization is\n    ///      ensured only after the completion of the entire operation.\n    /// @param  accounts  A list of all accounts that will be used in this operation. Cannot contain\n    ///                   duplicates. In each action, the relevant account will be referred-to by its\n    ///                   index in the list.\n    /// @param  actions   An ordered list of all actions that will be taken in this operation. The\n    ///                   actions will be processed in order.\n    function operate(\n        AccountInfo[] calldata accounts,\n        ActionArgs[] calldata actions\n    )\n        external;\n\n    // @dev Approves/disapproves any number of operators. An operator is an external address that has the\n    //      same permissions to manipulate an account as the owner of the account. Operators are simply\n    //      addresses and therefore may either be externally-owned Ethereum accounts OR smart contracts.\n    //      Operators are also able to act as AutoTrader contracts on behalf of the account owner if the\n    //      operator is a smart contract and implements the IAutoTrader interface.\n    // @param args A list of OperatorArgs which have an address and a boolean. The boolean value\n    //        denotes whether to approve (true) or revoke approval (false) for that address.\n    function setOperators(OperatorArg[] calldata args) external;\n\n    /// @dev Return true if a particular address is approved as an operator for an owner's accounts.\n    ///      Approved operators can act on the accounts of the owner as if it were the operator's own.\n    /// @param owner The owner of the accounts\n    /// @param operator The possible operator\n    /// @return isLocalOperator True if operator is approved for owner's accounts\n    function getIsLocalOperator(\n        address owner,\n        address operator\n    )\n        external\n        view\n        returns (bool isLocalOperator);\n\n    /// @dev Get the ERC20 token address for a market.\n    /// @param marketId The market to query\n    /// @return tokenAddress The token address\n    function getMarketTokenAddress(\n        uint256 marketId\n    )\n        external\n        view\n        returns (address tokenAddress);\n\n    /// @dev Get all risk parameters in a single struct.\n    /// @return riskParams All global risk parameters\n    function getRiskParams()\n        external\n        view\n        returns (RiskParams memory riskParams);\n\n    /// @dev Get the price of the token for a market.\n    /// @param marketId The market to query\n    /// @return price The price of each atomic unit of the token\n    function getMarketPrice(\n        uint256 marketId\n    )\n        external\n        view\n        returns (Price memory price);\n\n    /// @dev Get the margin premium for a market. A margin premium makes it so that any positions that\n    ///      include the market require a higher collateralization to avoid being liquidated.\n    /// @param  marketId  The market to query\n    /// @return premium The market's margin premium\n    function getMarketMarginPremium(uint256 marketId)\n        external\n        view\n        returns (D256 memory premium);\n\n    /// @dev Get the total supplied and total borrowed values of an account adjusted by the marginPremium\n    ///      of each market. Supplied values are divided by (1 + marginPremium) for each market and\n    ///      borrowed values are multiplied by (1 + marginPremium) for each market. Comparing these\n    ///      adjusted values gives the margin-ratio of the account which will be compared to the global\n    ///      margin-ratio when determining if the account can be liquidated.\n    /// @param account The account to query\n    /// @return supplyValue The supplied value of the account (adjusted for marginPremium)\n    /// @return borrowValue The borrowed value of the account (adjusted for marginPremium)\n    function getAdjustedAccountValues(\n        AccountInfo calldata account\n    )\n        external\n        view\n        returns (Value memory supplyValue, Value memory borrowValue);\n}\n"
        }
    },
    "sourceCodes": {
        "./DydxBridge.sol": "/*\n\n  Copyright 2019 ZeroEx Intl.\n\n  Licensed under the Apache License, Version 2.0 (the \"License\");\n  you may not use this file except in compliance with the License.\n  You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing, software\n  distributed under the License is distributed on an \"AS IS\" BASIS,\n  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  See the License for the specific language governing permissions and\n  limitations under the License.\n\n*/\n\npragma solidity ^0.5.9;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-utils/contracts/src/DeploymentConstants.sol\";\nimport \"@0x/contracts-utils/contracts/src/LibSafeMath.sol\";\nimport \"@0x/contracts-exchange-libs/contracts/src/LibMath.sol\";\nimport \"../interfaces/IERC20Bridge.sol\";\nimport \"../interfaces/IDydxBridge.sol\";\nimport \"../interfaces/IDydx.sol\";\n\n\ncontract DydxBridge is\n    IERC20Bridge,\n    IDydxBridge,\n    DeploymentConstants\n{\n\n    using LibSafeMath for uint256;\n\n    /// @dev Callback for `IERC20Bridge`. Deposits or withdraws tokens from a dydx account.\n    ///      Notes:\n    ///         1. This bridge must be set as an operator of the input dydx account.\n    ///         2. This function may only be called in the context of the 0x Exchange.\n    ///         3. The maker or taker of the 0x order must be the dydx account owner.\n    ///         4. Deposits into dydx are made from the `from` address.\n    ///         5. Withdrawals from dydx are made to the `to` address.\n    ///         6. Calling this function must always withdraw at least `amount`,\n    ///            otherwise the `ERC20Bridge` will revert.\n    /// @param from The sender of the tokens and owner of the dydx account.\n    /// @param to The recipient of the tokens.\n    /// @param amount Minimum amount of `toTokenAddress` tokens to deposit or withdraw.\n    /// @param encodedBridgeData An abi-encoded `BridgeData` struct.\n    /// @return success The magic bytes if successful.\n    function bridgeTransferFrom(\n        address, /* toTokenAddress */\n        address from,\n        address to,\n        uint256 amount,\n        bytes calldata encodedBridgeData\n    )\n        external\n        returns (bytes4 success)\n    {\n        // Ensure that only the `ERC20BridgeProxy` can call this function.\n        require(\n            msg.sender == _getERC20BridgeProxyAddress(),\n            \"DydxBridge/ONLY_CALLABLE_BY_ERC20_BRIDGE_PROXY\"\n        );\n\n        // Decode bridge data.\n        (BridgeData memory bridgeData) = abi.decode(encodedBridgeData, (BridgeData));\n\n        // The dydx accounts are owned by the `from` address.\n        IDydx.AccountInfo[] memory accounts = _createAccounts(from, bridgeData);\n\n        // Create dydx actions to run on the dydx accounts.\n        IDydx.ActionArgs[] memory actions = _createActions(\n            from,\n            to,\n            amount,\n            bridgeData\n        );\n\n        // Run operation. This will revert on failure.\n        IDydx(_getDydxAddress()).operate(accounts, actions);\n\n        return BRIDGE_SUCCESS;\n    }\n\n    /// @dev Creates an array of accounts for dydx to operate on.\n    ///      All accounts must belong to the same owner.\n    /// @param accountOwner Owner of the dydx account.\n    /// @param bridgeData A `BridgeData` struct.\n    function _createAccounts(\n        address accountOwner,\n        BridgeData memory bridgeData\n    )\n        internal\n        returns (IDydx.AccountInfo[] memory accounts)\n    {\n        uint256[] memory accountNumbers = bridgeData.accountNumbers;\n        uint256 nAccounts = accountNumbers.length;\n        accounts = new IDydx.AccountInfo[](nAccounts);\n        for (uint256 i = 0; i < nAccounts; ++i) {\n            accounts[i] = IDydx.AccountInfo({\n                owner: accountOwner,\n                number: accountNumbers[i]\n            });\n        }\n    }\n\n    /// @dev Creates an array of actions to carry out on dydx.\n    /// @param depositFrom Deposit value from this address (owner of the dydx account).\n    /// @param withdrawTo Withdraw value to this address.\n    /// @param amount The amount of value available to operate on.\n    /// @param bridgeData A `BridgeData` struct.\n    function _createActions(\n        address depositFrom,\n        address withdrawTo,\n        uint256 amount,\n        BridgeData memory bridgeData\n    )\n        internal\n        returns (IDydx.ActionArgs[] memory actions)\n    {\n        BridgeAction[] memory bridgeActions = bridgeData.actions;\n        uint256 nBridgeActions = bridgeActions.length;\n        actions = new IDydx.ActionArgs[](nBridgeActions);\n        for (uint256 i = 0; i < nBridgeActions; ++i) {\n            // Cache current bridge action.\n            BridgeAction memory bridgeAction = bridgeActions[i];\n\n            // Scale amount, if conversion rate is set.\n            uint256 scaledAmount;\n            if (bridgeAction.conversionRateDenominator > 0) {\n                scaledAmount = LibMath.safeGetPartialAmountFloor(\n                    bridgeAction.conversionRateNumerator,\n                    bridgeAction.conversionRateDenominator,\n                    amount\n                );\n            } else {\n                scaledAmount = amount;\n            }\n\n            // Construct dydx action.\n            if (bridgeAction.actionType == BridgeActionType.Deposit) {\n                // Deposit tokens from the account owner into their dydx account.\n                actions[i] = _createDepositAction(\n                    depositFrom,\n                    scaledAmount,\n                    bridgeAction\n                );\n            } else if (bridgeAction.actionType == BridgeActionType.Withdraw) {\n                // Withdraw tokens from dydx to the `otherAccount`.\n                actions[i] = _createWithdrawAction(\n                    withdrawTo,\n                    scaledAmount,\n                    bridgeAction\n                );\n            } else {\n                // If all values in the `Action` enum are handled then this\n                // revert is unreachable: Solidity will revert when casting\n                // from `uint8` to `Action`.\n                revert(\"DydxBridge/UNRECOGNIZED_BRIDGE_ACTION\");\n            }\n        }\n    }\n\n    /// @dev Returns a dydx `DepositAction`.\n    /// @param depositFrom Deposit tokens from this address who is also the account owner.\n    /// @param amount of tokens to deposit.\n    /// @param bridgeAction A `BridgeAction` struct.\n    /// @return depositAction The encoded dydx action.\n    function _createDepositAction(\n        address depositFrom,\n        uint256 amount,\n        BridgeAction memory bridgeAction\n    )\n        internal\n        pure\n        returns (\n            IDydx.ActionArgs memory depositAction\n        )\n    {\n        // Create dydx amount.\n        IDydx.AssetAmount memory dydxAmount = IDydx.AssetAmount({\n            sign: true,                                 // true if positive.\n            denomination: IDydx.AssetDenomination.Wei,  // Wei => actual token amount held in account.\n            ref: IDydx.AssetReference.Delta,                // Delta => a relative amount.\n            value: amount                               // amount to deposit.\n        });\n\n        // Create dydx deposit action.\n        depositAction = IDydx.ActionArgs({\n            actionType: IDydx.ActionType.Deposit,           // deposit tokens.\n            amount: dydxAmount,                             // amount to deposit.\n            accountIdx: bridgeAction.accountIdx,             // index in the `accounts` when calling `operate`.\n            primaryMarketId: bridgeAction.marketId,         // indicates which token to deposit.\n            otherAddress: depositFrom,                      // deposit from the account owner.\n            // unused parameters\n            secondaryMarketId: 0,\n            otherAccountIdx: 0,\n            data: hex''\n        });\n    }\n\n    /// @dev Returns a dydx `WithdrawAction`.\n    /// @param withdrawTo Withdraw tokens to this address.\n    /// @param amount of tokens to withdraw.\n    /// @param bridgeAction A `BridgeAction` struct.\n    /// @return withdrawAction The encoded dydx action.\n    function _createWithdrawAction(\n        address withdrawTo,\n        uint256 amount,\n        BridgeAction memory bridgeAction\n    )\n        internal\n        pure\n        returns (\n            IDydx.ActionArgs memory withdrawAction\n        )\n    {\n        // Create dydx amount.\n        IDydx.AssetAmount memory amountToWithdraw = IDydx.AssetAmount({\n            sign: false,                                    // false if negative.\n            denomination: IDydx.AssetDenomination.Wei,      // Wei => actual token amount held in account.\n            ref: IDydx.AssetReference.Delta,                // Delta => a relative amount.\n            value: amount                                   // amount to withdraw.\n        });\n\n        // Create withdraw action.\n        withdrawAction = IDydx.ActionArgs({\n            actionType: IDydx.ActionType.Withdraw,          // withdraw tokens.\n            amount: amountToWithdraw,                       // amount to withdraw.\n            accountIdx: bridgeAction.accountIdx,            // index in the `accounts` when calling `operate`.\n            primaryMarketId: bridgeAction.marketId,         // indicates which token to withdraw.\n            otherAddress: withdrawTo,                       // withdraw tokens to this address.\n            // unused parameters\n            secondaryMarketId: 0,\n            otherAccountIdx: 0,\n            data: hex''\n        });\n    }\n}\n",
        "@0x/contracts-utils/contracts/src/DeploymentConstants.sol": "/*\n\n  Copyright 2020 ZeroEx Intl.\n\n  Licensed under the Apache License, Version 2.0 (the \"License\");\n  you may not use this file except in compliance with the License.\n  You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing, software\n  distributed under the License is distributed on an \"AS IS\" BASIS,\n  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  See the License for the specific language governing permissions and\n  limitations under the License.\n\n*/\n\npragma solidity ^0.5.9;\n\n\ncontract DeploymentConstants {\n\n    // solhint-disable separate-by-one-line-in-contract\n\n    // Mainnet addresses ///////////////////////////////////////////////////////\n    /// @dev Mainnet address of the WETH contract.\n    address constant private WETH_ADDRESS = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\n    /// @dev Mainnet address of the KyberNetworkProxy contract.\n    address constant private KYBER_NETWORK_PROXY_ADDRESS = 0x9AAb3f75489902f3a48495025729a0AF77d4b11e;\n    /// @dev Mainnet address of the KyberHintHandler contract.\n    address constant private KYBER_HINT_HANDLER_ADDRESS = 0xa1C0Fa73c39CFBcC11ec9Eb1Afc665aba9996E2C;\n    /// @dev Mainnet address of the `UniswapExchangeFactory` contract.\n    address constant private UNISWAP_EXCHANGE_FACTORY_ADDRESS = 0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95;\n    /// @dev Mainnet address of the `UniswapV2Router01` contract.\n    address constant private UNISWAP_V2_ROUTER_01_ADDRESS = 0xf164fC0Ec4E93095b804a4795bBe1e041497b92a;\n    /// @dev Mainnet address of the Eth2Dai `MatchingMarket` contract.\n    address constant private ETH2DAI_ADDRESS = 0x794e6e91555438aFc3ccF1c5076A74F42133d08D;\n    /// @dev Mainnet address of the `ERC20BridgeProxy` contract\n    address constant private ERC20_BRIDGE_PROXY_ADDRESS = 0x8ED95d1746bf1E4dAb58d8ED4724f1Ef95B20Db0;\n    ///@dev Mainnet address of the `Dai` (multi-collateral) contract\n    address constant private DAI_ADDRESS = 0x6B175474E89094C44Da98b954EedeAC495271d0F;\n    /// @dev Mainnet address of the `Chai` contract\n    address constant private CHAI_ADDRESS = 0x06AF07097C9Eeb7fD685c692751D5C66dB49c215;\n    /// @dev Mainnet address of the 0x DevUtils contract.\n    address constant private DEV_UTILS_ADDRESS = 0x74134CF88b21383713E096a5ecF59e297dc7f547;\n    /// @dev Kyber ETH pseudo-address.\n    address constant internal KYBER_ETH_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n    /// @dev Mainnet address of the dYdX contract.\n    address constant private DYDX_ADDRESS = 0x1E0447b19BB6EcFdAe1e4AE1694b0C3659614e4e;\n    /// @dev Mainnet address of the GST2 contract\n    address constant private GST_ADDRESS = 0x0000000000b3F879cb30FE243b4Dfee438691c04;\n    /// @dev Mainnet address of the GST Collector\n    address constant private GST_COLLECTOR_ADDRESS = 0x000000D3b08566BE75A6DB803C03C85C0c1c5B96;\n    /// @dev Mainnet address of the mStable mUSD contract.\n    address constant private MUSD_ADDRESS = 0xe2f2a5C287993345a840Db3B0845fbC70f5935a5;\n    /// @dev Mainnet address of the Mooniswap Registry contract\n    address constant private MOONISWAP_REGISTRY = 0x71CD6666064C3A1354a3B4dca5fA1E2D3ee7D303;\n    /// @dev Mainnet address of the DODO Registry (ZOO) contract\n    address constant private DODO_REGISTRY = 0x3A97247DF274a17C59A3bd12735ea3FcDFb49950;\n    /// @dev Mainnet address of the DODO Helper contract\n    address constant private DODO_HELPER = 0x533dA777aeDCE766CEAe696bf90f8541A4bA80Eb;\n\n    // // Ropsten addresses ///////////////////////////////////////////////////////\n    // /// @dev Mainnet address of the WETH contract.\n    // address constant private WETH_ADDRESS = 0xc778417E063141139Fce010982780140Aa0cD5Ab;\n    // /// @dev Mainnet address of the KyberNetworkProxy contract.\n    // address constant private KYBER_NETWORK_PROXY_ADDRESS = 0xd719c34261e099Fdb33030ac8909d5788D3039C4;\n    // /// @dev Mainnet address of the `UniswapExchangeFactory` contract.\n    // address constant private UNISWAP_EXCHANGE_FACTORY_ADDRESS = 0x9c83dCE8CA20E9aAF9D3efc003b2ea62aBC08351;\n    // /// @dev Mainnet address of the `UniswapV2Router01` contract.\n    // address constant private UNISWAP_V2_ROUTER_01_ADDRESS = 0xf164fC0Ec4E93095b804a4795bBe1e041497b92a;\n    // /// @dev Mainnet address of the Eth2Dai `MatchingMarket` contract.\n    // address constant private ETH2DAI_ADDRESS = address(0);\n    // /// @dev Mainnet address of the `ERC20BridgeProxy` contract\n    // address constant private ERC20_BRIDGE_PROXY_ADDRESS = 0xb344afeD348de15eb4a9e180205A2B0739628339;\n    // ///@dev Mainnet address of the `Dai` (multi-collateral) contract\n    // address constant private DAI_ADDRESS = address(0);\n    // /// @dev Mainnet address of the `Chai` contract\n    // address constant private CHAI_ADDRESS = address(0);\n    // /// @dev Mainnet address of the 0x DevUtils contract.\n    // address constant private DEV_UTILS_ADDRESS = 0xC812AF3f3fBC62F76ea4262576EC0f49dB8B7f1c;\n    // /// @dev Kyber ETH pseudo-address.\n    // address constant internal KYBER_ETH_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n    // /// @dev Mainnet address of the dYdX contract.\n    // address constant private DYDX_ADDRESS = address(0);\n    // /// @dev Mainnet address of the GST2 contract\n    // address constant private GST_ADDRESS = address(0);\n    // /// @dev Mainnet address of the GST Collector\n    // address constant private GST_COLLECTOR_ADDRESS = address(0);\n    // /// @dev Mainnet address of the mStable mUSD contract.\n    // address constant private MUSD_ADDRESS = 0x4E1000616990D83e56f4b5fC6CC8602DcfD20459;\n\n    // // Rinkeby addresses ///////////////////////////////////////////////////////\n    // /// @dev Mainnet address of the WETH contract.\n    // address constant private WETH_ADDRESS = 0xc778417E063141139Fce010982780140Aa0cD5Ab;\n    // /// @dev Mainnet address of the KyberNetworkProxy contract.\n    // address constant private KYBER_NETWORK_PROXY_ADDRESS = 0x0d5371e5EE23dec7DF251A8957279629aa79E9C5;\n    // /// @dev Mainnet address of the `UniswapExchangeFactory` contract.\n    // address constant private UNISWAP_EXCHANGE_FACTORY_ADDRESS = 0xf5D915570BC477f9B8D6C0E980aA81757A3AaC36;\n    // /// @dev Mainnet address of the `UniswapV2Router01` contract.\n    // address constant private UNISWAP_V2_ROUTER_01_ADDRESS = 0xf164fC0Ec4E93095b804a4795bBe1e041497b92a;\n    // /// @dev Mainnet address of the Eth2Dai `MatchingMarket` contract.\n    // address constant private ETH2DAI_ADDRESS = address(0);\n    // /// @dev Mainnet address of the `ERC20BridgeProxy` contract\n    // address constant private ERC20_BRIDGE_PROXY_ADDRESS = 0xA2AA4bEFED748Fba27a3bE7Dfd2C4b2c6DB1F49B;\n    // ///@dev Mainnet address of the `Dai` (multi-collateral) contract\n    // address constant private DAI_ADDRESS = address(0);\n    // /// @dev Mainnet address of the `Chai` contract\n    // address constant private CHAI_ADDRESS = address(0);\n    // /// @dev Mainnet address of the 0x DevUtils contract.\n    // address constant private DEV_UTILS_ADDRESS = 0x46B5BC959e8A754c0256FFF73bF34A52Ad5CdfA9;\n    // /// @dev Kyber ETH pseudo-address.\n    // address constant internal KYBER_ETH_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n    // /// @dev Mainnet address of the dYdX contract.\n    // address constant private DYDX_ADDRESS = address(0);\n    // /// @dev Mainnet address of the GST2 contract\n    // address constant private GST_ADDRESS = address(0);\n    // /// @dev Mainnet address of the GST Collector\n    // address constant private GST_COLLECTOR_ADDRESS = address(0);\n    // /// @dev Mainnet address of the mStable mUSD contract.\n    // address constant private MUSD_ADDRESS = address(0);\n\n    // // Kovan addresses /////////////////////////////////////////////////////////\n    // /// @dev Kovan address of the WETH contract.\n    // address constant private WETH_ADDRESS = 0xd0A1E359811322d97991E03f863a0C30C2cF029C;\n    // /// @dev Kovan address of the KyberNetworkProxy contract.\n    // address constant private KYBER_NETWORK_PROXY_ADDRESS = 0x692f391bCc85cefCe8C237C01e1f636BbD70EA4D;\n    // /// @dev Kovan address of the `UniswapExchangeFactory` contract.\n    // address constant private UNISWAP_EXCHANGE_FACTORY_ADDRESS = 0xD3E51Ef092B2845f10401a0159B2B96e8B6c3D30;\n    // /// @dev Kovan address of the `UniswapV2Router01` contract.\n    // address constant private UNISWAP_V2_ROUTER_01_ADDRESS = 0xf164fC0Ec4E93095b804a4795bBe1e041497b92a;\n    // /// @dev Kovan address of the Eth2Dai `MatchingMarket` contract.\n    // address constant private ETH2DAI_ADDRESS = 0xe325acB9765b02b8b418199bf9650972299235F4;\n    // /// @dev Kovan address of the `ERC20BridgeProxy` contract\n    // address constant private ERC20_BRIDGE_PROXY_ADDRESS = 0x3577552C1Fb7A44aD76BeEB7aB53251668A21F8D;\n    // /// @dev Kovan address of the `Chai` contract\n    // address constant private CHAI_ADDRESS = address(0);\n    // /// @dev Kovan address of the `Dai` (multi-collateral) contract\n    // address constant private DAI_ADDRESS = 0x4F96Fe3b7A6Cf9725f59d353F723c1bDb64CA6Aa;\n    // /// @dev Kovan address of the 0x DevUtils contract.\n    // address constant private DEV_UTILS_ADDRESS = 0x9402639A828BdF4E9e4103ac3B69E1a6E522eB59;\n    // /// @dev Kyber ETH pseudo-address.\n    // address constant internal KYBER_ETH_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n    // /// @dev Kovan address of the dYdX contract.\n    // address constant private DYDX_ADDRESS = address(0);\n    // /// @dev Kovan address of the GST2 contract\n    // address constant private GST_ADDRESS = address(0);\n    // /// @dev Kovan address of the GST Collector\n    // address constant private GST_COLLECTOR_ADDRESS = address(0);\n    // /// @dev Mainnet address of the mStable mUSD contract.\n    // address constant private MUSD_ADDRESS = address(0);\n\n    /// @dev Overridable way to get the `KyberNetworkProxy` address.\n    /// @return kyberAddress The `IKyberNetworkProxy` address.\n    function _getKyberNetworkProxyAddress()\n        internal\n        view\n        returns (address kyberAddress)\n    {\n        return KYBER_NETWORK_PROXY_ADDRESS;\n    }\n\n    /// @dev Overridable way to get the `KyberHintHandler` address.\n    /// @return kyberAddress The `IKyberHintHandler` address.\n    function _getKyberHintHandlerAddress()\n        internal\n        view\n        returns (address hintHandlerAddress)\n    {\n        return KYBER_HINT_HANDLER_ADDRESS;\n    }\n\n    /// @dev Overridable way to get the WETH address.\n    /// @return wethAddress The WETH address.\n    function _getWethAddress()\n        internal\n        view\n        returns (address wethAddress)\n    {\n        return WETH_ADDRESS;\n    }\n\n    /// @dev Overridable way to get the `UniswapExchangeFactory` address.\n    /// @return uniswapAddress The `UniswapExchangeFactory` address.\n    function _getUniswapExchangeFactoryAddress()\n        internal\n        view\n        returns (address uniswapAddress)\n    {\n        return UNISWAP_EXCHANGE_FACTORY_ADDRESS;\n    }\n\n    /// @dev Overridable way to get the `UniswapV2Router01` address.\n    /// @return uniswapRouterAddress The `UniswapV2Router01` address.\n    function _getUniswapV2Router01Address()\n        internal\n        view\n        returns (address uniswapRouterAddress)\n    {\n        return UNISWAP_V2_ROUTER_01_ADDRESS;\n    }\n\n    /// @dev An overridable way to retrieve the Eth2Dai `MatchingMarket` contract.\n    /// @return eth2daiAddress The Eth2Dai `MatchingMarket` contract.\n    function _getEth2DaiAddress()\n        internal\n        view\n        returns (address eth2daiAddress)\n    {\n        return ETH2DAI_ADDRESS;\n    }\n\n    /// @dev An overridable way to retrieve the `ERC20BridgeProxy` contract.\n    /// @return erc20BridgeProxyAddress The `ERC20BridgeProxy` contract.\n    function _getERC20BridgeProxyAddress()\n        internal\n        view\n        returns (address erc20BridgeProxyAddress)\n    {\n        return ERC20_BRIDGE_PROXY_ADDRESS;\n    }\n\n    /// @dev An overridable way to retrieve the `Dai` contract.\n    /// @return daiAddress The `Dai` contract.\n    function _getDaiAddress()\n        internal\n        view\n        returns (address daiAddress)\n    {\n        return DAI_ADDRESS;\n    }\n\n    /// @dev An overridable way to retrieve the `Chai` contract.\n    /// @return chaiAddress The `Chai` contract.\n    function _getChaiAddress()\n        internal\n        view\n        returns (address chaiAddress)\n    {\n        return CHAI_ADDRESS;\n    }\n\n    /// @dev An overridable way to retrieve the 0x `DevUtils` contract address.\n    /// @return devUtils The 0x `DevUtils` contract address.\n    function _getDevUtilsAddress()\n        internal\n        view\n        returns (address devUtils)\n    {\n        return DEV_UTILS_ADDRESS;\n    }\n\n    /// @dev Overridable way to get the DyDx contract.\n    /// @return exchange The DyDx exchange contract.\n    function _getDydxAddress()\n        internal\n        view\n        returns (address dydxAddress)\n    {\n        return DYDX_ADDRESS;\n    }\n\n    /// @dev An overridable way to retrieve the GST2 contract address.\n    /// @return gst The GST contract.\n    function _getGstAddress()\n        internal\n        view\n        returns (address gst)\n    {\n        return GST_ADDRESS;\n    }\n\n    /// @dev An overridable way to retrieve the GST Collector address.\n    /// @return collector The GST collector address.\n    function _getGstCollectorAddress()\n        internal\n        view\n        returns (address collector)\n    {\n        return GST_COLLECTOR_ADDRESS;\n    }\n\n    /// @dev An overridable way to retrieve the mStable mUSD address.\n    /// @return musd The mStable mUSD address.\n    function _getMUsdAddress()\n        internal\n        view\n        returns (address musd)\n    {\n        return MUSD_ADDRESS;\n    }\n\n    /// @dev An overridable way to retrieve the Mooniswap registry address.\n    /// @return registry The Mooniswap registry address.\n    function _getMooniswapAddress()\n        internal\n        view\n        returns (address)\n    {\n        return MOONISWAP_REGISTRY;\n    }\n\n    /// @dev An overridable way to retrieve the DODO Registry contract address.\n    /// @return registry The DODO Registry contract address.\n    function _getDODORegistryAddress()\n        internal\n        view\n        returns (address)\n    {\n        return DODO_REGISTRY;\n    }\n\n    /// @dev An overridable way to retrieve the DODO Helper contract address.\n    /// @return registry The DODO Helper contract address.\n    function _getDODOHelperAddress()\n        internal\n        view\n        returns (address)\n    {\n        return DODO_HELPER;\n    }\n}\n",
        "@0x/contracts-utils/contracts/src/LibSafeMath.sol": "pragma solidity ^0.5.9;\n\nimport \"./LibRichErrors.sol\";\nimport \"./LibSafeMathRichErrors.sol\";\n\n\nlibrary LibSafeMath {\n\n    function safeMul(uint256 a, uint256 b)\n        internal\n        pure\n        returns (uint256)\n    {\n        if (a == 0) {\n            return 0;\n        }\n        uint256 c = a * b;\n        if (c / a != b) {\n            LibRichErrors.rrevert(LibSafeMathRichErrors.Uint256BinOpError(\n                LibSafeMathRichErrors.BinOpErrorCodes.MULTIPLICATION_OVERFLOW,\n                a,\n                b\n            ));\n        }\n        return c;\n    }\n\n    function safeDiv(uint256 a, uint256 b)\n        internal\n        pure\n        returns (uint256)\n    {\n        if (b == 0) {\n            LibRichErrors.rrevert(LibSafeMathRichErrors.Uint256BinOpError(\n                LibSafeMathRichErrors.BinOpErrorCodes.DIVISION_BY_ZERO,\n                a,\n                b\n            ));\n        }\n        uint256 c = a / b;\n        return c;\n    }\n\n    function safeSub(uint256 a, uint256 b)\n        internal\n        pure\n        returns (uint256)\n    {\n        if (b > a) {\n            LibRichErrors.rrevert(LibSafeMathRichErrors.Uint256BinOpError(\n                LibSafeMathRichErrors.BinOpErrorCodes.SUBTRACTION_UNDERFLOW,\n                a,\n                b\n            ));\n        }\n        return a - b;\n    }\n\n    function safeAdd(uint256 a, uint256 b)\n        internal\n        pure\n        returns (uint256)\n    {\n        uint256 c = a + b;\n        if (c < a) {\n            LibRichErrors.rrevert(LibSafeMathRichErrors.Uint256BinOpError(\n                LibSafeMathRichErrors.BinOpErrorCodes.ADDITION_OVERFLOW,\n                a,\n                b\n            ));\n        }\n        return c;\n    }\n\n    function max256(uint256 a, uint256 b)\n        internal\n        pure\n        returns (uint256)\n    {\n        return a >= b ? a : b;\n    }\n\n    function min256(uint256 a, uint256 b)\n        internal\n        pure\n        returns (uint256)\n    {\n        return a < b ? a : b;\n    }\n}\n",
        "@0x/contracts-utils/contracts/src/LibRichErrors.sol": "/*\n\n  Copyright 2019 ZeroEx Intl.\n\n  Licensed under the Apache License, Version 2.0 (the \"License\");\n  you may not use this file except in compliance with the License.\n  You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing, software\n  distributed under the License is distributed on an \"AS IS\" BASIS,\n  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  See the License for the specific language governing permissions and\n  limitations under the License.\n\n*/\n\npragma solidity ^0.5.9;\n\n\nlibrary LibRichErrors {\n\n    // bytes4(keccak256(\"Error(string)\"))\n    bytes4 internal constant STANDARD_ERROR_SELECTOR =\n        0x08c379a0;\n\n    // solhint-disable func-name-mixedcase\n    /// @dev ABI encode a standard, string revert error payload.\n    ///      This is the same payload that would be included by a `revert(string)`\n    ///      solidity statement. It has the function signature `Error(string)`.\n    /// @param message The error string.\n    /// @return The ABI encoded error.\n    function StandardError(\n        string memory message\n    )\n        internal\n        pure\n        returns (bytes memory)\n    {\n        return abi.encodeWithSelector(\n            STANDARD_ERROR_SELECTOR,\n            bytes(message)\n        );\n    }\n    // solhint-enable func-name-mixedcase\n\n    /// @dev Reverts an encoded rich revert reason `errorData`.\n    /// @param errorData ABI encoded error data.\n    function rrevert(bytes memory errorData)\n        internal\n        pure\n    {\n        assembly {\n            revert(add(errorData, 0x20), mload(errorData))\n        }\n    }\n}\n",
        "@0x/contracts-utils/contracts/src/LibSafeMathRichErrors.sol": "pragma solidity ^0.5.9;\n\n\nlibrary LibSafeMathRichErrors {\n\n    // bytes4(keccak256(\"Uint256BinOpError(uint8,uint256,uint256)\"))\n    bytes4 internal constant UINT256_BINOP_ERROR_SELECTOR =\n        0xe946c1bb;\n\n    // bytes4(keccak256(\"Uint256DowncastError(uint8,uint256)\"))\n    bytes4 internal constant UINT256_DOWNCAST_ERROR_SELECTOR =\n        0xc996af7b;\n\n    enum BinOpErrorCodes {\n        ADDITION_OVERFLOW,\n        MULTIPLICATION_OVERFLOW,\n        SUBTRACTION_UNDERFLOW,\n        DIVISION_BY_ZERO\n    }\n\n    enum DowncastErrorCodes {\n        VALUE_TOO_LARGE_TO_DOWNCAST_TO_UINT32,\n        VALUE_TOO_LARGE_TO_DOWNCAST_TO_UINT64,\n        VALUE_TOO_LARGE_TO_DOWNCAST_TO_UINT96\n    }\n\n    // solhint-disable func-name-mixedcase\n    function Uint256BinOpError(\n        BinOpErrorCodes errorCode,\n        uint256 a,\n        uint256 b\n    )\n        internal\n        pure\n        returns (bytes memory)\n    {\n        return abi.encodeWithSelector(\n            UINT256_BINOP_ERROR_SELECTOR,\n            errorCode,\n            a,\n            b\n        );\n    }\n\n    function Uint256DowncastError(\n        DowncastErrorCodes errorCode,\n        uint256 a\n    )\n        internal\n        pure\n        returns (bytes memory)\n    {\n        return abi.encodeWithSelector(\n            UINT256_DOWNCAST_ERROR_SELECTOR,\n            errorCode,\n            a\n        );\n    }\n}\n",
        "@0x/contracts-exchange-libs/contracts/src/LibMath.sol": "/*\n\n  Copyright 2019 ZeroEx Intl.\n\n  Licensed under the Apache License, Version 2.0 (the \"License\");\n  you may not use this file except in compliance with the License.\n  You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing, software\n  distributed under the License is distributed on an \"AS IS\" BASIS,\n  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  See the License for the specific language governing permissions and\n  limitations under the License.\n\n*/\n\npragma solidity ^0.5.9;\n\nimport \"@0x/contracts-utils/contracts/src/LibSafeMath.sol\";\nimport \"@0x/contracts-utils/contracts/src/LibRichErrors.sol\";\nimport \"./LibMathRichErrors.sol\";\n\n\nlibrary LibMath {\n\n    using LibSafeMath for uint256;\n\n    /// @dev Calculates partial value given a numerator and denominator rounded down.\n    ///      Reverts if rounding error is >= 0.1%\n    /// @param numerator Numerator.\n    /// @param denominator Denominator.\n    /// @param target Value to calculate partial of.\n    /// @return Partial value of target rounded down.\n    function safeGetPartialAmountFloor(\n        uint256 numerator,\n        uint256 denominator,\n        uint256 target\n    )\n        internal\n        pure\n        returns (uint256 partialAmount)\n    {\n        if (isRoundingErrorFloor(\n                numerator,\n                denominator,\n                target\n        )) {\n            LibRichErrors.rrevert(LibMathRichErrors.RoundingError(\n                numerator,\n                denominator,\n                target\n            ));\n        }\n\n        partialAmount = numerator.safeMul(target).safeDiv(denominator);\n        return partialAmount;\n    }\n\n    /// @dev Calculates partial value given a numerator and denominator rounded down.\n    ///      Reverts if rounding error is >= 0.1%\n    /// @param numerator Numerator.\n    /// @param denominator Denominator.\n    /// @param target Value to calculate partial of.\n    /// @return Partial value of target rounded up.\n    function safeGetPartialAmountCeil(\n        uint256 numerator,\n        uint256 denominator,\n        uint256 target\n    )\n        internal\n        pure\n        returns (uint256 partialAmount)\n    {\n        if (isRoundingErrorCeil(\n                numerator,\n                denominator,\n                target\n        )) {\n            LibRichErrors.rrevert(LibMathRichErrors.RoundingError(\n                numerator,\n                denominator,\n                target\n            ));\n        }\n\n        // safeDiv computes `floor(a / b)`. We use the identity (a, b integer):\n        //       ceil(a / b) = floor((a + b - 1) / b)\n        // To implement `ceil(a / b)` using safeDiv.\n        partialAmount = numerator.safeMul(target)\n            .safeAdd(denominator.safeSub(1))\n            .safeDiv(denominator);\n\n        return partialAmount;\n    }\n\n    /// @dev Calculates partial value given a numerator and denominator rounded down.\n    /// @param numerator Numerator.\n    /// @param denominator Denominator.\n    /// @param target Value to calculate partial of.\n    /// @return Partial value of target rounded down.\n    function getPartialAmountFloor(\n        uint256 numerator,\n        uint256 denominator,\n        uint256 target\n    )\n        internal\n        pure\n        returns (uint256 partialAmount)\n    {\n        partialAmount = numerator.safeMul(target).safeDiv(denominator);\n        return partialAmount;\n    }\n\n    /// @dev Calculates partial value given a numerator and denominator rounded down.\n    /// @param numerator Numerator.\n    /// @param denominator Denominator.\n    /// @param target Value to calculate partial of.\n    /// @return Partial value of target rounded up.\n    function getPartialAmountCeil(\n        uint256 numerator,\n        uint256 denominator,\n        uint256 target\n    )\n        internal\n        pure\n        returns (uint256 partialAmount)\n    {\n        // safeDiv computes `floor(a / b)`. We use the identity (a, b integer):\n        //       ceil(a / b) = floor((a + b - 1) / b)\n        // To implement `ceil(a / b)` using safeDiv.\n        partialAmount = numerator.safeMul(target)\n            .safeAdd(denominator.safeSub(1))\n            .safeDiv(denominator);\n\n        return partialAmount;\n    }\n\n    /// @dev Checks if rounding error >= 0.1% when rounding down.\n    /// @param numerator Numerator.\n    /// @param denominator Denominator.\n    /// @param target Value to multiply with numerator/denominator.\n    /// @return Rounding error is present.\n    function isRoundingErrorFloor(\n        uint256 numerator,\n        uint256 denominator,\n        uint256 target\n    )\n        internal\n        pure\n        returns (bool isError)\n    {\n        if (denominator == 0) {\n            LibRichErrors.rrevert(LibMathRichErrors.DivisionByZeroError());\n        }\n\n        // The absolute rounding error is the difference between the rounded\n        // value and the ideal value. The relative rounding error is the\n        // absolute rounding error divided by the absolute value of the\n        // ideal value. This is undefined when the ideal value is zero.\n        //\n        // The ideal value is `numerator * target / denominator`.\n        // Let's call `numerator * target % denominator` the remainder.\n        // The absolute error is `remainder / denominator`.\n        //\n        // When the ideal value is zero, we require the absolute error to\n        // be zero. Fortunately, this is always the case. The ideal value is\n        // zero iff `numerator == 0` and/or `target == 0`. In this case the\n        // remainder and absolute error are also zero.\n        if (target == 0 || numerator == 0) {\n            return false;\n        }\n\n        // Otherwise, we want the relative rounding error to be strictly\n        // less than 0.1%.\n        // The relative error is `remainder / (numerator * target)`.\n        // We want the relative error less than 1 / 1000:\n        //        remainder / (numerator * denominator)  <  1 / 1000\n        // or equivalently:\n        //        1000 * remainder  <  numerator * target\n        // so we have a rounding error iff:\n        //        1000 * remainder  >=  numerator * target\n        uint256 remainder = mulmod(\n            target,\n            numerator,\n            denominator\n        );\n        isError = remainder.safeMul(1000) >= numerator.safeMul(target);\n        return isError;\n    }\n\n    /// @dev Checks if rounding error >= 0.1% when rounding up.\n    /// @param numerator Numerator.\n    /// @param denominator Denominator.\n    /// @param target Value to multiply with numerator/denominator.\n    /// @return Rounding error is present.\n    function isRoundingErrorCeil(\n        uint256 numerator,\n        uint256 denominator,\n        uint256 target\n    )\n        internal\n        pure\n        returns (bool isError)\n    {\n        if (denominator == 0) {\n            LibRichErrors.rrevert(LibMathRichErrors.DivisionByZeroError());\n        }\n\n        // See the comments in `isRoundingError`.\n        if (target == 0 || numerator == 0) {\n            // When either is zero, the ideal value and rounded value are zero\n            // and there is no rounding error. (Although the relative error\n            // is undefined.)\n            return false;\n        }\n        // Compute remainder as before\n        uint256 remainder = mulmod(\n            target,\n            numerator,\n            denominator\n        );\n        remainder = denominator.safeSub(remainder) % denominator;\n        isError = remainder.safeMul(1000) >= numerator.safeMul(target);\n        return isError;\n    }\n}\n",
        "@0x/contracts-exchange-libs/contracts/src/LibMathRichErrors.sol": "pragma solidity ^0.5.9;\n\n\nlibrary LibMathRichErrors {\n\n    // bytes4(keccak256(\"DivisionByZeroError()\"))\n    bytes internal constant DIVISION_BY_ZERO_ERROR =\n        hex\"a791837c\";\n\n    // bytes4(keccak256(\"RoundingError(uint256,uint256,uint256)\"))\n    bytes4 internal constant ROUNDING_ERROR_SELECTOR =\n        0x339f3de2;\n\n    // solhint-disable func-name-mixedcase\n    function DivisionByZeroError()\n        internal\n        pure\n        returns (bytes memory)\n    {\n        return DIVISION_BY_ZERO_ERROR;\n    }\n\n    function RoundingError(\n        uint256 numerator,\n        uint256 denominator,\n        uint256 target\n    )\n        internal\n        pure\n        returns (bytes memory)\n    {\n        return abi.encodeWithSelector(\n            ROUNDING_ERROR_SELECTOR,\n            numerator,\n            denominator,\n            target\n        );\n    }\n}\n",
        "../interfaces/IERC20Bridge.sol": "/*\n\n  Copyright 2019 ZeroEx Intl.\n\n  Licensed under the Apache License, Version 2.0 (the \"License\");\n  you may not use this file except in compliance with the License.\n  You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing, software\n  distributed under the License is distributed on an \"AS IS\" BASIS,\n  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  See the License for the specific language governing permissions and\n  limitations under the License.\n\n*/\n\npragma solidity ^0.5.9;\n\n\ncontract IERC20Bridge {\n\n    /// @dev Result of a successful bridge call.\n    bytes4 constant internal BRIDGE_SUCCESS = 0xdc1600f3;\n\n    /// @dev Emitted when a trade occurs.\n    /// @param inputToken The token the bridge is converting from.\n    /// @param outputToken The token the bridge is converting to.\n    /// @param inputTokenAmount Amount of input token.\n    /// @param outputTokenAmount Amount of output token.\n    /// @param from The `from` address in `bridgeTransferFrom()`\n    /// @param to The `to` address in `bridgeTransferFrom()`\n    event ERC20BridgeTransfer(\n        address inputToken,\n        address outputToken,\n        uint256 inputTokenAmount,\n        uint256 outputTokenAmount,\n        address from,\n        address to\n    );\n\n    /// @dev Transfers `amount` of the ERC20 `tokenAddress` from `from` to `to`.\n    /// @param tokenAddress The address of the ERC20 token to transfer.\n    /// @param from Address to transfer asset from.\n    /// @param to Address to transfer asset to.\n    /// @param amount Amount of asset to transfer.\n    /// @param bridgeData Arbitrary asset data needed by the bridge contract.\n    /// @return success The magic bytes `0xdc1600f3` if successful.\n    function bridgeTransferFrom(\n        address tokenAddress,\n        address from,\n        address to,\n        uint256 amount,\n        bytes calldata bridgeData\n    )\n        external\n        returns (bytes4 success);\n}\n",
        "../interfaces/IDydxBridge.sol": "/*\n\n  Copyright 2019 ZeroEx Intl.\n\n  Licensed under the Apache License, Version 2.0 (the \"License\");\n  you may not use this file except in compliance with the License.\n  You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing, software\n  distributed under the License is distributed on an \"AS IS\" BASIS,\n  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  See the License for the specific language governing permissions and\n  limitations under the License.\n\n*/\n\npragma solidity ^0.5.9;\n\n\ninterface IDydxBridge {\n\n    /// @dev This is the subset of `IDydx.ActionType` that are supported by the bridge.\n    enum BridgeActionType {\n        Deposit,                    // Deposit tokens into dydx account.\n        Withdraw                    // Withdraw tokens from dydx account.\n    }\n\n    struct BridgeAction {\n        BridgeActionType actionType;            // Action to run on dydx account.\n        uint256 accountIdx;                     // Index in `BridgeData.accountNumbers` for this action.\n        uint256 marketId;                       // Market to operate on.\n        uint256 conversionRateNumerator;        // Optional. If set, transfer amount is scaled by (conversionRateNumerator/conversionRateDenominator).\n        uint256 conversionRateDenominator;      // Optional. If set, transfer amount is scaled by (conversionRateNumerator/conversionRateDenominator).\n    }\n\n    struct BridgeData {\n        uint256[] accountNumbers;               // Account number used to identify the owner's specific account.\n        BridgeAction[] actions;                 // Actions to carry out on the owner's accounts.\n    }\n}\n",
        "../interfaces/IDydx.sol": "/*\n\n  Copyright 2019 ZeroEx Intl.\n\n  Licensed under the Apache License, Version 2.0 (the \"License\");\n  you may not use this file except in compliance with the License.\n  You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing, software\n  distributed under the License is distributed on an \"AS IS\" BASIS,\n  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  See the License for the specific language governing permissions and\n  limitations under the License.\n\n*/\n\npragma solidity ^0.5.9;\npragma experimental ABIEncoderV2;\n\n\ninterface IDydx {\n\n    /// @dev Represents the unique key that specifies an account\n    struct AccountInfo {\n        address owner;  // The address that owns the account\n        uint256 number; // A nonce that allows a single address to control many accounts\n    }\n\n    enum ActionType {\n        Deposit,   // supply tokens\n        Withdraw,  // borrow tokens\n        Transfer,  // transfer balance between accounts\n        Buy,       // buy an amount of some token (externally)\n        Sell,      // sell an amount of some token (externally)\n        Trade,     // trade tokens against another account\n        Liquidate, // liquidate an undercollateralized or expiring account\n        Vaporize,  // use excess tokens to zero-out a completely negative account\n        Call       // send arbitrary data to an address\n    }\n\n    /// @dev Arguments that are passed to Solo in an ordered list as part of a single operation.\n    /// Each ActionArgs has an actionType which specifies which action struct that this data will be\n    /// parsed into before being processed.\n    struct ActionArgs {\n        ActionType actionType;\n        uint256 accountIdx;\n        AssetAmount amount;\n        uint256 primaryMarketId;\n        uint256 secondaryMarketId;\n        address otherAddress;\n        uint256 otherAccountIdx;\n        bytes data;\n    }\n\n    enum AssetDenomination {\n        Wei, // the amount is denominated in wei\n        Par  // the amount is denominated in par\n    }\n\n    enum AssetReference {\n        Delta, // the amount is given as a delta from the current value\n        Target // the amount is given as an exact number to end up at\n    }\n\n    struct AssetAmount {\n        bool sign; // true if positive\n        AssetDenomination denomination;\n        AssetReference ref;\n        uint256 value;\n    }\n\n    struct D256 {\n        uint256 value;\n    }\n\n    struct Value {\n        uint256 value;\n    }\n\n    struct Price {\n        uint256 value;\n    }\n\n    struct OperatorArg {\n        address operator;\n        bool trusted;\n    }\n\n    /// @dev The global risk parameters that govern the health and security of the system\n    struct RiskParams {\n        // Required ratio of over-collateralization\n        D256 marginRatio;\n        // Percentage penalty incurred by liquidated accounts\n        D256 liquidationSpread;\n        // Percentage of the borrower's interest fee that gets passed to the suppliers\n        D256 earningsRate;\n        // The minimum absolute borrow value of an account\n        // There must be sufficient incentivize to liquidate undercollateralized accounts\n        Value minBorrowedValue;\n    }\n\n    /// @dev The main entry-point to Solo that allows users and contracts to manage accounts.\n    ///      Take one or more actions on one or more accounts. The msg.sender must be the owner or\n    ///      operator of all accounts except for those being liquidated, vaporized, or traded with.\n    ///      One call to operate() is considered a singular \"operation\". Account collateralization is\n    ///      ensured only after the completion of the entire operation.\n    /// @param  accounts  A list of all accounts that will be used in this operation. Cannot contain\n    ///                   duplicates. In each action, the relevant account will be referred-to by its\n    ///                   index in the list.\n    /// @param  actions   An ordered list of all actions that will be taken in this operation. The\n    ///                   actions will be processed in order.\n    function operate(\n        AccountInfo[] calldata accounts,\n        ActionArgs[] calldata actions\n    )\n        external;\n\n    // @dev Approves/disapproves any number of operators. An operator is an external address that has the\n    //      same permissions to manipulate an account as the owner of the account. Operators are simply\n    //      addresses and therefore may either be externally-owned Ethereum accounts OR smart contracts.\n    //      Operators are also able to act as AutoTrader contracts on behalf of the account owner if the\n    //      operator is a smart contract and implements the IAutoTrader interface.\n    // @param args A list of OperatorArgs which have an address and a boolean. The boolean value\n    //        denotes whether to approve (true) or revoke approval (false) for that address.\n    function setOperators(OperatorArg[] calldata args) external;\n\n    /// @dev Return true if a particular address is approved as an operator for an owner's accounts.\n    ///      Approved operators can act on the accounts of the owner as if it were the operator's own.\n    /// @param owner The owner of the accounts\n    /// @param operator The possible operator\n    /// @return isLocalOperator True if operator is approved for owner's accounts\n    function getIsLocalOperator(\n        address owner,\n        address operator\n    )\n        external\n        view\n        returns (bool isLocalOperator);\n\n    /// @dev Get the ERC20 token address for a market.\n    /// @param marketId The market to query\n    /// @return tokenAddress The token address\n    function getMarketTokenAddress(\n        uint256 marketId\n    )\n        external\n        view\n        returns (address tokenAddress);\n\n    /// @dev Get all risk parameters in a single struct.\n    /// @return riskParams All global risk parameters\n    function getRiskParams()\n        external\n        view\n        returns (RiskParams memory riskParams);\n\n    /// @dev Get the price of the token for a market.\n    /// @param marketId The market to query\n    /// @return price The price of each atomic unit of the token\n    function getMarketPrice(\n        uint256 marketId\n    )\n        external\n        view\n        returns (Price memory price);\n\n    /// @dev Get the margin premium for a market. A margin premium makes it so that any positions that\n    ///      include the market require a higher collateralization to avoid being liquidated.\n    /// @param  marketId  The market to query\n    /// @return premium The market's margin premium\n    function getMarketMarginPremium(uint256 marketId)\n        external\n        view\n        returns (D256 memory premium);\n\n    /// @dev Get the total supplied and total borrowed values of an account adjusted by the marginPremium\n    ///      of each market. Supplied values are divided by (1 + marginPremium) for each market and\n    ///      borrowed values are multiplied by (1 + marginPremium) for each market. Comparing these\n    ///      adjusted values gives the margin-ratio of the account which will be compared to the global\n    ///      margin-ratio when determining if the account can be liquidated.\n    /// @param account The account to query\n    /// @return supplyValue The supplied value of the account (adjusted for marginPremium)\n    /// @return borrowValue The borrowed value of the account (adjusted for marginPremium)\n    function getAdjustedAccountValues(\n        AccountInfo calldata account\n    )\n        external\n        view\n        returns (Value memory supplyValue, Value memory borrowValue);\n}\n"
    },
    "compiler": {
        "name": "solc",
        "version": "0.5.17+commit.d19bba13",
        "settings": {
            "remappings": [
                "@0x/contracts-utils=/home/runner/work/protocol/protocol/contracts/asset-proxy/node_modules/@0x/contracts-utils",
                "@0x/contracts-erc1155=/home/runner/work/protocol/protocol/contracts/asset-proxy/node_modules/@0x/contracts-erc1155",
                "@0x/contracts-erc20=/home/runner/work/protocol/protocol/contracts/asset-proxy/node_modules/@0x/contracts-erc20",
                "@0x/contracts-exchange-libs=/home/runner/work/protocol/protocol/contracts/asset-proxy/node_modules/@0x/contracts-exchange-libs"
            ],
            "optimizer": {
                "enabled": true,
                "runs": 1000000,
                "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": "istanbul"
        }
    },
    "chains": {}
}
