{
    "schemaVersion": "2.0.0",
    "contractName": "ICurve",
    "compilerOutput": {
        "abi": [
            {
                "constant": false,
                "inputs": [
                    {
                        "internalType": "int128",
                        "name": "i",
                        "type": "int128"
                    },
                    {
                        "internalType": "int128",
                        "name": "j",
                        "type": "int128"
                    },
                    {
                        "internalType": "uint256",
                        "name": "sellAmount",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "minBuyAmount",
                        "type": "uint256"
                    }
                ],
                "name": "exchange_underlying",
                "outputs": [],
                "payable": false,
                "stateMutability": "nonpayable",
                "type": "function"
            },
            {
                "constant": false,
                "inputs": [
                    {
                        "internalType": "int128",
                        "name": "i",
                        "type": "int128"
                    },
                    {
                        "internalType": "int128",
                        "name": "j",
                        "type": "int128"
                    },
                    {
                        "internalType": "uint256",
                        "name": "buyAmount",
                        "type": "uint256"
                    }
                ],
                "name": "get_dx_underlying",
                "outputs": [
                    {
                        "internalType": "uint256",
                        "name": "dx",
                        "type": "uint256"
                    }
                ],
                "payable": false,
                "stateMutability": "nonpayable",
                "type": "function"
            },
            {
                "constant": false,
                "inputs": [
                    {
                        "internalType": "int128",
                        "name": "i",
                        "type": "int128"
                    },
                    {
                        "internalType": "int128",
                        "name": "j",
                        "type": "int128"
                    },
                    {
                        "internalType": "uint256",
                        "name": "sellAmount",
                        "type": "uint256"
                    }
                ],
                "name": "get_dy_underlying",
                "outputs": [
                    {
                        "internalType": "uint256",
                        "name": "dy",
                        "type": "uint256"
                    }
                ],
                "payable": false,
                "stateMutability": "nonpayable",
                "type": "function"
            },
            {
                "constant": false,
                "inputs": [
                    {
                        "internalType": "int128",
                        "name": "i",
                        "type": "int128"
                    }
                ],
                "name": "underlying_coins",
                "outputs": [
                    {
                        "internalType": "address",
                        "name": "tokenAddress",
                        "type": "address"
                    }
                ],
                "payable": false,
                "stateMutability": "nonpayable",
                "type": "function"
            }
        ],
        "devdoc": {
            "methods": {
                "exchange_underlying(int128,int128,uint256,uint256)": {
                    "details": "Sell `sellAmount` of `fromToken` token and receive `toToken` token.      This function exists on later versions of Curve (USDC/DAI/USDT)",
                    "params": {
                        "i": "The token index being sold.",
                        "j": "The token index being bought.",
                        "minBuyAmount": "The minimum buy amount of the token being bought.",
                        "sellAmount": "The amount of token being bought."
                    }
                },
                "get_dx_underlying(int128,int128,uint256)": {
                    "details": "Get the amount of `fromToken` by buying `buyAmount` of `toToken`",
                    "params": {
                        "buyAmount": "The amount of token being bought.",
                        "i": "The token index being sold.",
                        "j": "The token index being bought."
                    }
                },
                "get_dy_underlying(int128,int128,uint256)": {
                    "details": "Get the amount of `toToken` by selling `sellAmount` of `fromToken`",
                    "params": {
                        "i": "The token index being sold.",
                        "j": "The token index being bought.",
                        "sellAmount": "The amount of token being bought."
                    }
                },
                "underlying_coins(int128)": {
                    "details": "Get the underlying token address from the token index",
                    "params": {
                        "i": "The token index."
                    }
                }
            }
        },
        "evm": {
            "bytecode": {
                "linkReferences": {},
                "object": "0x",
                "opcodes": "",
                "sourceMap": ""
            },
            "deployedBytecode": {
                "linkReferences": {},
                "object": "0x",
                "opcodes": "",
                "sourceMap": ""
            }
        }
    },
    "sourceTreeHashHex": "0xf1c8fa4ff466467fafb62ff1e446ba831b1d884d7d1305d70f44a909534655c5",
    "sources": {
        "./ICurve.sol": {
            "id": 36,
            "content": "/*\n\n  Copyright 2019 ZeroEx Intl.\n\n  Licensed under the Apache License, Version 2.0 (the \"License\");\n  you may not use this file except in compliance with the License.\n  You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing, software\n  distributed under the License is distributed on an \"AS IS\" BASIS,\n  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  See the License for the specific language governing permissions and\n  limitations under the License.\n\n*/\n\npragma solidity ^0.5.9;\n\n\n// solhint-disable func-name-mixedcase\ninterface ICurve {\n\n    /// @dev Sell `sellAmount` of `fromToken` token and receive `toToken` token.\n    ///      This function exists on later versions of Curve (USDC/DAI/USDT)\n    /// @param i The token index being sold.\n    /// @param j The token index being bought.\n    /// @param sellAmount The amount of token being bought.\n    /// @param minBuyAmount The minimum buy amount of the token being bought.\n    function exchange_underlying(\n        int128 i,\n        int128 j,\n        uint256 sellAmount,\n        uint256 minBuyAmount\n    )\n        external;\n\n    /// @dev Get the amount of `toToken` by selling `sellAmount` of `fromToken`\n    /// @param i The token index being sold.\n    /// @param j The token index being bought.\n    /// @param sellAmount The amount of token being bought.\n    function get_dy_underlying(\n        int128 i,\n        int128 j,\n        uint256 sellAmount\n    )\n        external\n        returns (uint256 dy);\n\n    /// @dev Get the amount of `fromToken` by buying `buyAmount` of `toToken`\n    /// @param i The token index being sold.\n    /// @param j The token index being bought.\n    /// @param buyAmount The amount of token being bought.\n    function get_dx_underlying(\n        int128 i,\n        int128 j,\n        uint256 buyAmount\n    )\n        external\n        returns (uint256 dx);\n\n    /// @dev Get the underlying token address from the token index\n    /// @param i The token index.\n    function underlying_coins(\n        int128 i\n    )\n        external\n        returns (address tokenAddress);\n}\n"
        }
    },
    "sourceCodes": {
        "./ICurve.sol": "/*\n\n  Copyright 2019 ZeroEx Intl.\n\n  Licensed under the Apache License, Version 2.0 (the \"License\");\n  you may not use this file except in compliance with the License.\n  You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing, software\n  distributed under the License is distributed on an \"AS IS\" BASIS,\n  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  See the License for the specific language governing permissions and\n  limitations under the License.\n\n*/\n\npragma solidity ^0.5.9;\n\n\n// solhint-disable func-name-mixedcase\ninterface ICurve {\n\n    /// @dev Sell `sellAmount` of `fromToken` token and receive `toToken` token.\n    ///      This function exists on later versions of Curve (USDC/DAI/USDT)\n    /// @param i The token index being sold.\n    /// @param j The token index being bought.\n    /// @param sellAmount The amount of token being bought.\n    /// @param minBuyAmount The minimum buy amount of the token being bought.\n    function exchange_underlying(\n        int128 i,\n        int128 j,\n        uint256 sellAmount,\n        uint256 minBuyAmount\n    )\n        external;\n\n    /// @dev Get the amount of `toToken` by selling `sellAmount` of `fromToken`\n    /// @param i The token index being sold.\n    /// @param j The token index being bought.\n    /// @param sellAmount The amount of token being bought.\n    function get_dy_underlying(\n        int128 i,\n        int128 j,\n        uint256 sellAmount\n    )\n        external\n        returns (uint256 dy);\n\n    /// @dev Get the amount of `fromToken` by buying `buyAmount` of `toToken`\n    /// @param i The token index being sold.\n    /// @param j The token index being bought.\n    /// @param buyAmount The amount of token being bought.\n    function get_dx_underlying(\n        int128 i,\n        int128 j,\n        uint256 buyAmount\n    )\n        external\n        returns (uint256 dx);\n\n    /// @dev Get the underlying token address from the token index\n    /// @param i The token index.\n    function underlying_coins(\n        int128 i\n    )\n        external\n        returns (address tokenAddress);\n}\n"
    },
    "compiler": {
        "name": "solc",
        "version": "0.5.17+commit.d19bba13",
        "settings": {
            "remappings": [
                "@0x/contracts-utils=/home/runner/work/protocol/protocol/contracts/asset-proxy/node_modules/@0x/contracts-utils",
                "@0x/contracts-erc1155=/home/runner/work/protocol/protocol/contracts/asset-proxy/node_modules/@0x/contracts-erc1155",
                "@0x/contracts-erc20=/home/runner/work/protocol/protocol/contracts/asset-proxy/node_modules/@0x/contracts-erc20",
                "@0x/contracts-exchange-libs=/home/runner/work/protocol/protocol/contracts/asset-proxy/node_modules/@0x/contracts-exchange-libs"
            ],
            "optimizer": {
                "enabled": true,
                "runs": 1000000,
                "details": {
                    "yul": true,
                    "deduplicate": true,
                    "cse": true,
                    "constantOptimizer": true
                }
            },
            "outputSelection": {
                "*": {
                    "*": [
                        "abi",
                        "devdoc",
                        "evm.bytecode.object",
                        "evm.bytecode.sourceMap",
                        "evm.deployedBytecode.object",
                        "evm.deployedBytecode.sourceMap"
                    ]
                }
            },
            "evmVersion": "istanbul"
        }
    },
    "chains": {}
}
