{
    "schemaVersion": "2.0.0",
    "contractName": "Broker",
    "compilerOutput": {
        "abi": [
            {
                "inputs": [
                    { "internalType": "address", "name": "exchange", "type": "address" },
                    { "internalType": "address", "name": "weth", "type": "address" }
                ],
                "payable": false,
                "stateMutability": "nonpayable",
                "type": "constructor"
            },
            { "payable": true, "stateMutability": "payable", "type": "fallback" },
            {
                "constant": false,
                "inputs": [
                    { "internalType": "uint256[]", "name": "brokeredTokenIds", "type": "uint256[]" },
                    {
                        "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": "takerAssetFillAmounts", "type": "uint256[]" },
                    { "internalType": "bytes[]", "name": "signatures", "type": "bytes[]" },
                    { "internalType": "bytes4", "name": "batchFillFunctionSelector", "type": "bytes4" },
                    { "internalType": "uint256[]", "name": "ethFeeAmounts", "type": "uint256[]" },
                    { "internalType": "address payable[]", "name": "feeRecipients", "type": "address[]" }
                ],
                "name": "batchBrokerTrade",
                "outputs": [
                    {
                        "components": [
                            { "internalType": "uint256", "name": "makerAssetFilledAmount", "type": "uint256" },
                            { "internalType": "uint256", "name": "takerAssetFilledAmount", "type": "uint256" },
                            { "internalType": "uint256", "name": "makerFeePaid", "type": "uint256" },
                            { "internalType": "uint256", "name": "takerFeePaid", "type": "uint256" },
                            { "internalType": "uint256", "name": "protocolFeePaid", "type": "uint256" }
                        ],
                        "internalType": "struct LibFillResults.FillResults[]",
                        "name": "fillResults",
                        "type": "tuple[]"
                    }
                ],
                "payable": true,
                "stateMutability": "payable",
                "type": "function"
            },
            {
                "constant": false,
                "inputs": [
                    { "internalType": "uint256[]", "name": "brokeredTokenIds", "type": "uint256[]" },
                    {
                        "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": "order",
                        "type": "tuple"
                    },
                    { "internalType": "uint256", "name": "takerAssetFillAmount", "type": "uint256" },
                    { "internalType": "bytes", "name": "signature", "type": "bytes" },
                    { "internalType": "bytes4", "name": "fillFunctionSelector", "type": "bytes4" },
                    { "internalType": "uint256[]", "name": "ethFeeAmounts", "type": "uint256[]" },
                    { "internalType": "address payable[]", "name": "feeRecipients", "type": "address[]" }
                ],
                "name": "brokerTrade",
                "outputs": [
                    {
                        "components": [
                            { "internalType": "uint256", "name": "makerAssetFilledAmount", "type": "uint256" },
                            { "internalType": "uint256", "name": "takerAssetFilledAmount", "type": "uint256" },
                            { "internalType": "uint256", "name": "makerFeePaid", "type": "uint256" },
                            { "internalType": "uint256", "name": "takerFeePaid", "type": "uint256" },
                            { "internalType": "uint256", "name": "protocolFeePaid", "type": "uint256" }
                        ],
                        "internalType": "struct LibFillResults.FillResults",
                        "name": "fillResults",
                        "type": "tuple"
                    }
                ],
                "payable": true,
                "stateMutability": "payable",
                "type": "function"
            },
            {
                "constant": false,
                "inputs": [
                    { "internalType": "address", "name": "from", "type": "address" },
                    { "internalType": "address", "name": "to", "type": "address" },
                    { "internalType": "uint256[]", "name": "", "type": "uint256[]" },
                    { "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" },
                    { "internalType": "bytes", "name": "data", "type": "bytes" }
                ],
                "name": "safeBatchTransferFrom",
                "outputs": [],
                "payable": false,
                "stateMutability": "nonpayable",
                "type": "function"
            }
        ],
        "devdoc": {
            "methods": {
                "batchBrokerTrade(uint256[],(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],uint256[],bytes[],bytes4,uint256[],address[])": {
                    "details": "Fills multiple property-based orders by the given amounts using the given assets.      Pays protocol fees using either the ETH supplied by the taker to the transaction or      WETH acquired from the maker during settlement. The final WETH balance is sent to the taker.",
                    "params": {
                        "batchFillFunctionSelector": "The selector for either `batchFillOrders`,        `batchFillOrKillOrders`, or `batchFillOrdersNoThrow`.",
                        "brokeredTokenIds": "Token IDs specified by the taker to be used to fill the orders.",
                        "ethFeeAmounts": "Amounts of ETH, denominated in Wei, that are paid to corresponding feeRecipients.",
                        "feeRecipients": "Addresses that will receive ETH when orders are filled.",
                        "orders": "The property-based orders to fill. The format of a property-based order is the        same as that of a normal order, except the takerAssetData. Instaed of specifying a        specific ERC721 asset, the takerAssetData should be ERC1155 assetData where the        underlying tokenAddress is this contract's address and the desired properties are        encoded in the extra data field. Also note that takerFees must be denominated in        WETH (or zero).",
                        "signatures": "The makers' signatures for the given orders.",
                        "takerAssetFillAmounts": "The amounts to fill the orders by."
                    },
                    "return": "fillResults Amounts filled and fees paid by the makers and taker."
                },
                "brokerTrade(uint256[],(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes),uint256,bytes,bytes4,uint256[],address[])": {
                    "details": "Fills a single property-based order by the given amount using the given assets.      Pays protocol fees using either the ETH supplied by the taker to the transaction or      WETH acquired from the maker during settlement. The final WETH balance is sent to the taker.",
                    "params": {
                        "brokeredTokenIds": "Token IDs specified by the taker to be used to fill the orders.",
                        "ethFeeAmounts": "Amounts of ETH, denominated in Wei, that are paid to corresponding feeRecipients.",
                        "feeRecipients": "Addresses that will receive ETH when orders are filled.",
                        "fillFunctionSelector": "The selector for either `fillOrder` or `fillOrKillOrder`.",
                        "order": "The property-based order to fill. The format of a property-based order is the        same as that of a normal order, except the takerAssetData. Instaed of specifying a        specific ERC721 asset, the takerAssetData should be ERC1155 assetData where the        underlying tokenAddress is this contract's address and the desired properties are        encoded in the extra data field. Also note that takerFees must be denominated in        WETH (or zero).",
                        "signature": "The maker's signature of the given order.",
                        "takerAssetFillAmount": "The amount to fill the order by."
                    },
                    "return": "fillResults Amounts filled and fees paid by the maker and taker."
                },
                "constructor": { "params": { "exchange": "Address of the 0x ERC1155 Asset Proxy contract." } },
                "safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)": {
                    "details": "The Broker implements the ERC1155 transfer function to be compatible with the ERC1155 asset proxy",
                    "params": {
                        "amounts": "Should be an array of just one `uint256`, specifying the amount of the brokered assets to transfer.",
                        "data": "Encodes the validator contract address and any auxiliary data it needs for property validation.",
                        "from": "Since the Broker serves as the taker of the order, this should equal `address(this)`",
                        "to": "This should be the maker of the order."
                    }
                }
            }
        },
        "evm": {
            "bytecode": {
                "object": "[encoded data, 24886 characters]"
            },
            "deployedBytecode": {
                "object": "[encoded data, 21950 characters]"
            }
        }
    },
    "compiler": {
        "name": "solc",
        "version": "soljson-v0.5.17+commit.d19bba13.js",
        "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": {}
}
