{
  "id": "176e6c7f41702aa3346ede91a9a60357",
  "_format": "hh-sol-build-info-1",
  "solcVersion": "0.6.10",
  "solcLongVersion": "0.6.10+commit.00c0fcaf",
  "input": {
    "language": "Solidity",
    "sources": {
      "contracts/interfaces/external/ISynth.sol": {
        "content": "/*\n    Copyright 2021 Set Labs Inc.\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    SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.6.10;\n\n// https://docs.synthetix.io/contracts/source/interfaces/isynth\ninterface ISynth {\n    function currencyKey() external view returns (bytes32);\n}\n"
      },
      "contracts/protocol/integration/exchange/SynthetixExchangeAdapter.sol": {
        "content": "/*\n    Copyright 2021 Set Labs Inc.\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    SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.6.10;\npragma experimental \"ABIEncoderV2\";\n\nimport { ISynth } from \"../../../interfaces/external/ISynth.sol\";\nimport { ISynthetixExchanger } from \"../../../interfaces/external/ISynthetixExchanger.sol\";\n\n/**\n * @title SynthetixTradeAdapter\n * @author Set Protocol\n *\n * Exchange adapter for Synthetix that returns data for trades\n */\ncontract SynthetixExchangeAdapter {\n\n    /* ============ Structs ============ */\n\n    /**\n     * Struct containing information for trade function\n     */\n    struct SynthetixTradeInfo {\n        bytes32 sourceCurrencyKey;        // Currency key of the token to send\n        bytes32 destinationCurrencyKey;   // Currency key the token to receive\n    }\n\n    /* ============ State Variables ============ */\n\n    // Address of Synthetix's Exchanger contract\n    address public immutable synthetixExchangerAddress;\n\n    /* ============ Constructor ============ */\n\n    /**\n     * Set state variables\n     *\n     * @param _synthetixExchangerAddress    Address of Synthetix's Exchanger contract\n     */\n    constructor(address _synthetixExchangerAddress) public {\n        synthetixExchangerAddress = _synthetixExchangerAddress;\n    }\n\n    /* ============ External Getter Functions ============ */\n\n    /**\n     * Calculate Synthetix trade encoded calldata. To be invoked on the SetToken.\n     *\n     * @param  _sourceToken              Address of source token to be sold\n     * @param  _destinationToken         Address of destination token to buy\n     * @param  _destinationAddress       Address to receive traded tokens\n     * @param  _sourceQuantity           Amount of source token to sell\n     *\n     * @return address                   Target address\n     * @return uint256                   Call value\n     * @return bytes                     Trade calldata\n     */\n    function getTradeCalldata(\n        address _sourceToken,\n        address _destinationToken,\n        address _destinationAddress,\n        uint256 _sourceQuantity,\n        uint256 /* _minDestinationQuantity */,\n        bytes calldata /* _data */\n    )\n        external\n        view\n        returns (address, uint256, bytes memory)\n    {\n        SynthetixTradeInfo memory synthetixTradeInfo;\n\n        require(\n            _sourceToken != _destinationToken,\n            \"Source token cannot be same as destination token\"\n        );\n\n        synthetixTradeInfo.sourceCurrencyKey = _getCurrencyKey(_sourceToken);\n        synthetixTradeInfo.destinationCurrencyKey = _getCurrencyKey(_destinationToken);\n\n        // Encode method data for SetToken to invoke\n        bytes memory methodData = abi.encodeWithSignature(\n            \"exchange(address,bytes32,uint256,bytes32,address)\",\n            _destinationAddress,\n            synthetixTradeInfo.sourceCurrencyKey,\n            _sourceQuantity,\n            synthetixTradeInfo.destinationCurrencyKey,\n            _destinationAddress\n        );\n\n        return (synthetixExchangerAddress, 0, methodData);\n    }\n\n    /**\n     * Returns the Synthetix contract address.\n     * There is no need to approve to SNX as its a proxy\n     *\n     * @return address\n     */\n    function getSpender()\n        external\n        view\n        returns (address)\n    {\n        return synthetixExchangerAddress;\n    }\n\n    /**\n     * Returns the amount of destination token received for exchanging a quantity of\n     * source token, less fees.\n     *\n     * @param  _sourceToken        Address of source token to be sold\n     * @param  _destinationToken   Address of destination token to buy\n     * @param  _sourceQuantity     Amount of source token to sell\n     *\n     * @return amountReceived      Amount of source token received for exchange\n     */\n    function getAmountReceivedForExchange(\n        address _sourceToken,\n        address _destinationToken,\n        uint256 _sourceQuantity\n    )\n        external\n        view\n        returns (uint256 amountReceived)\n    {\n        SynthetixTradeInfo memory synthetixTradeInfo;\n\n        synthetixTradeInfo.sourceCurrencyKey = _getCurrencyKey(_sourceToken);\n        synthetixTradeInfo.destinationCurrencyKey = _getCurrencyKey(_destinationToken);\n\n        (amountReceived,,) = ISynthetixExchanger(synthetixExchangerAddress).getAmountsForExchange(\n            _sourceQuantity,\n            synthetixTradeInfo.sourceCurrencyKey,\n            synthetixTradeInfo.destinationCurrencyKey\n        );\n    }\n\n    /* ============ Internal Functions ============ */\n\n    /**\n     * Gets the Synthetix currency key for _token\n     *\n     * @param _token  Address of token to get currency key for\n     */\n    function _getCurrencyKey(address _token) internal view returns (bytes32) {\n\n        try ISynth(_token).currencyKey() returns (bytes32 key){\n\n            return key;\n\n        } catch (bytes memory /* data */) {\n\n            revert(\"Invalid Synth token address\");\n        }\n    }\n}\n"
      },
      "contracts/interfaces/external/ISynthetixExchanger.sol": {
        "content": "/*\n    Copyright 2021 Set Labs Inc.\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    SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.6.10;\n\n// https://docs.synthetix.io/contracts/source/interfaces/iExchanger\ninterface ISynthetixExchanger {\n    function getAmountsForExchange(\n        uint sourceAmount,\n        bytes32 sourceCurrencyKey,\n        bytes32 destinationCurrencyKey\n    )\n        external\n        view\n        returns (\n            uint amountReceived,\n            uint fee,\n            uint exchangeFeeRate\n        );\n\n    function exchange(\n        address from,\n        bytes32 sourceCurrencyKey,\n        uint sourceAmount,\n        bytes32 destinationCurrencyKey,\n        address destinationAddress\n    ) external returns (uint amountReceived);\n}\n"
      }
    },
    "settings": {
      "optimizer": {
        "enabled": true,
        "runs": 200
      },
      "outputSelection": {
        "*": {
          "*": [
            "abi",
            "evm.bytecode",
            "evm.deployedBytecode",
            "evm.methodIdentifiers"
          ],
          "": [
            "ast"
          ]
        }
      }
    }
  },
  "output": {
    "contracts": {
      "contracts/interfaces/external/ISynth.sol": {
        "ISynth": {
          "abi": [
            {
              "inputs": [],
              "name": "currencyKey",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            }
          ],
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "methodIdentifiers": {
              "currencyKey()": "dbd06c85"
            }
          }
        }
      },
      "contracts/interfaces/external/ISynthetixExchanger.sol": {
        "ISynthetixExchanger": {
          "abi": [
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "from",
                  "type": "address"
                },
                {
                  "internalType": "bytes32",
                  "name": "sourceCurrencyKey",
                  "type": "bytes32"
                },
                {
                  "internalType": "uint256",
                  "name": "sourceAmount",
                  "type": "uint256"
                },
                {
                  "internalType": "bytes32",
                  "name": "destinationCurrencyKey",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "destinationAddress",
                  "type": "address"
                }
              ],
              "name": "exchange",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "amountReceived",
                  "type": "uint256"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "uint256",
                  "name": "sourceAmount",
                  "type": "uint256"
                },
                {
                  "internalType": "bytes32",
                  "name": "sourceCurrencyKey",
                  "type": "bytes32"
                },
                {
                  "internalType": "bytes32",
                  "name": "destinationCurrencyKey",
                  "type": "bytes32"
                }
              ],
              "name": "getAmountsForExchange",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "amountReceived",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "fee",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "exchangeFeeRate",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            }
          ],
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "methodIdentifiers": {
              "exchange(address,bytes32,uint256,bytes32,address)": "0a1e187d",
              "getAmountsForExchange(uint256,bytes32,bytes32)": "f450aa34"
            }
          }
        }
      },
      "contracts/protocol/integration/exchange/SynthetixExchangeAdapter.sol": {
        "SynthetixExchangeAdapter": {
          "abi": [
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "_synthetixExchangerAddress",
                  "type": "address"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "constructor"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "_sourceToken",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "_destinationToken",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "_sourceQuantity",
                  "type": "uint256"
                }
              ],
              "name": "getAmountReceivedForExchange",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "amountReceived",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getSpender",
              "outputs": [
                {
                  "internalType": "address",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "_sourceToken",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "_destinationToken",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "_destinationAddress",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "_sourceQuantity",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                },
                {
                  "internalType": "bytes",
                  "name": "",
                  "type": "bytes"
                }
              ],
              "name": "getTradeCalldata",
              "outputs": [
                {
                  "internalType": "address",
                  "name": "",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                },
                {
                  "internalType": "bytes",
                  "name": "",
                  "type": "bytes"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "synthetixExchangerAddress",
              "outputs": [
                {
                  "internalType": "address",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            }
          ],
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "60a060405234801561001057600080fd5b5060405161071738038061071783398101604081905261002f91610044565b60601b6001600160601b031916608052610072565b600060208284031215610055578081fd5b81516001600160a01b038116811461006b578182fd5b9392505050565b60805160601c61067a61009d6000398060f7528061018b52806102585280610290525061067a6000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806325bcdf5914610051578063334fc2891461007a578063e171fcab1461008f578063ee405c65146100b1575b600080fd5b61006461005f366004610453565b6100b9565b604051610071919061060d565b60405180910390f35b610082610189565b60405161007191906104d8565b6100a261009d36600461039d565b6101ad565b6040516100719392919061051c565b61008261028e565b60006100c361036f565b6100cc856102b2565b81526100d7846102b2565b602082018190528151604051633d142a8d60e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263f450aa349261012d92889290600401610616565b60606040518083038186803b15801561014557600080fd5b505afa158015610159573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061017d91906104ab565b50909695505050505050565b7f000000000000000000000000000000000000000000000000000000000000000090565b60008060606101ba61036f565b896001600160a01b03168b6001600160a01b031614156101f55760405162461bcd60e51b81526004016101ec90610586565b60405180910390fd5b6101fe8b6102b2565b81526102098a6102b2565b60208201819052815160405160609261022c928d9290918d9184906024016104ec565b60408051601f198184030181529190526020810180516001600160e01b0316630a1e187d60e01b1790527f0000000000000000000000000000000000000000000000000000000000000000955060009450925050509750975097945050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000816001600160a01b031663dbd06c856040518163ffffffff1660e01b815260040160206040518083038186803b1580156102ed57600080fd5b505afa92505050801561031d575060408051601f3d908101601f1916820190925261031a91810190610493565b60015b610369573d80801561034b576040519150601f19603f3d011682016040523d82523d6000602084013e610350565b606091505b5060405162461bcd60e51b81526004016101ec906105d6565b92915050565b604080518082019091526000808252602082015290565b80356001600160a01b038116811461036957600080fd5b600080600080600080600060c0888a0312156103b7578283fd5b6103c18989610386565b96506103d08960208a01610386565b95506103df8960408a01610386565b9450606088013593506080880135925060a088013567ffffffffffffffff80821115610409578384fd5b818a018b601f82011261041a578485fd5b803592508183111561042a578485fd5b8b602084830101111561043b578485fd5b60208101945050508091505092959891949750929550565b600080600060608486031215610467578283fd5b83356104728161062c565b925060208401356104828161062c565b929592945050506040919091013590565b6000602082840312156104a4578081fd5b5051919050565b6000806000606084860312156104bf578283fd5b8351925060208401519150604084015190509250925092565b6001600160a01b0391909116815260200190565b6001600160a01b039586168152602081019490945260408401929092526060830152909116608082015260a00190565b600060018060a01b038516825260208481840152606060408401528351806060850152825b8181101561055d57858101830151858201608001528201610541565b8181111561056e5783608083870101525b50601f01601f19169290920160800195945050505050565b60208082526030908201527f536f7572636520746f6b656e2063616e6e6f742062652073616d65206173206460408201526f32b9ba34b730ba34b7b7103a37b5b2b760811b606082015260800190565b6020808252601b908201527f496e76616c69642053796e746820746f6b656e20616464726573730000000000604082015260600190565b90815260200190565b9283526020830191909152604082015260600190565b6001600160a01b038116811461064157600080fd5b5056fea26469706673582212204a4f85939463b520ae2184b0ae19f2e504c5f49af44b6635fa55f48e326d0c9364736f6c634300060a0033",
              "opcodes": "PUSH1 0xA0 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH2 0x717 CODESIZE SUB DUP1 PUSH2 0x717 DUP4 CODECOPY DUP2 ADD PUSH1 0x40 DUP2 SWAP1 MSTORE PUSH2 0x2F SWAP2 PUSH2 0x44 JUMP JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH1 0x80 MSTORE PUSH2 0x72 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x55 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x6B JUMPI DUP2 DUP3 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x80 MLOAD PUSH1 0x60 SHR PUSH2 0x67A PUSH2 0x9D PUSH1 0x0 CODECOPY DUP1 PUSH1 0xF7 MSTORE DUP1 PUSH2 0x18B MSTORE DUP1 PUSH2 0x258 MSTORE DUP1 PUSH2 0x290 MSTORE POP PUSH2 0x67A 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 0x4C JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x25BCDF59 EQ PUSH2 0x51 JUMPI DUP1 PUSH4 0x334FC289 EQ PUSH2 0x7A JUMPI DUP1 PUSH4 0xE171FCAB EQ PUSH2 0x8F JUMPI DUP1 PUSH4 0xEE405C65 EQ PUSH2 0xB1 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x64 PUSH2 0x5F CALLDATASIZE PUSH1 0x4 PUSH2 0x453 JUMP JUMPDEST PUSH2 0xB9 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x71 SWAP2 SWAP1 PUSH2 0x60D JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x82 PUSH2 0x189 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x71 SWAP2 SWAP1 PUSH2 0x4D8 JUMP JUMPDEST PUSH2 0xA2 PUSH2 0x9D CALLDATASIZE PUSH1 0x4 PUSH2 0x39D JUMP JUMPDEST PUSH2 0x1AD JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x71 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x51C JUMP JUMPDEST PUSH2 0x82 PUSH2 0x28E JUMP JUMPDEST PUSH1 0x0 PUSH2 0xC3 PUSH2 0x36F JUMP JUMPDEST PUSH2 0xCC DUP6 PUSH2 0x2B2 JUMP JUMPDEST DUP2 MSTORE PUSH2 0xD7 DUP5 PUSH2 0x2B2 JUMP JUMPDEST PUSH1 0x20 DUP3 ADD DUP2 SWAP1 MSTORE DUP2 MLOAD PUSH1 0x40 MLOAD PUSH4 0x3D142A8D PUSH1 0xE2 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB PUSH32 0x0 AND SWAP3 PUSH4 0xF450AA34 SWAP3 PUSH2 0x12D SWAP3 DUP9 SWAP3 SWAP1 PUSH1 0x4 ADD PUSH2 0x616 JUMP JUMPDEST PUSH1 0x60 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x145 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x159 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x17D SWAP2 SWAP1 PUSH2 0x4AB JUMP JUMPDEST POP SWAP1 SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x60 PUSH2 0x1BA PUSH2 0x36F JUMP JUMPDEST DUP10 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP12 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x1F5 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x1EC SWAP1 PUSH2 0x586 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x1FE DUP12 PUSH2 0x2B2 JUMP JUMPDEST DUP2 MSTORE PUSH2 0x209 DUP11 PUSH2 0x2B2 JUMP JUMPDEST PUSH1 0x20 DUP3 ADD DUP2 SWAP1 MSTORE DUP2 MLOAD PUSH1 0x40 MLOAD PUSH1 0x60 SWAP3 PUSH2 0x22C SWAP3 DUP14 SWAP3 SWAP1 SWAP2 DUP14 SWAP2 DUP5 SWAP1 PUSH1 0x24 ADD PUSH2 0x4EC JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F NOT DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 SWAP1 MSTORE PUSH1 0x20 DUP2 ADD DUP1 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB AND PUSH4 0xA1E187D PUSH1 0xE0 SHL OR SWAP1 MSTORE PUSH32 0x0 SWAP6 POP PUSH1 0x0 SWAP5 POP SWAP3 POP POP POP SWAP8 POP SWAP8 POP SWAP8 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH32 0x0 DUP2 JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xDBD06C85 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x2ED JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL SWAP3 POP POP POP DUP1 ISZERO PUSH2 0x31D JUMPI POP PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH1 0x1F NOT AND DUP3 ADD SWAP1 SWAP3 MSTORE PUSH2 0x31A SWAP2 DUP2 ADD SWAP1 PUSH2 0x493 JUMP JUMPDEST PUSH1 0x1 JUMPDEST PUSH2 0x369 JUMPI RETURNDATASIZE DUP1 DUP1 ISZERO PUSH2 0x34B JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH1 0x0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0x350 JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x1EC SWAP1 PUSH2 0x5D6 JUMP JUMPDEST SWAP3 SWAP2 POP POP 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 DUP1 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x369 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0xC0 DUP9 DUP11 SUB SLT ISZERO PUSH2 0x3B7 JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0x3C1 DUP10 DUP10 PUSH2 0x386 JUMP JUMPDEST SWAP7 POP PUSH2 0x3D0 DUP10 PUSH1 0x20 DUP11 ADD PUSH2 0x386 JUMP JUMPDEST SWAP6 POP PUSH2 0x3DF DUP10 PUSH1 0x40 DUP11 ADD PUSH2 0x386 JUMP JUMPDEST SWAP5 POP PUSH1 0x60 DUP9 ADD CALLDATALOAD SWAP4 POP PUSH1 0x80 DUP9 ADD CALLDATALOAD SWAP3 POP PUSH1 0xA0 DUP9 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x409 JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 DUP11 ADD DUP12 PUSH1 0x1F DUP3 ADD SLT PUSH2 0x41A JUMPI DUP5 DUP6 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP3 POP DUP2 DUP4 GT ISZERO PUSH2 0x42A JUMPI DUP5 DUP6 REVERT JUMPDEST DUP12 PUSH1 0x20 DUP5 DUP4 ADD ADD GT ISZERO PUSH2 0x43B JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH1 0x20 DUP2 ADD SWAP5 POP POP POP DUP1 SWAP2 POP POP SWAP3 SWAP6 SWAP9 SWAP2 SWAP5 SWAP8 POP SWAP3 SWAP6 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x467 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP4 CALLDATALOAD PUSH2 0x472 DUP2 PUSH2 0x62C JUMP JUMPDEST SWAP3 POP PUSH1 0x20 DUP5 ADD CALLDATALOAD PUSH2 0x482 DUP2 PUSH2 0x62C JUMP JUMPDEST SWAP3 SWAP6 SWAP3 SWAP5 POP POP POP PUSH1 0x40 SWAP2 SWAP1 SWAP2 ADD CALLDATALOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x4A4 JUMPI DUP1 DUP2 REVERT JUMPDEST POP MLOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x4BF JUMPI DUP3 DUP4 REVERT JUMPDEST DUP4 MLOAD SWAP3 POP PUSH1 0x20 DUP5 ADD MLOAD SWAP2 POP PUSH1 0x40 DUP5 ADD MLOAD SWAP1 POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP6 DUP7 AND DUP2 MSTORE PUSH1 0x20 DUP2 ADD SWAP5 SWAP1 SWAP5 MSTORE PUSH1 0x40 DUP5 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x60 DUP4 ADD MSTORE SWAP1 SWAP2 AND PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 DUP1 PUSH1 0xA0 SHL SUB DUP6 AND DUP3 MSTORE PUSH1 0x20 DUP5 DUP2 DUP5 ADD MSTORE PUSH1 0x60 PUSH1 0x40 DUP5 ADD MSTORE DUP4 MLOAD DUP1 PUSH1 0x60 DUP6 ADD MSTORE DUP3 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x55D JUMPI DUP6 DUP2 ADD DUP4 ADD MLOAD DUP6 DUP3 ADD PUSH1 0x80 ADD MSTORE DUP3 ADD PUSH2 0x541 JUMP JUMPDEST DUP2 DUP2 GT ISZERO PUSH2 0x56E JUMPI DUP4 PUSH1 0x80 DUP4 DUP8 ADD ADD MSTORE JUMPDEST POP PUSH1 0x1F ADD PUSH1 0x1F NOT AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x80 ADD SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x30 SWAP1 DUP3 ADD MSTORE PUSH32 0x536F7572636520746F6B656E2063616E6E6F742062652073616D652061732064 PUSH1 0x40 DUP3 ADD MSTORE PUSH16 0x32B9BA34B730BA34B7B7103A37B5B2B7 PUSH1 0x81 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x1B SWAP1 DUP3 ADD MSTORE PUSH32 0x496E76616C69642053796E746820746F6B656E20616464726573730000000000 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 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 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x641 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x4A 0x4F DUP6 SWAP4 SWAP5 PUSH4 0xB520AE21 DUP5 0xB0 0xAE NOT CALLCODE 0xE5 DIV 0xC5 DELEGATECALL SWAP11 DELEGATECALL 0x4B PUSH7 0x35FA55F48E326D 0xC SWAP4 PUSH5 0x736F6C6343 STOP MOD EXP STOP CALLER ",
              "sourceMap": "1005:4510:2:-:0;;;1704:126;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1769:54;;-1:-1:-1;;;;;;1769:54:2;;;1005:4510;;146:263:-1;;261:2;249:9;240:7;236:23;232:32;229:2;;;-1:-1;;267:12;229:2;83:13;;-1:-1;;;;;576:54;;701:35;;691:2;;-1:-1;;740:12;691:2;319:74;223:186;-1:-1;;;223:186;;1005:4510:2;;;;;;;;;;;"
            },
            "deployedBytecode": {
              "immutableReferences": {
                "55": [
                  {
                    "length": 32,
                    "start": 247
                  },
                  {
                    "length": 32,
                    "start": 395
                  },
                  {
                    "length": 32,
                    "start": 600
                  },
                  {
                    "length": 32,
                    "start": 656
                  }
                ]
              },
              "linkReferences": {},
              "object": "608060405234801561001057600080fd5b506004361061004c5760003560e01c806325bcdf5914610051578063334fc2891461007a578063e171fcab1461008f578063ee405c65146100b1575b600080fd5b61006461005f366004610453565b6100b9565b604051610071919061060d565b60405180910390f35b610082610189565b60405161007191906104d8565b6100a261009d36600461039d565b6101ad565b6040516100719392919061051c565b61008261028e565b60006100c361036f565b6100cc856102b2565b81526100d7846102b2565b602082018190528151604051633d142a8d60e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263f450aa349261012d92889290600401610616565b60606040518083038186803b15801561014557600080fd5b505afa158015610159573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061017d91906104ab565b50909695505050505050565b7f000000000000000000000000000000000000000000000000000000000000000090565b60008060606101ba61036f565b896001600160a01b03168b6001600160a01b031614156101f55760405162461bcd60e51b81526004016101ec90610586565b60405180910390fd5b6101fe8b6102b2565b81526102098a6102b2565b60208201819052815160405160609261022c928d9290918d9184906024016104ec565b60408051601f198184030181529190526020810180516001600160e01b0316630a1e187d60e01b1790527f0000000000000000000000000000000000000000000000000000000000000000955060009450925050509750975097945050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000816001600160a01b031663dbd06c856040518163ffffffff1660e01b815260040160206040518083038186803b1580156102ed57600080fd5b505afa92505050801561031d575060408051601f3d908101601f1916820190925261031a91810190610493565b60015b610369573d80801561034b576040519150601f19603f3d011682016040523d82523d6000602084013e610350565b606091505b5060405162461bcd60e51b81526004016101ec906105d6565b92915050565b604080518082019091526000808252602082015290565b80356001600160a01b038116811461036957600080fd5b600080600080600080600060c0888a0312156103b7578283fd5b6103c18989610386565b96506103d08960208a01610386565b95506103df8960408a01610386565b9450606088013593506080880135925060a088013567ffffffffffffffff80821115610409578384fd5b818a018b601f82011261041a578485fd5b803592508183111561042a578485fd5b8b602084830101111561043b578485fd5b60208101945050508091505092959891949750929550565b600080600060608486031215610467578283fd5b83356104728161062c565b925060208401356104828161062c565b929592945050506040919091013590565b6000602082840312156104a4578081fd5b5051919050565b6000806000606084860312156104bf578283fd5b8351925060208401519150604084015190509250925092565b6001600160a01b0391909116815260200190565b6001600160a01b039586168152602081019490945260408401929092526060830152909116608082015260a00190565b600060018060a01b038516825260208481840152606060408401528351806060850152825b8181101561055d57858101830151858201608001528201610541565b8181111561056e5783608083870101525b50601f01601f19169290920160800195945050505050565b60208082526030908201527f536f7572636520746f6b656e2063616e6e6f742062652073616d65206173206460408201526f32b9ba34b730ba34b7b7103a37b5b2b760811b606082015260800190565b6020808252601b908201527f496e76616c69642053796e746820746f6b656e20616464726573730000000000604082015260600190565b90815260200190565b9283526020830191909152604082015260600190565b6001600160a01b038116811461064157600080fd5b5056fea26469706673582212204a4f85939463b520ae2184b0ae19f2e504c5f49af44b6635fa55f48e326d0c9364736f6c634300060a0033",
              "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x4C JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x25BCDF59 EQ PUSH2 0x51 JUMPI DUP1 PUSH4 0x334FC289 EQ PUSH2 0x7A JUMPI DUP1 PUSH4 0xE171FCAB EQ PUSH2 0x8F JUMPI DUP1 PUSH4 0xEE405C65 EQ PUSH2 0xB1 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x64 PUSH2 0x5F CALLDATASIZE PUSH1 0x4 PUSH2 0x453 JUMP JUMPDEST PUSH2 0xB9 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x71 SWAP2 SWAP1 PUSH2 0x60D JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x82 PUSH2 0x189 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x71 SWAP2 SWAP1 PUSH2 0x4D8 JUMP JUMPDEST PUSH2 0xA2 PUSH2 0x9D CALLDATASIZE PUSH1 0x4 PUSH2 0x39D JUMP JUMPDEST PUSH2 0x1AD JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x71 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x51C JUMP JUMPDEST PUSH2 0x82 PUSH2 0x28E JUMP JUMPDEST PUSH1 0x0 PUSH2 0xC3 PUSH2 0x36F JUMP JUMPDEST PUSH2 0xCC DUP6 PUSH2 0x2B2 JUMP JUMPDEST DUP2 MSTORE PUSH2 0xD7 DUP5 PUSH2 0x2B2 JUMP JUMPDEST PUSH1 0x20 DUP3 ADD DUP2 SWAP1 MSTORE DUP2 MLOAD PUSH1 0x40 MLOAD PUSH4 0x3D142A8D PUSH1 0xE2 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB PUSH32 0x0 AND SWAP3 PUSH4 0xF450AA34 SWAP3 PUSH2 0x12D SWAP3 DUP9 SWAP3 SWAP1 PUSH1 0x4 ADD PUSH2 0x616 JUMP JUMPDEST PUSH1 0x60 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x145 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x159 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x17D SWAP2 SWAP1 PUSH2 0x4AB JUMP JUMPDEST POP SWAP1 SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x60 PUSH2 0x1BA PUSH2 0x36F JUMP JUMPDEST DUP10 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP12 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x1F5 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x1EC SWAP1 PUSH2 0x586 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x1FE DUP12 PUSH2 0x2B2 JUMP JUMPDEST DUP2 MSTORE PUSH2 0x209 DUP11 PUSH2 0x2B2 JUMP JUMPDEST PUSH1 0x20 DUP3 ADD DUP2 SWAP1 MSTORE DUP2 MLOAD PUSH1 0x40 MLOAD PUSH1 0x60 SWAP3 PUSH2 0x22C SWAP3 DUP14 SWAP3 SWAP1 SWAP2 DUP14 SWAP2 DUP5 SWAP1 PUSH1 0x24 ADD PUSH2 0x4EC JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F NOT DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 SWAP1 MSTORE PUSH1 0x20 DUP2 ADD DUP1 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB AND PUSH4 0xA1E187D PUSH1 0xE0 SHL OR SWAP1 MSTORE PUSH32 0x0 SWAP6 POP PUSH1 0x0 SWAP5 POP SWAP3 POP POP POP SWAP8 POP SWAP8 POP SWAP8 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH32 0x0 DUP2 JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xDBD06C85 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x2ED JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL SWAP3 POP POP POP DUP1 ISZERO PUSH2 0x31D JUMPI POP PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH1 0x1F NOT AND DUP3 ADD SWAP1 SWAP3 MSTORE PUSH2 0x31A SWAP2 DUP2 ADD SWAP1 PUSH2 0x493 JUMP JUMPDEST PUSH1 0x1 JUMPDEST PUSH2 0x369 JUMPI RETURNDATASIZE DUP1 DUP1 ISZERO PUSH2 0x34B JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH1 0x0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0x350 JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x1EC SWAP1 PUSH2 0x5D6 JUMP JUMPDEST SWAP3 SWAP2 POP POP 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 DUP1 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x369 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0xC0 DUP9 DUP11 SUB SLT ISZERO PUSH2 0x3B7 JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0x3C1 DUP10 DUP10 PUSH2 0x386 JUMP JUMPDEST SWAP7 POP PUSH2 0x3D0 DUP10 PUSH1 0x20 DUP11 ADD PUSH2 0x386 JUMP JUMPDEST SWAP6 POP PUSH2 0x3DF DUP10 PUSH1 0x40 DUP11 ADD PUSH2 0x386 JUMP JUMPDEST SWAP5 POP PUSH1 0x60 DUP9 ADD CALLDATALOAD SWAP4 POP PUSH1 0x80 DUP9 ADD CALLDATALOAD SWAP3 POP PUSH1 0xA0 DUP9 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x409 JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 DUP11 ADD DUP12 PUSH1 0x1F DUP3 ADD SLT PUSH2 0x41A JUMPI DUP5 DUP6 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP3 POP DUP2 DUP4 GT ISZERO PUSH2 0x42A JUMPI DUP5 DUP6 REVERT JUMPDEST DUP12 PUSH1 0x20 DUP5 DUP4 ADD ADD GT ISZERO PUSH2 0x43B JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH1 0x20 DUP2 ADD SWAP5 POP POP POP DUP1 SWAP2 POP POP SWAP3 SWAP6 SWAP9 SWAP2 SWAP5 SWAP8 POP SWAP3 SWAP6 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x467 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP4 CALLDATALOAD PUSH2 0x472 DUP2 PUSH2 0x62C JUMP JUMPDEST SWAP3 POP PUSH1 0x20 DUP5 ADD CALLDATALOAD PUSH2 0x482 DUP2 PUSH2 0x62C JUMP JUMPDEST SWAP3 SWAP6 SWAP3 SWAP5 POP POP POP PUSH1 0x40 SWAP2 SWAP1 SWAP2 ADD CALLDATALOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x4A4 JUMPI DUP1 DUP2 REVERT JUMPDEST POP MLOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x4BF JUMPI DUP3 DUP4 REVERT JUMPDEST DUP4 MLOAD SWAP3 POP PUSH1 0x20 DUP5 ADD MLOAD SWAP2 POP PUSH1 0x40 DUP5 ADD MLOAD SWAP1 POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP6 DUP7 AND DUP2 MSTORE PUSH1 0x20 DUP2 ADD SWAP5 SWAP1 SWAP5 MSTORE PUSH1 0x40 DUP5 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x60 DUP4 ADD MSTORE SWAP1 SWAP2 AND PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 DUP1 PUSH1 0xA0 SHL SUB DUP6 AND DUP3 MSTORE PUSH1 0x20 DUP5 DUP2 DUP5 ADD MSTORE PUSH1 0x60 PUSH1 0x40 DUP5 ADD MSTORE DUP4 MLOAD DUP1 PUSH1 0x60 DUP6 ADD MSTORE DUP3 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x55D JUMPI DUP6 DUP2 ADD DUP4 ADD MLOAD DUP6 DUP3 ADD PUSH1 0x80 ADD MSTORE DUP3 ADD PUSH2 0x541 JUMP JUMPDEST DUP2 DUP2 GT ISZERO PUSH2 0x56E JUMPI DUP4 PUSH1 0x80 DUP4 DUP8 ADD ADD MSTORE JUMPDEST POP PUSH1 0x1F ADD PUSH1 0x1F NOT AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x80 ADD SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x30 SWAP1 DUP3 ADD MSTORE PUSH32 0x536F7572636520746F6B656E2063616E6E6F742062652073616D652061732064 PUSH1 0x40 DUP3 ADD MSTORE PUSH16 0x32B9BA34B730BA34B7B7103A37B5B2B7 PUSH1 0x81 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x1B SWAP1 DUP3 ADD MSTORE PUSH32 0x496E76616C69642053796E746820746F6B656E20616464726573730000000000 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 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 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x641 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x4A 0x4F DUP6 SWAP4 SWAP5 PUSH4 0xB520AE21 DUP5 0xB0 0xAE NOT CALLCODE 0xE5 DIV 0xC5 DELEGATECALL SWAP11 DELEGATECALL 0x4B PUSH7 0x35FA55F48E326D 0xC SWAP4 PUSH5 0x736F6C6343 STOP MOD EXP STOP CALLER ",
              "sourceMap": "1005:4510:2:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4349:689;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;3778:131;;;:::i;:::-;;;;;;;;2474:1148;;;;;;;;;:::i;:::-;;;;;;;;;;1462:50;;;:::i;4349:689::-;4538:22;4576:44;;:::i;:::-;4670:29;4686:12;4670:15;:29::i;:::-;4631:68;;4753:34;4769:17;4753:15;:34::i;:::-;4709:41;;;:78;;;4930:36;;4819:212;;-1:-1:-1;;;4819:212:2;;-1:-1:-1;;;;;4839:25:2;4819:68;;;;:212;;4901:15;;4709:78;4819:212;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4798:233:2;;4349:689;-1:-1:-1;;;;;;4349:689:2:o;3778:131::-;3877:25;3778:131;:::o;2474:1148::-;2771:7;2780;2789:12;2817:44;;:::i;:::-;2909:17;-1:-1:-1;;;;;2893:33:2;:12;-1:-1:-1;;;;;2893:33:2;;;2872:128;;;;-1:-1:-1;;;2872:128:2;;;;;;;;;;;;;;;;;3050:29;3066:12;3050:15;:29::i;:::-;3011:68;;3133:34;3149:17;3133:15;:34::i;:::-;3089:41;;;:78;;;3392:36;;3257:298;;3231:23;;3257:298;;3359:19;;3392:36;;3442:15;;3359:19;;3257:298;;;;;;;;-1:-1:-1;;3257:298:2;;;;;;;;;;;;;;-1:-1:-1;;;;;3257:298:2;-1:-1:-1;;;3257:298:2;;;3574:25;;-1:-1:-1;;;;3257:298:2;-1:-1:-1;;;2474:1148:2;;;;;;;;;;;:::o;1462:50::-;;;:::o;5236:277::-;5300:7;5331:6;-1:-1:-1;;;;;5324:26:2;;:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5324:28:2;;;;;;;;-1:-1:-1;;5324:28:2;;;;;;;;;;;;;;;;5320:187;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5459:37;;-1:-1:-1;;;5459:37:2;;;;;;;;5320:187;5396:3;5236:277;-1:-1:-1;;5236:277:2:o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;:::o;5:130::-;72:20;;-1:-1;;;;;8344:54;;8930:35;;8920:2;;8979:1;;8969:12;919:993;;;;;;;;1127:3;1115:9;1106:7;1102:23;1098:33;1095:2;;;-1:-1;;1134:12;1095:2;1196:53;1241:7;1217:22;1196:53;;;1186:63;;1304:53;1349:7;1286:2;1329:9;1325:22;1304:53;;;1294:63;;1412:53;1457:7;1394:2;1437:9;1433:22;1412:53;;;1402:63;;1502:2;1545:9;1541:22;708:20;1510:63;;1610:3;1654:9;1650:22;708:20;1619:63;;1747:3;1736:9;1732:19;1719:33;1772:18;;1764:6;1761:30;1758:2;;;-1:-1;;1794:12;1758:2;1879:6;1868:9;1864:22;411:3;404:4;396:6;392:17;388:27;378:2;;-1:-1;;419:12;378:2;462:6;449:20;439:30;;1772:18;481:6;478:30;475:2;;;-1:-1;;511:12;475:2;606:3;1286:2;586:17;547:6;572:32;;569:41;566:2;;;-1:-1;;613:12;566:2;1286;547:6;543:17;1822:74;;;;;;;;1089:823;;;;;;;;;;;1919:491;;;;2057:2;2045:9;2036:7;2032:23;2028:32;2025:2;;;-1:-1;;2063:12;2025:2;85:6;72:20;97:33;124:5;97:33;;;2115:63;-1:-1;2215:2;2254:22;;72:20;97:33;72:20;97:33;;;2019:391;;2223:63;;-1:-1;;;2323:2;2362:22;;;;708:20;;2019:391;2417:263;;2532:2;2520:9;2511:7;2507:23;2503:32;2500:2;;;-1:-1;;2538:12;2500:2;-1:-1;220:13;;2494:186;-1:-1;2494:186;2687:535;;;;2836:2;2824:9;2815:7;2811:23;2807:32;2804:2;;;-1:-1;;2842:12;2804:2;862:6;856:13;2894:74;;3005:2;3059:9;3055:22;856:13;3013:74;;3124:2;3178:9;3174:22;856:13;3132:74;;2798:424;;;;;;4669:222;-1:-1;;;;;8344:54;;;;3300:37;;4796:2;4781:18;;4767:124;4898:668;-1:-1;;;;;8344:54;;;3300:37;;5302:2;5287:18;;3420:37;;;;5385:2;5370:18;;3420:37;;;;5468:2;5453:18;;3420:37;8344:54;;;5551:3;5536:19;;3300:37;5137:3;5122:19;;5108:458;5573:528;;8355:42;;;;;8348:5;8344:54;3307:3;3300:37;5938:2;3450:5;5938:2;5927:9;5923:18;3420:37;5774:2;5975;5964:9;5960:18;5953:48;3611:5;7721:12;7877:6;5774:2;5763:9;5759:18;7865:19;-1:-1;8562:101;8576:6;8573:1;8570:13;8562:101;;;8643:11;;;;;8637:18;8624:11;;;7905:14;8624:11;8617:39;8591:10;;8562:101;;;8678:6;8675:1;8672:13;8669:2;;;-1:-1;7905:14;8734:6;5763:9;8725:16;;8718:27;8669:2;-1:-1;8850:7;8834:14;-1:-1;;8830:28;3768:39;;;;7905:14;3768:39;;5745:356;-1:-1;;;;;5745:356;6108:416;6308:2;6322:47;;;4044:2;6293:18;;;7865:19;4080:34;7905:14;;;4060:55;-1:-1;;;4135:12;;;4128:40;4187:12;;;6279:245;6531:416;6731:2;6745:47;;;4438:2;6716:18;;;7865:19;4474:29;7905:14;;;4454:50;4523:12;;;6702:245;6954:222;3420:37;;;7081:2;7066:18;;7052:124;7183:444;3420:37;;;7530:2;7515:18;;3420:37;;;;7613:2;7598:18;;3420:37;7366:2;7351:18;;7337:290;8871:117;-1:-1;;;;;8344:54;;8930:35;;8920:2;;8979:1;;8969:12;8920:2;8914:74;"
            },
            "methodIdentifiers": {
              "getAmountReceivedForExchange(address,address,uint256)": "25bcdf59",
              "getSpender()": "334fc289",
              "getTradeCalldata(address,address,address,uint256,uint256,bytes)": "e171fcab",
              "synthetixExchangerAddress()": "ee405c65"
            }
          }
        }
      }
    },
    "sources": {
      "contracts/interfaces/external/ISynth.sol": {
        "ast": {
          "absolutePath": "contracts/interfaces/external/ISynth.sol",
          "exportedSymbols": {
            "ISynth": [
              7
            ]
          },
          "id": 8,
          "license": "Apache License",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 1,
              "literals": [
                "solidity",
                "0.6",
                ".10"
              ],
              "nodeType": "PragmaDirective",
              "src": "655:23:0"
            },
            {
              "abstract": false,
              "baseContracts": [],
              "contractDependencies": [],
              "contractKind": "interface",
              "documentation": null,
              "fullyImplemented": false,
              "id": 7,
              "linearizedBaseContracts": [
                7
              ],
              "name": "ISynth",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "body": null,
                  "documentation": null,
                  "functionSelector": "dbd06c85",
                  "id": 6,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "currencyKey",
                  "nodeType": "FunctionDefinition",
                  "overrides": null,
                  "parameters": {
                    "id": 2,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "787:2:0"
                  },
                  "returnParameters": {
                    "id": 5,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "overrides": null,
                        "scope": 6,
                        "src": "813:7:0",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 3,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "813:7:0",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      }
                    ],
                    "src": "812:9:0"
                  },
                  "scope": 7,
                  "src": "767:55:0",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                }
              ],
              "scope": 8,
              "src": "744:80:0"
            }
          ],
          "src": "655:170:0"
        },
        "id": 0
      },
      "contracts/interfaces/external/ISynthetixExchanger.sol": {
        "ast": {
          "absolutePath": "contracts/interfaces/external/ISynthetixExchanger.sol",
          "exportedSymbols": {
            "ISynthetixExchanger": [
              40
            ]
          },
          "id": 41,
          "license": "Apache License",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 9,
              "literals": [
                "solidity",
                "0.6",
                ".10"
              ],
              "nodeType": "PragmaDirective",
              "src": "655:23:1"
            },
            {
              "abstract": false,
              "baseContracts": [],
              "contractDependencies": [],
              "contractKind": "interface",
              "documentation": null,
              "fullyImplemented": false,
              "id": 40,
              "linearizedBaseContracts": [
                40
              ],
              "name": "ISynthetixExchanger",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "body": null,
                  "documentation": null,
                  "functionSelector": "f450aa34",
                  "id": 24,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getAmountsForExchange",
                  "nodeType": "FunctionDefinition",
                  "overrides": null,
                  "parameters": {
                    "id": 16,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 11,
                        "mutability": "mutable",
                        "name": "sourceAmount",
                        "nodeType": "VariableDeclaration",
                        "overrides": null,
                        "scope": 24,
                        "src": "824:17:1",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 10,
                          "name": "uint",
                          "nodeType": "ElementaryTypeName",
                          "src": "824:4:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 13,
                        "mutability": "mutable",
                        "name": "sourceCurrencyKey",
                        "nodeType": "VariableDeclaration",
                        "overrides": null,
                        "scope": 24,
                        "src": "851:25:1",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 12,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "851:7:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 15,
                        "mutability": "mutable",
                        "name": "destinationCurrencyKey",
                        "nodeType": "VariableDeclaration",
                        "overrides": null,
                        "scope": 24,
                        "src": "886:30:1",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 14,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "886:7:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      }
                    ],
                    "src": "814:108:1"
                  },
                  "returnParameters": {
                    "id": 23,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18,
                        "mutability": "mutable",
                        "name": "amountReceived",
                        "nodeType": "VariableDeclaration",
                        "overrides": null,
                        "scope": 24,
                        "src": "983:19:1",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 17,
                          "name": "uint",
                          "nodeType": "ElementaryTypeName",
                          "src": "983:4:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20,
                        "mutability": "mutable",
                        "name": "fee",
                        "nodeType": "VariableDeclaration",
                        "overrides": null,
                        "scope": 24,
                        "src": "1016:8:1",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 19,
                          "name": "uint",
                          "nodeType": "ElementaryTypeName",
                          "src": "1016:4:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 22,
                        "mutability": "mutable",
                        "name": "exchangeFeeRate",
                        "nodeType": "VariableDeclaration",
                        "overrides": null,
                        "scope": 24,
                        "src": "1038:20:1",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 21,
                          "name": "uint",
                          "nodeType": "ElementaryTypeName",
                          "src": "1038:4:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      }
                    ],
                    "src": "969:99:1"
                  },
                  "scope": 40,
                  "src": "784:285:1",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "body": null,
                  "documentation": null,
                  "functionSelector": "0a1e187d",
                  "id": 39,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "exchange",
                  "nodeType": "FunctionDefinition",
                  "overrides": null,
                  "parameters": {
                    "id": 35,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 26,
                        "mutability": "mutable",
                        "name": "from",
                        "nodeType": "VariableDeclaration",
                        "overrides": null,
                        "scope": 39,
                        "src": "1102:12:1",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 25,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "1102:7:1",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 28,
                        "mutability": "mutable",
                        "name": "sourceCurrencyKey",
                        "nodeType": "VariableDeclaration",
                        "overrides": null,
                        "scope": 39,
                        "src": "1124:25:1",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 27,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "1124:7:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 30,
                        "mutability": "mutable",
                        "name": "sourceAmount",
                        "nodeType": "VariableDeclaration",
                        "overrides": null,
                        "scope": 39,
                        "src": "1159:17:1",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 29,
                          "name": "uint",
                          "nodeType": "ElementaryTypeName",
                          "src": "1159:4:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 32,
                        "mutability": "mutable",
                        "name": "destinationCurrencyKey",
                        "nodeType": "VariableDeclaration",
                        "overrides": null,
                        "scope": 39,
                        "src": "1186:30:1",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 31,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "1186:7:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 34,
                        "mutability": "mutable",
                        "name": "destinationAddress",
                        "nodeType": "VariableDeclaration",
                        "overrides": null,
                        "scope": 39,
                        "src": "1226:26:1",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 33,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "1226:7:1",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      }
                    ],
                    "src": "1092:166:1"
                  },
                  "returnParameters": {
                    "id": 38,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 37,
                        "mutability": "mutable",
                        "name": "amountReceived",
                        "nodeType": "VariableDeclaration",
                        "overrides": null,
                        "scope": 39,
                        "src": "1277:19:1",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 36,
                          "name": "uint",
                          "nodeType": "ElementaryTypeName",
                          "src": "1277:4:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      }
                    ],
                    "src": "1276:21:1"
                  },
                  "scope": 40,
                  "src": "1075:223:1",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                }
              ],
              "scope": 41,
              "src": "748:552:1"
            }
          ],
          "src": "655:646:1"
        },
        "id": 1
      },
      "contracts/protocol/integration/exchange/SynthetixExchangeAdapter.sol": {
        "ast": {
          "absolutePath": "contracts/protocol/integration/exchange/SynthetixExchangeAdapter.sol",
          "exportedSymbols": {
            "SynthetixExchangeAdapter": [
              221
            ]
          },
          "id": 222,
          "license": "Apache License",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 42,
              "literals": [
                "solidity",
                "0.6",
                ".10"
              ],
              "nodeType": "PragmaDirective",
              "src": "655:23:2"
            },
            {
              "id": 43,
              "literals": [
                "experimental",
                "ABIEncoderV2"
              ],
              "nodeType": "PragmaDirective",
              "src": "679:35:2"
            },
            {
              "absolutePath": "contracts/interfaces/external/ISynth.sol",
              "file": "../../../interfaces/external/ISynth.sol",
              "id": 45,
              "nodeType": "ImportDirective",
              "scope": 222,
              "sourceUnit": 8,
              "src": "716:65:2",
              "symbolAliases": [
                {
                  "foreign": {
                    "argumentTypes": null,
                    "id": 44,
                    "name": "ISynth",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": null,
                    "src": "725:6:2",
                    "typeDescriptions": {
                      "typeIdentifier": null,
                      "typeString": null
                    }
                  },
                  "local": null
                }
              ],
              "unitAlias": ""
            },
            {
              "absolutePath": "contracts/interfaces/external/ISynthetixExchanger.sol",
              "file": "../../../interfaces/external/ISynthetixExchanger.sol",
              "id": 47,
              "nodeType": "ImportDirective",
              "scope": 222,
              "sourceUnit": 41,
              "src": "782:91:2",
              "symbolAliases": [
                {
                  "foreign": {
                    "argumentTypes": null,
                    "id": 46,
                    "name": "ISynthetixExchanger",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": null,
                    "src": "791:19:2",
                    "typeDescriptions": {
                      "typeIdentifier": null,
                      "typeString": null
                    }
                  },
                  "local": null
                }
              ],
              "unitAlias": ""
            },
            {
              "abstract": false,
              "baseContracts": [],
              "contractDependencies": [],
              "contractKind": "contract",
              "documentation": {
                "id": 48,
                "nodeType": "StructuredDocumentation",
                "src": "875:129:2",
                "text": " @title SynthetixTradeAdapter\n @author Set Protocol\n Exchange adapter for Synthetix that returns data for trades"
              },
              "fullyImplemented": true,
              "id": 221,
              "linearizedBaseContracts": [
                221
              ],
              "name": "SynthetixExchangeAdapter",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "canonicalName": "SynthetixExchangeAdapter.SynthetixTradeInfo",
                  "id": 53,
                  "members": [
                    {
                      "constant": false,
                      "id": 50,
                      "mutability": "mutable",
                      "name": "sourceCurrencyKey",
                      "nodeType": "VariableDeclaration",
                      "overrides": null,
                      "scope": 53,
                      "src": "1199:25:2",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "typeName": {
                        "id": 49,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "1199:7:2",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 52,
                      "mutability": "mutable",
                      "name": "destinationCurrencyKey",
                      "nodeType": "VariableDeclaration",
                      "overrides": null,
                      "scope": 53,
                      "src": "1278:30:2",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "typeName": {
                        "id": 51,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "1278:7:2",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "name": "SynthetixTradeInfo",
                  "nodeType": "StructDefinition",
                  "scope": 221,
                  "src": "1163:191:2",
                  "visibility": "public"
                },
                {
                  "constant": false,
                  "functionSelector": "ee405c65",
                  "id": 55,
                  "mutability": "immutable",
                  "name": "synthetixExchangerAddress",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 221,
                  "src": "1462:50:2",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 54,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1462:7:2",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "public"
                },
                {
                  "body": {
                    "id": 65,
                    "nodeType": "Block",
                    "src": "1759:71:2",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 63,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 61,
                            "name": "synthetixExchangerAddress",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 55,
                            "src": "1769:25:2",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "id": 62,
                            "name": "_synthetixExchangerAddress",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 58,
                            "src": "1797:26:2",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "src": "1769:54:2",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "id": 64,
                        "nodeType": "ExpressionStatement",
                        "src": "1769:54:2"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 56,
                    "nodeType": "StructuredDocumentation",
                    "src": "1568:131:2",
                    "text": " Set state variables\n @param _synthetixExchangerAddress    Address of Synthetix's Exchanger contract"
                  },
                  "id": 66,
                  "implemented": true,
                  "kind": "constructor",
                  "modifiers": [],
                  "name": "",
                  "nodeType": "FunctionDefinition",
                  "overrides": null,
                  "parameters": {
                    "id": 59,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 58,
                        "mutability": "mutable",
                        "name": "_synthetixExchangerAddress",
                        "nodeType": "VariableDeclaration",
                        "overrides": null,
                        "scope": 66,
                        "src": "1716:34:2",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 57,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "1716:7:2",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      }
                    ],
                    "src": "1715:36:2"
                  },
                  "returnParameters": {
                    "id": 60,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1759:0:2"
                  },
                  "scope": 221,
                  "src": "1704:126:2",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "public"
                },
                {
                  "body": {
                    "id": 133,
                    "nodeType": "Block",
                    "src": "2807:815:2",
                    "statements": [
                      {
                        "assignments": [
                          89
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 89,
                            "mutability": "mutable",
                            "name": "synthetixTradeInfo",
                            "nodeType": "VariableDeclaration",
                            "overrides": null,
                            "scope": 133,
                            "src": "2817:44:2",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_SynthetixTradeInfo_$53_memory_ptr",
                              "typeString": "struct SynthetixExchangeAdapter.SynthetixTradeInfo"
                            },
                            "typeName": {
                              "contractScope": null,
                              "id": 88,
                              "name": "SynthetixTradeInfo",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 53,
                              "src": "2817:18:2",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_SynthetixTradeInfo_$53_storage_ptr",
                                "typeString": "struct SynthetixExchangeAdapter.SynthetixTradeInfo"
                              }
                            },
                            "value": null,
                            "visibility": "internal"
                          }
                        ],
                        "id": 90,
                        "initialValue": null,
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2817:44:2"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              "id": 94,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "id": 92,
                                "name": "_sourceToken",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 69,
                                "src": "2893:12:2",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "!=",
                              "rightExpression": {
                                "argumentTypes": null,
                                "id": 93,
                                "name": "_destinationToken",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 71,
                                "src": "2909:17:2",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              "src": "2893:33:2",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "536f7572636520746f6b656e2063616e6e6f742062652073616d652061732064657374696e6174696f6e20746f6b656e",
                              "id": 95,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "string",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "2940:50:2",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_stringliteral_10d9c74242b28f56d74dd4deb26ea7f8ac2a5f7f91965f839e641a0cb906627b",
                                "typeString": "literal_string \"Source token cannot be same as destination token\""
                              },
                              "value": "Source token cannot be same as destination token"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_stringliteral_10d9c74242b28f56d74dd4deb26ea7f8ac2a5f7f91965f839e641a0cb906627b",
                                "typeString": "literal_string \"Source token cannot be same as destination token\""
                              }
                            ],
                            "id": 91,
                            "name": "require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              -18,
                              -18
                            ],
                            "referencedDeclaration": -18,
                            "src": "2872:7:2",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                              "typeString": "function (bool,string memory) pure"
                            }
                          },
                          "id": 96,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2872:128:2",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 97,
                        "nodeType": "ExpressionStatement",
                        "src": "2872:128:2"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 104,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 98,
                              "name": "synthetixTradeInfo",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 89,
                              "src": "3011:18:2",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_SynthetixTradeInfo_$53_memory_ptr",
                                "typeString": "struct SynthetixExchangeAdapter.SynthetixTradeInfo memory"
                              }
                            },
                            "id": 100,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "memberName": "sourceCurrencyKey",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 50,
                            "src": "3011:36:2",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "id": 102,
                                "name": "_sourceToken",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 69,
                                "src": "3066:12:2",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              ],
                              "id": 101,
                              "name": "_getCurrencyKey",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 220,
                              "src": "3050:15:2",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bytes32_$",
                                "typeString": "function (address) view returns (bytes32)"
                              }
                            },
                            "id": 103,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3050:29:2",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "3011:68:2",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 105,
                        "nodeType": "ExpressionStatement",
                        "src": "3011:68:2"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 112,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 106,
                              "name": "synthetixTradeInfo",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 89,
                              "src": "3089:18:2",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_SynthetixTradeInfo_$53_memory_ptr",
                                "typeString": "struct SynthetixExchangeAdapter.SynthetixTradeInfo memory"
                              }
                            },
                            "id": 108,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "memberName": "destinationCurrencyKey",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 52,
                            "src": "3089:41:2",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "id": 110,
                                "name": "_destinationToken",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 71,
                                "src": "3149:17:2",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              ],
                              "id": 109,
                              "name": "_getCurrencyKey",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 220,
                              "src": "3133:15:2",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bytes32_$",
                                "typeString": "function (address) view returns (bytes32)"
                              }
                            },
                            "id": 111,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3133:34:2",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "3089:78:2",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 113,
                        "nodeType": "ExpressionStatement",
                        "src": "3089:78:2"
                      },
                      {
                        "assignments": [
                          115
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 115,
                            "mutability": "mutable",
                            "name": "methodData",
                            "nodeType": "VariableDeclaration",
                            "overrides": null,
                            "scope": 133,
                            "src": "3231:23:2",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes"
                            },
                            "typeName": {
                              "id": 114,
                              "name": "bytes",
                              "nodeType": "ElementaryTypeName",
                              "src": "3231:5:2",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_storage_ptr",
                                "typeString": "bytes"
                              }
                            },
                            "value": null,
                            "visibility": "internal"
                          }
                        ],
                        "id": 127,
                        "initialValue": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "hexValue": "65786368616e676528616464726573732c627974657333322c75696e743235362c627974657333322c6164647265737329",
                              "id": 118,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "string",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "3294:51:2",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_stringliteral_0a1e187d66ece611a326f48fa6890f21aa768cc1ff1c33e0f6c08f8d25b928b9",
                                "typeString": "literal_string \"exchange(address,bytes32,uint256,bytes32,address)\""
                              },
                              "value": "exchange(address,bytes32,uint256,bytes32,address)"
                            },
                            {
                              "argumentTypes": null,
                              "id": 119,
                              "name": "_destinationAddress",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 73,
                              "src": "3359:19:2",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 120,
                                "name": "synthetixTradeInfo",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 89,
                                "src": "3392:18:2",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_SynthetixTradeInfo_$53_memory_ptr",
                                  "typeString": "struct SynthetixExchangeAdapter.SynthetixTradeInfo memory"
                                }
                              },
                              "id": 121,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sourceCurrencyKey",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 50,
                              "src": "3392:36:2",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 122,
                              "name": "_sourceQuantity",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 75,
                              "src": "3442:15:2",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 123,
                                "name": "synthetixTradeInfo",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 89,
                                "src": "3471:18:2",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_SynthetixTradeInfo_$53_memory_ptr",
                                  "typeString": "struct SynthetixExchangeAdapter.SynthetixTradeInfo memory"
                                }
                              },
                              "id": 124,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "destinationCurrencyKey",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 52,
                              "src": "3471:41:2",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 125,
                              "name": "_destinationAddress",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 73,
                              "src": "3526:19:2",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_stringliteral_0a1e187d66ece611a326f48fa6890f21aa768cc1ff1c33e0f6c08f8d25b928b9",
                                "typeString": "literal_string \"exchange(address,bytes32,uint256,bytes32,address)\""
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "id": 116,
                              "name": "abi",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": -1,
                              "src": "3257:3:2",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_abi",
                                "typeString": "abi"
                              }
                            },
                            "id": 117,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "encodeWithSignature",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "3257:23:2",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
                              "typeString": "function (string memory) pure returns (bytes memory)"
                            }
                          },
                          "id": 126,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3257:298:2",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "3231:324:2"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "components": [
                            {
                              "argumentTypes": null,
                              "id": 128,
                              "name": "synthetixExchangerAddress",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 55,
                              "src": "3574:25:2",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "30",
                              "id": 129,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "3601:1:2",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            },
                            {
                              "argumentTypes": null,
                              "id": 130,
                              "name": "methodData",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 115,
                              "src": "3604:10:2",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            }
                          ],
                          "id": 131,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "3573:42:2",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_address_$_t_rational_0_by_1_$_t_bytes_memory_ptr_$",
                            "typeString": "tuple(address,int_const 0,bytes memory)"
                          }
                        },
                        "functionReturnParameters": 87,
                        "id": 132,
                        "nodeType": "Return",
                        "src": "3566:49:2"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 67,
                    "nodeType": "StructuredDocumentation",
                    "src": "1899:570:2",
                    "text": " Calculate Synthetix trade encoded calldata. To be invoked on the SetToken.\n @param  _sourceToken              Address of source token to be sold\n @param  _destinationToken         Address of destination token to buy\n @param  _destinationAddress       Address to receive traded tokens\n @param  _sourceQuantity           Amount of source token to sell\n @return address                   Target address\n @return uint256                   Call value\n @return bytes                     Trade calldata"
                  },
                  "functionSelector": "e171fcab",
                  "id": 134,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getTradeCalldata",
                  "nodeType": "FunctionDefinition",
                  "overrides": null,
                  "parameters": {
                    "id": 80,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 69,
                        "mutability": "mutable",
                        "name": "_sourceToken",
                        "nodeType": "VariableDeclaration",
                        "overrides": null,
                        "scope": 134,
                        "src": "2509:20:2",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 68,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "2509:7:2",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 71,
                        "mutability": "mutable",
                        "name": "_destinationToken",
                        "nodeType": "VariableDeclaration",
                        "overrides": null,
                        "scope": 134,
                        "src": "2539:25:2",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 70,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "2539:7:2",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 73,
                        "mutability": "mutable",
                        "name": "_destinationAddress",
                        "nodeType": "VariableDeclaration",
                        "overrides": null,
                        "scope": 134,
                        "src": "2574:27:2",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 72,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "2574:7:2",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 75,
                        "mutability": "mutable",
                        "name": "_sourceQuantity",
                        "nodeType": "VariableDeclaration",
                        "overrides": null,
                        "scope": 134,
                        "src": "2611:23:2",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 74,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2611:7:2",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 77,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "overrides": null,
                        "scope": 134,
                        "src": "2644:7:2",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 76,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2644:7:2",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 79,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "overrides": null,
                        "scope": 134,
                        "src": "2691:14:2",
                        "stateVariable": false,
                        "storageLocation": "calldata",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_calldata_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 78,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "2691:5:2",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      }
                    ],
                    "src": "2499:224:2"
                  },
                  "returnParameters": {
                    "id": 87,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 82,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "overrides": null,
                        "scope": 134,
                        "src": "2771:7:2",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 81,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "2771:7:2",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 84,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "overrides": null,
                        "scope": 134,
                        "src": "2780:7:2",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 83,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2780:7:2",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 86,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "overrides": null,
                        "scope": 134,
                        "src": "2789:12:2",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 85,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "2789:5:2",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      }
                    ],
                    "src": "2770:32:2"
                  },
                  "scope": 221,
                  "src": "2474:1148:2",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "body": {
                    "id": 142,
                    "nodeType": "Block",
                    "src": "3860:49:2",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 140,
                          "name": "synthetixExchangerAddress",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 55,
                          "src": "3877:25:2",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "functionReturnParameters": 139,
                        "id": 141,
                        "nodeType": "Return",
                        "src": "3870:32:2"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 135,
                    "nodeType": "StructuredDocumentation",
                    "src": "3628:145:2",
                    "text": " Returns the Synthetix contract address.\n There is no need to approve to SNX as its a proxy\n @return address"
                  },
                  "functionSelector": "334fc289",
                  "id": 143,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getSpender",
                  "nodeType": "FunctionDefinition",
                  "overrides": null,
                  "parameters": {
                    "id": 136,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "3797:2:2"
                  },
                  "returnParameters": {
                    "id": 139,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 138,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "overrides": null,
                        "scope": 143,
                        "src": "3847:7:2",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 137,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "3847:7:2",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      }
                    ],
                    "src": "3846:9:2"
                  },
                  "scope": 221,
                  "src": "3778:131:2",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "body": {
                    "id": 188,
                    "nodeType": "Block",
                    "src": "4566:472:2",
                    "statements": [
                      {
                        "assignments": [
                          156
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 156,
                            "mutability": "mutable",
                            "name": "synthetixTradeInfo",
                            "nodeType": "VariableDeclaration",
                            "overrides": null,
                            "scope": 188,
                            "src": "4576:44:2",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_SynthetixTradeInfo_$53_memory_ptr",
                              "typeString": "struct SynthetixExchangeAdapter.SynthetixTradeInfo"
                            },
                            "typeName": {
                              "contractScope": null,
                              "id": 155,
                              "name": "SynthetixTradeInfo",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 53,
                              "src": "4576:18:2",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_SynthetixTradeInfo_$53_storage_ptr",
                                "typeString": "struct SynthetixExchangeAdapter.SynthetixTradeInfo"
                              }
                            },
                            "value": null,
                            "visibility": "internal"
                          }
                        ],
                        "id": 157,
                        "initialValue": null,
                        "nodeType": "VariableDeclarationStatement",
                        "src": "4576:44:2"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 164,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 158,
                              "name": "synthetixTradeInfo",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 156,
                              "src": "4631:18:2",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_SynthetixTradeInfo_$53_memory_ptr",
                                "typeString": "struct SynthetixExchangeAdapter.SynthetixTradeInfo memory"
                              }
                            },
                            "id": 160,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "memberName": "sourceCurrencyKey",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 50,
                            "src": "4631:36:2",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "id": 162,
                                "name": "_sourceToken",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 146,
                                "src": "4686:12:2",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              ],
                              "id": 161,
                              "name": "_getCurrencyKey",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 220,
                              "src": "4670:15:2",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bytes32_$",
                                "typeString": "function (address) view returns (bytes32)"
                              }
                            },
                            "id": 163,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "4670:29:2",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "4631:68:2",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 165,
                        "nodeType": "ExpressionStatement",
                        "src": "4631:68:2"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 172,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 166,
                              "name": "synthetixTradeInfo",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 156,
                              "src": "4709:18:2",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_SynthetixTradeInfo_$53_memory_ptr",
                                "typeString": "struct SynthetixExchangeAdapter.SynthetixTradeInfo memory"
                              }
                            },
                            "id": 168,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "memberName": "destinationCurrencyKey",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 52,
                            "src": "4709:41:2",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "id": 170,
                                "name": "_destinationToken",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 148,
                                "src": "4769:17:2",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              ],
                              "id": 169,
                              "name": "_getCurrencyKey",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 220,
                              "src": "4753:15:2",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bytes32_$",
                                "typeString": "function (address) view returns (bytes32)"
                              }
                            },
                            "id": 171,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "4753:34:2",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "4709:78:2",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 173,
                        "nodeType": "ExpressionStatement",
                        "src": "4709:78:2"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 186,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "components": [
                              {
                                "argumentTypes": null,
                                "id": 174,
                                "name": "amountReceived",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 153,
                                "src": "4799:14:2",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              null,
                              null
                            ],
                            "id": 175,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "TupleExpression",
                            "src": "4798:18:2",
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$_t_uint256_$__$__$",
                              "typeString": "tuple(uint256,,)"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "id": 180,
                                "name": "_sourceQuantity",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 150,
                                "src": "4901:15:2",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "argumentTypes": null,
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 181,
                                  "name": "synthetixTradeInfo",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 156,
                                  "src": "4930:18:2",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_SynthetixTradeInfo_$53_memory_ptr",
                                    "typeString": "struct SynthetixExchangeAdapter.SynthetixTradeInfo memory"
                                  }
                                },
                                "id": 182,
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "sourceCurrencyKey",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 50,
                                "src": "4930:36:2",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              {
                                "argumentTypes": null,
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 183,
                                  "name": "synthetixTradeInfo",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 156,
                                  "src": "4980:18:2",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_SynthetixTradeInfo_$53_memory_ptr",
                                    "typeString": "struct SynthetixExchangeAdapter.SynthetixTradeInfo memory"
                                  }
                                },
                                "id": 184,
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "destinationCurrencyKey",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 52,
                                "src": "4980:41:2",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                },
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              ],
                              "expression": {
                                "argumentTypes": null,
                                "arguments": [
                                  {
                                    "argumentTypes": null,
                                    "id": 177,
                                    "name": "synthetixExchangerAddress",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 55,
                                    "src": "4839:25:2",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  ],
                                  "id": 176,
                                  "name": "ISynthetixExchanger",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 40,
                                  "src": "4819:19:2",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_contract$_ISynthetixExchanger_$40_$",
                                    "typeString": "type(contract ISynthetixExchanger)"
                                  }
                                },
                                "id": 178,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "typeConversion",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "4819:46:2",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_ISynthetixExchanger_$40",
                                  "typeString": "contract ISynthetixExchanger"
                                }
                              },
                              "id": 179,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "getAmountsForExchange",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 24,
                              "src": "4819:68:2",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_external_view$_t_uint256_$_t_bytes32_$_t_bytes32_$returns$_t_uint256_$_t_uint256_$_t_uint256_$",
                                "typeString": "function (uint256,bytes32,bytes32) view external returns (uint256,uint256,uint256)"
                              }
                            },
                            "id": 185,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "4819:212:2",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$",
                              "typeString": "tuple(uint256,uint256,uint256)"
                            }
                          },
                          "src": "4798:233:2",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 187,
                        "nodeType": "ExpressionStatement",
                        "src": "4798:233:2"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 144,
                    "nodeType": "StructuredDocumentation",
                    "src": "3915:429:2",
                    "text": " Returns the amount of destination token received for exchanging a quantity of\n source token, less fees.\n @param  _sourceToken        Address of source token to be sold\n @param  _destinationToken   Address of destination token to buy\n @param  _sourceQuantity     Amount of source token to sell\n @return amountReceived      Amount of source token received for exchange"
                  },
                  "functionSelector": "25bcdf59",
                  "id": 189,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getAmountReceivedForExchange",
                  "nodeType": "FunctionDefinition",
                  "overrides": null,
                  "parameters": {
                    "id": 151,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 146,
                        "mutability": "mutable",
                        "name": "_sourceToken",
                        "nodeType": "VariableDeclaration",
                        "overrides": null,
                        "scope": 189,
                        "src": "4396:20:2",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 145,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "4396:7:2",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 148,
                        "mutability": "mutable",
                        "name": "_destinationToken",
                        "nodeType": "VariableDeclaration",
                        "overrides": null,
                        "scope": 189,
                        "src": "4426:25:2",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 147,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "4426:7:2",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 150,
                        "mutability": "mutable",
                        "name": "_sourceQuantity",
                        "nodeType": "VariableDeclaration",
                        "overrides": null,
                        "scope": 189,
                        "src": "4461:23:2",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 149,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4461:7:2",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      }
                    ],
                    "src": "4386:104:2"
                  },
                  "returnParameters": {
                    "id": 154,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 153,
                        "mutability": "mutable",
                        "name": "amountReceived",
                        "nodeType": "VariableDeclaration",
                        "overrides": null,
                        "scope": 189,
                        "src": "4538:22:2",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 152,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4538:7:2",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      }
                    ],
                    "src": "4537:24:2"
                  },
                  "scope": 221,
                  "src": "4349:689:2",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "body": {
                    "id": 219,
                    "nodeType": "Block",
                    "src": "5309:204:2",
                    "statements": [
                      {
                        "clauses": [
                          {
                            "block": {
                              "id": 207,
                              "nodeType": "Block",
                              "src": "5374:37:2",
                              "statements": [
                                {
                                  "expression": {
                                    "argumentTypes": null,
                                    "id": 205,
                                    "name": "key",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 203,
                                    "src": "5396:3:2",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  "functionReturnParameters": 196,
                                  "id": 206,
                                  "nodeType": "Return",
                                  "src": "5389:10:2"
                                }
                              ]
                            },
                            "errorName": "",
                            "id": 208,
                            "nodeType": "TryCatchClause",
                            "parameters": {
                              "id": 204,
                              "nodeType": "ParameterList",
                              "parameters": [
                                {
                                  "constant": false,
                                  "id": 203,
                                  "mutability": "mutable",
                                  "name": "key",
                                  "nodeType": "VariableDeclaration",
                                  "overrides": null,
                                  "scope": 208,
                                  "src": "5362:11:2",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  },
                                  "typeName": {
                                    "id": 202,
                                    "name": "bytes32",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "5362:7:2",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  "value": null,
                                  "visibility": "internal"
                                }
                              ],
                              "src": "5361:13:2"
                            },
                            "src": "5353:58:2"
                          },
                          {
                            "block": {
                              "id": 216,
                              "nodeType": "Block",
                              "src": "5444:63:2",
                              "statements": [
                                {
                                  "expression": {
                                    "argumentTypes": null,
                                    "arguments": [
                                      {
                                        "argumentTypes": null,
                                        "hexValue": "496e76616c69642053796e746820746f6b656e2061646472657373",
                                        "id": 213,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "string",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "5466:29:2",
                                        "subdenomination": null,
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_stringliteral_89767a49477b2cc16b131a2e6f833c865d5472baa05ec974a7bb0f48d9b9ebf5",
                                          "typeString": "literal_string \"Invalid Synth token address\""
                                        },
                                        "value": "Invalid Synth token address"
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_stringliteral_89767a49477b2cc16b131a2e6f833c865d5472baa05ec974a7bb0f48d9b9ebf5",
                                          "typeString": "literal_string \"Invalid Synth token address\""
                                        }
                                      ],
                                      "id": 212,
                                      "name": "revert",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [
                                        -19,
                                        -19
                                      ],
                                      "referencedDeclaration": -19,
                                      "src": "5459:6:2",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$",
                                        "typeString": "function (string memory) pure"
                                      }
                                    },
                                    "id": 214,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "5459:37:2",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_tuple$__$",
                                      "typeString": "tuple()"
                                    }
                                  },
                                  "id": 215,
                                  "nodeType": "ExpressionStatement",
                                  "src": "5459:37:2"
                                }
                              ]
                            },
                            "errorName": "",
                            "id": 217,
                            "nodeType": "TryCatchClause",
                            "parameters": {
                              "id": 211,
                              "nodeType": "ParameterList",
                              "parameters": [
                                {
                                  "constant": false,
                                  "id": 210,
                                  "mutability": "mutable",
                                  "name": "",
                                  "nodeType": "VariableDeclaration",
                                  "overrides": null,
                                  "scope": 217,
                                  "src": "5419:12:2",
                                  "stateVariable": false,
                                  "storageLocation": "memory",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes_memory_ptr",
                                    "typeString": "bytes"
                                  },
                                  "typeName": {
                                    "id": 209,
                                    "name": "bytes",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "5419:5:2",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes_storage_ptr",
                                      "typeString": "bytes"
                                    }
                                  },
                                  "value": null,
                                  "visibility": "internal"
                                }
                              ],
                              "src": "5418:25:2"
                            },
                            "src": "5412:95:2"
                          }
                        ],
                        "externalCall": {
                          "argumentTypes": null,
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 198,
                                  "name": "_token",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 192,
                                  "src": "5331:6:2",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                ],
                                "id": 197,
                                "name": "ISynth",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 7,
                                "src": "5324:6:2",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_ISynth_$7_$",
                                  "typeString": "type(contract ISynth)"
                                }
                              },
                              "id": 199,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "5324:14:2",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_ISynth_$7",
                                "typeString": "contract ISynth"
                              }
                            },
                            "id": 200,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "currencyKey",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 6,
                            "src": "5324:26:2",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$__$returns$_t_bytes32_$",
                              "typeString": "function () view external returns (bytes32)"
                            }
                          },
                          "id": 201,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5324:28:2",
                          "tryCall": true,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 218,
                        "nodeType": "TryStatement",
                        "src": "5320:187:2"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 190,
                    "nodeType": "StructuredDocumentation",
                    "src": "5100:131:2",
                    "text": " Gets the Synthetix currency key for _token\n @param _token  Address of token to get currency key for"
                  },
                  "id": 220,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_getCurrencyKey",
                  "nodeType": "FunctionDefinition",
                  "overrides": null,
                  "parameters": {
                    "id": 193,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 192,
                        "mutability": "mutable",
                        "name": "_token",
                        "nodeType": "VariableDeclaration",
                        "overrides": null,
                        "scope": 220,
                        "src": "5261:14:2",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 191,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "5261:7:2",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      }
                    ],
                    "src": "5260:16:2"
                  },
                  "returnParameters": {
                    "id": 196,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 195,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "overrides": null,
                        "scope": 220,
                        "src": "5300:7:2",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 194,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "5300:7:2",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      }
                    ],
                    "src": "5299:9:2"
                  },
                  "scope": 221,
                  "src": "5236:277:2",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                }
              ],
              "scope": 222,
              "src": "1005:4510:2"
            }
          ],
          "src": "655:4861:2"
        },
        "id": 2
      }
    }
  }
}
