[
  {
    "type": "constructor",
    "inputs": [
      {
        "name": "_pool",
        "type": "address",
        "internalType": "contract ShieldedPool"
      },
      {
        "name": "_router",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "_weth",
        "type": "address",
        "internalType": "address"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "type": "receive",
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "pool",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "contract ShieldedPool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "router",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "trade",
    "inputs": [
      {
        "name": "p",
        "type": "tuple",
        "internalType": "struct CowlTradeAdapter.TradeParams",
        "components": [
          {
            "name": "spend",
            "type": "tuple",
            "internalType": "struct ShieldedPool.Spend",
            "components": [
              {
                "name": "membershipRoot",
                "type": "bytes32",
                "internalType": "bytes32"
              },
              {
                "name": "nullifiers",
                "type": "bytes32[2]",
                "internalType": "bytes32[2]"
              },
              {
                "name": "commitments",
                "type": "bytes32[2]",
                "internalType": "bytes32[2]"
              },
              {
                "name": "newRoot",
                "type": "bytes32",
                "internalType": "bytes32"
              },
              {
                "name": "token",
                "type": "uint256",
                "internalType": "uint256"
              },
              {
                "name": "value",
                "type": "uint256",
                "internalType": "uint256"
              },
              {
                "name": "fee",
                "type": "uint256",
                "internalType": "uint256"
              },
              {
                "name": "recipient",
                "type": "address",
                "internalType": "address"
              },
              {
                "name": "relayer",
                "type": "address",
                "internalType": "address"
              }
            ]
          },
          {
            "name": "spendCiphertexts",
            "type": "bytes[2]",
            "internalType": "bytes[2]"
          },
          {
            "name": "spendProof",
            "type": "bytes",
            "internalType": "bytes"
          },
          {
            "name": "tokenOut",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "amountOut",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "poolFee",
            "type": "uint24",
            "internalType": "uint24"
          },
          {
            "name": "shieldCommitment",
            "type": "bytes32",
            "internalType": "bytes32"
          },
          {
            "name": "shieldNewRoot",
            "type": "bytes32",
            "internalType": "bytes32"
          },
          {
            "name": "shieldCiphertext",
            "type": "bytes",
            "internalType": "bytes"
          },
          {
            "name": "shieldProof",
            "type": "bytes",
            "internalType": "bytes"
          }
        ]
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "weth",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "event",
    "name": "Traded",
    "inputs": [
      {
        "name": "tokenIn",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "tokenOut",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "amountIn",
        "type": "uint256",
        "indexed": false,
        "internalType": "uint256"
      },
      {
        "name": "amountOut",
        "type": "uint256",
        "indexed": false,
        "internalType": "uint256"
      }
    ],
    "anonymous": false
  },
  {
    "type": "error",
    "name": "NotMyPayout",
    "inputs": []
  },
  {
    "type": "error",
    "name": "NothingToTrade",
    "inputs": []
  },
  {
    "type": "error",
    "name": "SameAsset",
    "inputs": []
  }
]
