Skip to content

executeQuote on testnets #207

@phdargen

Description

@phdargen

Summary

This is feedback from my experience integrating the Across SDK into CDP AgentKit, see coinbase/agentkit#566.

Overall good docs and the sdk.ts example script is very useful.
I encountered some edge-cases where the executeQuote method got stuck indefinitely as described below.
I think these issues should only appear for testnet transfers, but might still be useful to be aware of this.

Environment Details

  • Across Integrator SDK version: 0.2.0
  • Node.js version: 20.9.0
  • Package manager and version: npm 10.1.0

Integration Details

  • Functionality Affected:

    • Getting a quote
    • Executing a quote
    • Tracking bridge progress & step affected (approval, deposit, fill)
    • Lower-level utilities
    • Other (please specify):

Steps to Reproduce

  1. Native ETH transfer from sepolia -> base-sepolia
  • call executeQuote with no destinationClient or with viem default http()
    -> eth_getFilterChanges not supported, falls back to using getFillByDepositTx but this also fails because api does not support testnets (see error messages at the end below)
    -> does not throw error (even though throwOnError: true), process stuck indefinitely
  • call executeQuote with destinationClient using alchemy rpc -> works as expected
  1. Native ETH transfer from base-sepolia -> sepolia
  • call executeQuote with no destinationClient or with viem default http()
    -> deposit successfull, no errors/warnings but Tx never gets filled -> process stuck indefinitely
    -> seems this route never gets filled, probably shouldn't return a quote in this case
  • example TX: depositTxId 1001057, depositTxHash 0xff194d0d9474a1dbf320ba4aba2e871eb3e8036cbdb26a71dac391d7f3c25b1f

Is This a Regression?

  • Yes
  • No
  • Not Sure

Code Snippets (optional)

      const progress = await acrossClient.executeQuote({
        walletClient: walletClient,
        destinationClient: destinationClient,
        deposit: quote.deposit,
        onProgress: (progress) => {
          if (progress.step === "approve" && progress.status === "txSuccess") {
            const { txReceipt } = progress;
            approvalTxHash= txReceipt.transactionHash;
            console.log("approvalTxHash", approvalTxHash);
          }
          if (progress.step === "deposit" && progress.status === "txSuccess") {
            const { depositId, txReceipt } = progress;
            depositTxId = depositId;
            depositTxHash = txReceipt.transactionHash;
            console.log("depositTxId", depositTxId);
            console.log("depositTxHash", depositTxHash);
          }
          if (progress.step === "fill" && progress.status === "txSuccess") {
            const { fillTxTimestamp, txReceipt, actionSuccess } = progress;
            fillTxHash = txReceipt.transactionHash;
            success = actionSuccess;
            console.log("fillTxHash", fillTxHash);
          }
        },
        infiniteApproval: false,
        throwOnError: true,
      });

full code here: https://github.com/phdargen/cdp-agentkit/blob/c6fad61636970437519e05699a59094bf03c3d6c/typescript/agentkit/src/action-providers/across/acrossActionProvider.ts

Logs / Error Messages (optional)

Watch FilledRelay event error InvalidInputRpcError: Missing or invalid parameters.
Double check you have provided the correct parameters.

URL: https://sepolia.base.org
Request body: {"method":"eth_getFilterChanges","params":["0xeccf7664c732893c18707a9b4e44739d"]}

Details: filter not found
Version: viem@2.23.5
  details: 'filter not found',
  docsPath: undefined,
  metaMessages: [
    'URL: https://sepolia.base.org',
    'Request body: {"method":"eth_getFilterChanges","params":["0xeccf7664c732893c18707a9b4e44739d"]}'
  ],
  shortMessage: 'Missing or invalid parameters.\n' +
    'Double check you have provided the correct parameters.',
  version: '2.23.5',
  code: -32000,
  [cause]: RpcRequestError: RPC Request failed.
  
  URL: https://sepolia.base.org
  Request body: {"method":"eth_getFilterChanges","params":["0xeccf7664c732893c18707a9b4e44739d"]}
  
Event filtering currently disabled for this RPC provider, switching to getFillByDepositTx() {
  cause: InvalidInputRpcError: Missing or invalid parameters.
  Double check you have provided the correct parameters.
  
  URL: https://sepolia.base.org
  Request body: {"method":"eth_getFilterChanges","params":["0xeccf7664c732893c18707a9b4e44739d"]}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions