{
    "schemaVersion": "2.0.0",
    "contractName": "Forwarder",
    "compilerOutput": {
        "abi": [
            {
                "inputs": [
                    { "internalType": "address", "name": "_exchange", "type": "address" },
                    { "internalType": "address", "name": "_exchangeV2", "type": "address" },
                    { "internalType": "address", "name": "_weth", "type": "address" }
                ],
                "payable": false,
                "stateMutability": "nonpayable",
                "type": "constructor"
            },
            {
                "anonymous": false,
                "inputs": [
                    { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" },
                    { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" }
                ],
                "name": "OwnershipTransferred",
                "type": "event"
            },
            { "payable": true, "stateMutability": "payable", "type": "fallback" },
            {
                "constant": true,
                "inputs": [],
                "name": "ERC1155_BATCH_RECEIVED",
                "outputs": [{ "internalType": "bytes4", "name": "", "type": "bytes4" }],
                "payable": false,
                "stateMutability": "view",
                "type": "function"
            },
            {
                "constant": true,
                "inputs": [],
                "name": "ERC1155_RECEIVED",
                "outputs": [{ "internalType": "bytes4", "name": "", "type": "bytes4" }],
                "payable": false,
                "stateMutability": "view",
                "type": "function"
            },
            {
                "constant": true,
                "inputs": [],
                "name": "EXCHANGE_V2_ORDER_ID",
                "outputs": [{ "internalType": "bytes4", "name": "", "type": "bytes4" }],
                "payable": false,
                "stateMutability": "view",
                "type": "function"
            },
            {
                "constant": false,
                "inputs": [{ "internalType": "bytes", "name": "assetData", "type": "bytes" }],
                "name": "approveMakerAssetProxy",
                "outputs": [],
                "payable": false,
                "stateMutability": "nonpayable",
                "type": "function"
            },
            {
                "constant": false,
                "inputs": [
                    {
                        "components": [
                            { "internalType": "address", "name": "makerAddress", "type": "address" },
                            { "internalType": "address", "name": "takerAddress", "type": "address" },
                            { "internalType": "address", "name": "feeRecipientAddress", "type": "address" },
                            { "internalType": "address", "name": "senderAddress", "type": "address" },
                            { "internalType": "uint256", "name": "makerAssetAmount", "type": "uint256" },
                            { "internalType": "uint256", "name": "takerAssetAmount", "type": "uint256" },
                            { "internalType": "uint256", "name": "makerFee", "type": "uint256" },
                            { "internalType": "uint256", "name": "takerFee", "type": "uint256" },
                            { "internalType": "uint256", "name": "expirationTimeSeconds", "type": "uint256" },
                            { "internalType": "uint256", "name": "salt", "type": "uint256" },
                            { "internalType": "bytes", "name": "makerAssetData", "type": "bytes" },
                            { "internalType": "bytes", "name": "takerAssetData", "type": "bytes" },
                            { "internalType": "bytes", "name": "makerFeeAssetData", "type": "bytes" },
                            { "internalType": "bytes", "name": "takerFeeAssetData", "type": "bytes" }
                        ],
                        "internalType": "struct LibOrder.Order[]",
                        "name": "orders",
                        "type": "tuple[]"
                    },
                    { "internalType": "uint256", "name": "makerAssetBuyAmount", "type": "uint256" },
                    { "internalType": "bytes[]", "name": "signatures", "type": "bytes[]" },
                    { "internalType": "uint256[]", "name": "ethFeeAmounts", "type": "uint256[]" },
                    { "internalType": "address payable[]", "name": "feeRecipients", "type": "address[]" }
                ],
                "name": "marketBuyOrdersWithEth",
                "outputs": [
                    { "internalType": "uint256", "name": "wethSpentAmount", "type": "uint256" },
                    { "internalType": "uint256", "name": "makerAssetAcquiredAmount", "type": "uint256" }
                ],
                "payable": true,
                "stateMutability": "payable",
                "type": "function"
            },
            {
                "constant": false,
                "inputs": [
                    {
                        "components": [
                            { "internalType": "address", "name": "makerAddress", "type": "address" },
                            { "internalType": "address", "name": "takerAddress", "type": "address" },
                            { "internalType": "address", "name": "feeRecipientAddress", "type": "address" },
                            { "internalType": "address", "name": "senderAddress", "type": "address" },
                            { "internalType": "uint256", "name": "makerAssetAmount", "type": "uint256" },
                            { "internalType": "uint256", "name": "takerAssetAmount", "type": "uint256" },
                            { "internalType": "uint256", "name": "makerFee", "type": "uint256" },
                            { "internalType": "uint256", "name": "takerFee", "type": "uint256" },
                            { "internalType": "uint256", "name": "expirationTimeSeconds", "type": "uint256" },
                            { "internalType": "uint256", "name": "salt", "type": "uint256" },
                            { "internalType": "bytes", "name": "makerAssetData", "type": "bytes" },
                            { "internalType": "bytes", "name": "takerAssetData", "type": "bytes" },
                            { "internalType": "bytes", "name": "makerFeeAssetData", "type": "bytes" },
                            { "internalType": "bytes", "name": "takerFeeAssetData", "type": "bytes" }
                        ],
                        "internalType": "struct LibOrder.Order[]",
                        "name": "orders",
                        "type": "tuple[]"
                    },
                    { "internalType": "uint256", "name": "ethSellAmount", "type": "uint256" },
                    { "internalType": "bytes[]", "name": "signatures", "type": "bytes[]" },
                    { "internalType": "uint256[]", "name": "ethFeeAmounts", "type": "uint256[]" },
                    { "internalType": "address payable[]", "name": "feeRecipients", "type": "address[]" }
                ],
                "name": "marketSellAmountWithEth",
                "outputs": [
                    { "internalType": "uint256", "name": "wethSpentAmount", "type": "uint256" },
                    { "internalType": "uint256", "name": "makerAssetAcquiredAmount", "type": "uint256" }
                ],
                "payable": true,
                "stateMutability": "payable",
                "type": "function"
            },
            {
                "constant": false,
                "inputs": [
                    {
                        "components": [
                            { "internalType": "address", "name": "makerAddress", "type": "address" },
                            { "internalType": "address", "name": "takerAddress", "type": "address" },
                            { "internalType": "address", "name": "feeRecipientAddress", "type": "address" },
                            { "internalType": "address", "name": "senderAddress", "type": "address" },
                            { "internalType": "uint256", "name": "makerAssetAmount", "type": "uint256" },
                            { "internalType": "uint256", "name": "takerAssetAmount", "type": "uint256" },
                            { "internalType": "uint256", "name": "makerFee", "type": "uint256" },
                            { "internalType": "uint256", "name": "takerFee", "type": "uint256" },
                            { "internalType": "uint256", "name": "expirationTimeSeconds", "type": "uint256" },
                            { "internalType": "uint256", "name": "salt", "type": "uint256" },
                            { "internalType": "bytes", "name": "makerAssetData", "type": "bytes" },
                            { "internalType": "bytes", "name": "takerAssetData", "type": "bytes" },
                            { "internalType": "bytes", "name": "makerFeeAssetData", "type": "bytes" },
                            { "internalType": "bytes", "name": "takerFeeAssetData", "type": "bytes" }
                        ],
                        "internalType": "struct LibOrder.Order[]",
                        "name": "orders",
                        "type": "tuple[]"
                    },
                    { "internalType": "bytes[]", "name": "signatures", "type": "bytes[]" },
                    { "internalType": "uint256[]", "name": "ethFeeAmounts", "type": "uint256[]" },
                    { "internalType": "address payable[]", "name": "feeRecipients", "type": "address[]" }
                ],
                "name": "marketSellOrdersWithEth",
                "outputs": [
                    { "internalType": "uint256", "name": "wethSpentAmount", "type": "uint256" },
                    { "internalType": "uint256", "name": "makerAssetAcquiredAmount", "type": "uint256" }
                ],
                "payable": true,
                "stateMutability": "payable",
                "type": "function"
            },
            {
                "constant": false,
                "inputs": [
                    { "internalType": "address", "name": "operator", "type": "address" },
                    { "internalType": "address", "name": "from", "type": "address" },
                    { "internalType": "uint256[]", "name": "ids", "type": "uint256[]" },
                    { "internalType": "uint256[]", "name": "values", "type": "uint256[]" },
                    { "internalType": "bytes", "name": "data", "type": "bytes" }
                ],
                "name": "onERC1155BatchReceived",
                "outputs": [{ "internalType": "bytes4", "name": "", "type": "bytes4" }],
                "payable": false,
                "stateMutability": "nonpayable",
                "type": "function"
            },
            {
                "constant": false,
                "inputs": [
                    { "internalType": "address", "name": "operator", "type": "address" },
                    { "internalType": "address", "name": "from", "type": "address" },
                    { "internalType": "uint256", "name": "id", "type": "uint256" },
                    { "internalType": "uint256", "name": "value", "type": "uint256" },
                    { "internalType": "bytes", "name": "data", "type": "bytes" }
                ],
                "name": "onERC1155Received",
                "outputs": [{ "internalType": "bytes4", "name": "", "type": "bytes4" }],
                "payable": false,
                "stateMutability": "nonpayable",
                "type": "function"
            },
            {
                "constant": true,
                "inputs": [],
                "name": "owner",
                "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
                "payable": false,
                "stateMutability": "view",
                "type": "function"
            },
            {
                "constant": false,
                "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }],
                "name": "transferOwnership",
                "outputs": [],
                "payable": false,
                "stateMutability": "nonpayable",
                "type": "function"
            },
            {
                "constant": false,
                "inputs": [
                    { "internalType": "bytes", "name": "assetData", "type": "bytes" },
                    { "internalType": "uint256", "name": "amount", "type": "uint256" }
                ],
                "name": "withdrawAsset",
                "outputs": [],
                "payable": false,
                "stateMutability": "nonpayable",
                "type": "function"
            }
        ],
        "devdoc": {
            "methods": {
                "approveMakerAssetProxy(bytes)": {
                    "details": "Approves the respective proxy for a given asset to transfer tokens on the Forwarder contract's behalf.      This is necessary because an order fee denominated in the maker asset (i.e. a percentage fee) is sent by the      Forwarder contract to the fee recipient.      This method needs to be called before forwarding orders of a maker asset that hasn't      previously been approved.",
                    "params": { "assetData": "Byte array encoded for the respective asset proxy." }
                },
                "marketBuyOrdersWithEth((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],uint256,bytes[],uint256[],address[])": {
                    "details": "Attempt to buy makerAssetBuyAmount of makerAsset by selling ETH provided with transaction.      The Forwarder may *fill* more than makerAssetBuyAmount of the makerAsset so that it can      pay takerFees where takerFeeAssetData == makerAssetData (i.e. percentage fees).      Any ETH not spent will be refunded to sender.",
                    "params": {
                        "ethFeeAmounts": "Amounts of ETH, denominated in Wei, that are paid to corresponding feeRecipients.",
                        "feeRecipients": "Addresses that will receive ETH when orders are filled.",
                        "makerAssetBuyAmount": "Desired amount of makerAsset to purchase.",
                        "orders": "Array of order specifications used containing desired makerAsset and WETH as takerAsset.",
                        "signatures": "Proofs that orders have been created by makers."
                    },
                    "return": "wethSpentAmount Amount of WETH spent on the given set of orders.makerAssetAcquiredAmount Amount of maker asset acquired from the given set of orders."
                },
                "marketSellAmountWithEth((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],uint256,bytes[],uint256[],address[])": {
                    "details": "Purchases as much of orders' makerAssets as possible by selling the specified amount of ETH      accounting for order and forwarder fees. This functions throws if ethSellAmount was not reached.",
                    "params": {
                        "ethFeeAmounts": "Amounts of ETH, denominated in Wei, that are paid to corresponding feeRecipients.",
                        "ethSellAmount": "Desired amount of ETH to sell.",
                        "feeRecipients": "Addresses that will receive ETH when orders are filled.",
                        "orders": "Array of order specifications used containing desired makerAsset and WETH as takerAsset.",
                        "signatures": "Proofs that orders have been created by makers."
                    },
                    "return": "wethSpentAmount Amount of WETH spent on the given set of orders.makerAssetAcquiredAmount Amount of maker asset acquired from the given set of orders."
                },
                "marketSellOrdersWithEth((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],bytes[],uint256[],address[])": {
                    "details": "Purchases as much of orders' makerAssets as possible by selling as much of the ETH value sent      as possible, accounting for order and forwarder fees.",
                    "params": {
                        "ethFeeAmounts": "Amounts of ETH, denominated in Wei, that are paid to corresponding feeRecipients.",
                        "feeRecipients": "Addresses that will receive ETH when orders are filled.",
                        "orders": "Array of order specifications used containing desired makerAsset and WETH as takerAsset.",
                        "signatures": "Proofs that orders have been created by makers."
                    },
                    "return": "wethSpentAmount Amount of WETH spent on the given set of orders.makerAssetAcquiredAmount Amount of maker asset acquired from the given set of orders."
                },
                "onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)": {
                    "details": "The smart contract calls this function on the recipient after a `safeTransferFrom`. This function MAY throw to revert and reject the transfer. Return of other than the magic value MUST result in the transaction being reverted Note: the contract address is always the message sender",
                    "params": {
                        "data": "Additional data with no specified format",
                        "from": "The address which previously owned the token",
                        "ids": "An array containing ids of each token being transferred",
                        "operator": "The address which called `safeTransferFrom` function",
                        "values": "An array containing amounts of each token being transferred"
                    },
                    "return": "`bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))`"
                },
                "onERC1155Received(address,address,uint256,uint256,bytes)": {
                    "details": "The smart contract calls this function on the recipient after a `safeTransferFrom`. This function MAY throw to revert and reject the transfer. Return of other than the magic value MUST result in the transaction being reverted Note: the contract address is always the message sender",
                    "params": {
                        "data": "Additional data with no specified format",
                        "from": "The address which previously owned the token",
                        "id": "An array containing the ids of the token being transferred",
                        "operator": "The address which called `safeTransferFrom` function",
                        "value": "An array containing the amount of tokens being transferred"
                    },
                    "return": "`bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))`"
                },
                "transferOwnership(address)": {
                    "details": "Change the owner of this contract.",
                    "params": { "newOwner": "New owner address." }
                },
                "withdrawAsset(bytes,uint256)": {
                    "details": "Withdraws assets from this contract. It may be used by the owner to withdraw assets      that were accidentally sent to this contract.",
                    "params": {
                        "amount": "Amount of the asset to withdraw.",
                        "assetData": "Byte array encoded for the respective asset proxy."
                    }
                }
            }
        },
        "evm": {
            "bytecode": {
                "object": "[encoded data, 32346 characters]"
            },
            "deployedBytecode": {
                "object": "[encoded data, 29622 characters]"
            }
        }
    },
    "compiler": {
        "name": "solc",
        "version": "0.5.17+commit.d19bba13",
        "settings": {
            "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": {}
}
