[
    {
        "inputs": [
            { "internalType": "address", "name": "_lzEndpoint", "type": "address" },
            { "internalType": "uint16", "name": "_lzc", "type": "uint16" }
        ],
        "stateMutability": "nonpayable",
        "type": "constructor"
    },
    {
        "inputs": [{ "internalType": "address", "name": "target", "type": "address" }],
        "name": "AddressEmptyCode",
        "type": "error"
    },
    {
        "inputs": [{ "internalType": "address", "name": "account", "type": "address" }],
        "name": "AddressInsufficientBalance",
        "type": "error"
    },
    { "inputs": [], "name": "FailedInnerCall", "type": "error" },
    {
        "inputs": [{ "internalType": "address", "name": "token", "type": "address" }],
        "name": "SafeERC20FailedOperation",
        "type": "error"
    },
    {
        "anonymous": false,
        "inputs": [
            { "indexed": false, "internalType": "address", "name": "src_token", "type": "address" },
            { "indexed": false, "internalType": "address", "name": "dst_token", "type": "address" },
            { "indexed": false, "internalType": "uint256", "name": "dst_lzc", "type": "uint256" },
            { "indexed": false, "internalType": "uint256", "name": "src_ix", "type": "uint256" },
            { "indexed": false, "internalType": "uint256", "name": "dst_ix", "type": "uint256" },
            { "indexed": false, "internalType": "uint256", "name": "match_nonce", "type": "uint256" }
        ],
        "name": "MatchExecuted",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            { "indexed": false, "internalType": "address", "name": "src_token", "type": "address" },
            { "indexed": false, "internalType": "address", "name": "dst_token", "type": "address" },
            { "indexed": false, "internalType": "uint256", "name": "dst_lzc", "type": "uint256" },
            { "indexed": false, "internalType": "uint256", "name": "src_ix", "type": "uint256" },
            { "indexed": false, "internalType": "uint256", "name": "dst_ix", "type": "uint256" },
            { "indexed": false, "internalType": "uint256", "name": "match_nonce", "type": "uint256" },
            { "indexed": false, "internalType": "uint256", "name": "src_quantity", "type": "uint256" },
            { "indexed": false, "internalType": "uint256", "name": "dst_quantity", "type": "uint256" },
            { "indexed": true, "internalType": "address", "name": "guarantor", "type": "address" }
        ],
        "name": "MatchProposed",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            { "indexed": false, "internalType": "uint16", "name": "_srcChainId", "type": "uint16" },
            { "indexed": false, "internalType": "bytes", "name": "_srcAddress", "type": "bytes" },
            { "indexed": false, "internalType": "uint64", "name": "_nonce", "type": "uint64" },
            { "indexed": false, "internalType": "bytes", "name": "_payload", "type": "bytes" },
            { "indexed": false, "internalType": "bytes", "name": "_reason", "type": "bytes" }
        ],
        "name": "MessageFailed",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            { "indexed": false, "internalType": "address", "name": "src_token", "type": "address" },
            { "indexed": false, "internalType": "address", "name": "dst_token", "type": "address" },
            { "indexed": false, "internalType": "uint256", "name": "lz_cid", "type": "uint256" },
            { "indexed": false, "internalType": "uint256", "name": "order_index", "type": "uint256" },
            { "indexed": true, "internalType": "address", "name": "sender", "type": "address" },
            { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" },
            { "indexed": false, "internalType": "uint256", "name": "price", "type": "uint256" },
            { "indexed": false, "internalType": "uint256", "name": "fee", "type": "uint256" }
        ],
        "name": "OrderPlaced",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" },
            { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" }
        ],
        "name": "OwnershipTransferred",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            { "indexed": false, "internalType": "uint16", "name": "_srcChainId", "type": "uint16" },
            { "indexed": false, "internalType": "bytes", "name": "_srcAddress", "type": "bytes" },
            { "indexed": false, "internalType": "uint64", "name": "_nonce", "type": "uint64" },
            { "indexed": false, "internalType": "bytes32", "name": "_payloadHash", "type": "bytes32" }
        ],
        "name": "RetryMessageSuccess",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            { "indexed": false, "internalType": "uint16", "name": "_dstChainId", "type": "uint16" },
            { "indexed": false, "internalType": "uint16", "name": "_type", "type": "uint16" },
            { "indexed": false, "internalType": "uint256", "name": "_minDstGas", "type": "uint256" }
        ],
        "name": "SetMinDstGas",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [{ "indexed": false, "internalType": "address", "name": "precrime", "type": "address" }],
        "name": "SetPrecrime",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            { "indexed": false, "internalType": "uint16", "name": "_remoteChainId", "type": "uint16" },
            { "indexed": false, "internalType": "bytes", "name": "_path", "type": "bytes" }
        ],
        "name": "SetTrustedRemote",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            { "indexed": false, "internalType": "uint16", "name": "_remoteChainId", "type": "uint16" },
            { "indexed": false, "internalType": "bytes", "name": "_remoteAddress", "type": "bytes" }
        ],
        "name": "SetTrustedRemoteAddress",
        "type": "event"
    },
    {
        "inputs": [],
        "name": "BASIS_POINTS",
        "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "CHALLENGE_WINDOW",
        "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "DEFAULT_PAYLOAD_SIZE_LIMIT",
        "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "VERIFY_WINDOW",
        "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            { "internalType": "uint256", "name": "number", "type": "uint256" },
            { "internalType": "uint256", "name": "_fee", "type": "uint256" }
        ],
        "name": "addFee",
        "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
        "stateMutability": "pure",
        "type": "function"
    },
    {
        "inputs": [
            { "internalType": "uint256", "name": "", "type": "uint256" },
            { "internalType": "address", "name": "", "type": "address" },
            { "internalType": "address", "name": "", "type": "address" }
        ],
        "name": "book",
        "outputs": [
            { "internalType": "address", "name": "src", "type": "address" },
            { "internalType": "address", "name": "dst", "type": "address" },
            { "internalType": "uint16", "name": "lz_cid", "type": "uint16" }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            { "internalType": "address", "name": "sell_token", "type": "address" },
            { "internalType": "address", "name": "buy_token", "type": "address" },
            { "internalType": "uint256", "name": "lz_cid", "type": "uint256" },
            { "internalType": "uint256", "name": "index", "type": "uint256" },
            { "internalType": "address", "name": "guarantor", "type": "address" },
            { "internalType": "uint256", "name": "nonce", "type": "uint256" }
        ],
        "name": "challengeTrade",
        "outputs": [],
        "stateMutability": "payable",
        "type": "function"
    },
    {
        "inputs": [{ "internalType": "address", "name": "tkn", "type": "address" }],
        "name": "decimals",
        "outputs": [{ "internalType": "uint8", "name": "decimal", "type": "uint8" }],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            { "internalType": "address", "name": "sell_token", "type": "address" },
            { "internalType": "address", "name": "buy_token", "type": "address" },
            { "internalType": "uint256", "name": "lz_cid", "type": "uint256" },
            { "internalType": "uint256", "name": "index", "type": "uint256" },
            { "internalType": "address", "name": "guarantor", "type": "address" },
            { "internalType": "uint256", "name": "nonce", "type": "uint256" }
        ],
        "name": "executeMatch",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            { "internalType": "uint16", "name": "", "type": "uint16" },
            { "internalType": "bytes", "name": "", "type": "bytes" },
            { "internalType": "uint64", "name": "", "type": "uint64" }
        ],
        "name": "failedMessages",
        "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            { "internalType": "address", "name": "sell_token", "type": "address" },
            { "internalType": "address", "name": "buy_token", "type": "address" },
            { "internalType": "uint256", "name": "lz_cid", "type": "uint256" },
            { "internalType": "uint256", "name": "index", "type": "uint256" },
            { "internalType": "uint256", "name": "nonce", "type": "uint256" }
        ],
        "name": "finalizeMatch",
        "outputs": [],
        "stateMutability": "payable",
        "type": "function"
    },
    {
        "inputs": [
            { "internalType": "uint16", "name": "_srcChainId", "type": "uint16" },
            { "internalType": "bytes", "name": "_srcAddress", "type": "bytes" }
        ],
        "name": "forceResumeReceive",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            { "internalType": "uint16", "name": "_version", "type": "uint16" },
            { "internalType": "uint16", "name": "_chainId", "type": "uint16" },
            { "internalType": "address", "name": "", "type": "address" },
            { "internalType": "uint256", "name": "_configType", "type": "uint256" }
        ],
        "name": "getConfig",
        "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            { "internalType": "address", "name": "sell_token", "type": "address" },
            { "internalType": "address", "name": "buy_token", "type": "address" },
            { "internalType": "uint256", "name": "lz_cid", "type": "uint256" },
            { "internalType": "uint256", "name": "index", "type": "uint256" },
            { "internalType": "address", "name": "guarantor", "type": "address" },
            { "internalType": "uint256", "name": "nonce", "type": "uint256" }
        ],
        "name": "getMatch",
        "outputs": [
            {
                "components": [
                    { "internalType": "uint256", "name": "dst_id", "type": "uint256" },
                    { "internalType": "uint256", "name": "src_q", "type": "uint256" },
                    { "internalType": "uint256", "name": "dst_q", "type": "uint256" },
                    { "internalType": "address", "name": "payee", "type": "address" },
                    { "internalType": "address", "name": "guarantor", "type": "address" },
                    { "internalType": "bool", "name": "executed", "type": "bool" },
                    { "internalType": "uint256", "name": "block_number", "type": "uint256" },
                    { "internalType": "bool", "name": "locked", "type": "bool" }
                ],
                "internalType": "struct TradeInterface.Match",
                "name": "_match",
                "type": "tuple"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            { "internalType": "address", "name": "sell_token", "type": "address" },
            { "internalType": "address", "name": "buy_token", "type": "address" },
            { "internalType": "uint256", "name": "lz_cid", "type": "uint256" },
            { "internalType": "uint256", "name": "index", "type": "uint256" }
        ],
        "name": "getOrder",
        "outputs": [
            {
                "components": [
                    { "internalType": "address", "name": "sender", "type": "address" },
                    { "internalType": "uint256", "name": "amount", "type": "uint256" },
                    { "internalType": "uint256", "name": "price", "type": "uint256" },
                    { "internalType": "uint256", "name": "guarantor_fee", "type": "uint256" },
                    { "internalType": "uint256", "name": "settled", "type": "uint256" }
                ],
                "internalType": "struct TradeInterface.Order",
                "name": "_order",
                "type": "tuple"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            { "internalType": "address", "name": "sell_token", "type": "address" },
            { "internalType": "address", "name": "buy_token", "type": "address" },
            { "internalType": "uint256", "name": "lz_cid", "type": "uint256" }
        ],
        "name": "getOrders",
        "outputs": [
            {
                "components": [
                    { "internalType": "address", "name": "sender", "type": "address" },
                    { "internalType": "uint256", "name": "amount", "type": "uint256" },
                    { "internalType": "uint256", "name": "price", "type": "uint256" },
                    { "internalType": "uint256", "name": "guarantor_fee", "type": "uint256" },
                    { "internalType": "uint256", "name": "settled", "type": "uint256" }
                ],
                "internalType": "struct TradeInterface.Order[]",
                "name": "orders",
                "type": "tuple[]"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [{ "internalType": "uint16", "name": "_remoteChainId", "type": "uint16" }],
        "name": "getTrustedRemoteAddress",
        "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            { "internalType": "uint16", "name": "_srcChainId", "type": "uint16" },
            { "internalType": "bytes", "name": "_srcAddress", "type": "bytes" }
        ],
        "name": "isTrustedRemote",
        "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "lzEndpoint",
        "outputs": [{ "internalType": "contract ILayerZeroEndpoint", "name": "", "type": "address" }],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            { "internalType": "uint16", "name": "_srcChainId", "type": "uint16" },
            { "internalType": "bytes", "name": "_srcAddress", "type": "bytes" },
            { "internalType": "uint64", "name": "_nonce", "type": "uint64" },
            { "internalType": "bytes", "name": "_payload", "type": "bytes" }
        ],
        "name": "lzReceive",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "lzc",
        "outputs": [{ "internalType": "uint16", "name": "", "type": "uint16" }],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            { "internalType": "uint16", "name": "", "type": "uint16" },
            { "internalType": "uint16", "name": "", "type": "uint16" }
        ],
        "name": "minDstGasLookup",
        "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            { "internalType": "uint16", "name": "_srcChainId", "type": "uint16" },
            { "internalType": "bytes", "name": "_srcAddress", "type": "bytes" },
            { "internalType": "uint64", "name": "_nonce", "type": "uint64" },
            { "internalType": "bytes", "name": "_payload", "type": "bytes" }
        ],
        "name": "nonblockingLzReceive",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "owner",
        "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [{ "internalType": "uint16", "name": "", "type": "uint16" }],
        "name": "payloadSizeLimitLookup",
        "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            { "internalType": "address", "name": "sell_token", "type": "address" },
            { "internalType": "address", "name": "buy_token", "type": "address" },
            { "internalType": "uint256", "name": "lz_cid", "type": "uint256" },
            { "internalType": "uint256", "name": "amount", "type": "uint256" },
            { "internalType": "uint256", "name": "price", "type": "uint256" },
            { "internalType": "uint256", "name": "fee", "type": "uint256" }
        ],
        "name": "placeTrade",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "precrime",
        "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            { "internalType": "address", "name": "sell_token", "type": "address" },
            { "internalType": "address", "name": "buy_token", "type": "address" },
            { "internalType": "uint256", "name": "lz_cid", "type": "uint256" },
            { "internalType": "uint256", "name": "src_ix", "type": "uint256" },
            { "internalType": "uint256", "name": "dst_ix", "type": "uint256" },
            { "internalType": "uint256", "name": "src_match", "type": "uint256" },
            { "internalType": "address", "name": "receiver", "type": "address" }
        ],
        "name": "proposeMatch",
        "outputs": [{ "internalType": "uint256", "name": "match_nonce", "type": "uint256" }],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" },
    {
        "inputs": [
            { "internalType": "uint16", "name": "_srcChainId", "type": "uint16" },
            { "internalType": "bytes", "name": "_srcAddress", "type": "bytes" },
            { "internalType": "uint64", "name": "_nonce", "type": "uint64" },
            { "internalType": "bytes", "name": "_payload", "type": "bytes" }
        ],
        "name": "retryMessage",
        "outputs": [],
        "stateMutability": "payable",
        "type": "function"
    },
    {
        "inputs": [
            { "internalType": "uint16", "name": "_version", "type": "uint16" },
            { "internalType": "uint16", "name": "_chainId", "type": "uint16" },
            { "internalType": "uint256", "name": "_configType", "type": "uint256" },
            { "internalType": "bytes", "name": "_config", "type": "bytes" }
        ],
        "name": "setConfig",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            { "internalType": "uint16", "name": "_dstChainId", "type": "uint16" },
            { "internalType": "uint16", "name": "_packetType", "type": "uint16" },
            { "internalType": "uint256", "name": "_minGas", "type": "uint256" }
        ],
        "name": "setMinDstGas",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            { "internalType": "uint16", "name": "_dstChainId", "type": "uint16" },
            { "internalType": "uint256", "name": "_size", "type": "uint256" }
        ],
        "name": "setPayloadSizeLimit",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [{ "internalType": "address", "name": "_precrime", "type": "address" }],
        "name": "setPrecrime",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [{ "internalType": "uint16", "name": "_version", "type": "uint16" }],
        "name": "setReceiveVersion",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [{ "internalType": "uint16", "name": "_version", "type": "uint16" }],
        "name": "setSendVersion",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            { "internalType": "uint16", "name": "_remoteChainId", "type": "uint16" },
            { "internalType": "bytes", "name": "_path", "type": "bytes" }
        ],
        "name": "setTrustedRemote",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            { "internalType": "uint16", "name": "_remoteChainId", "type": "uint16" },
            { "internalType": "bytes", "name": "_remoteAddress", "type": "bytes" }
        ],
        "name": "setTrustedRemoteAddress",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            { "internalType": "address", "name": "_contraspoke", "type": "address" },
            { "internalType": "uint16", "name": "contra_cid", "type": "uint16" }
        ],
        "name": "setspoke",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [{ "internalType": "uint16", "name": "", "type": "uint16" }],
        "name": "spokes",
        "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            { "internalType": "uint256", "name": "number", "type": "uint256" },
            { "internalType": "uint256", "name": "_fee", "type": "uint256" }
        ],
        "name": "subFee",
        "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
        "stateMutability": "pure",
        "type": "function"
    },
    {
        "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }],
        "name": "transferOwnership",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [{ "internalType": "uint16", "name": "", "type": "uint16" }],
        "name": "trustedRemoteLookup",
        "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            { "internalType": "address", "name": "sell_token", "type": "address" },
            { "internalType": "address", "name": "buy_token", "type": "address" },
            { "internalType": "uint256", "name": "lz_cid", "type": "uint256" },
            { "internalType": "uint256", "name": "index", "type": "uint256" },
            { "internalType": "uint256", "name": "nonce", "type": "uint256" }
        ],
        "name": "unwindMatch",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    { "stateMutability": "payable", "type": "receive" }
]
