Skip to content

Conversation

@ashwinrava
Copy link
Member

Summary

From our documentation, the executeQuote client function should return a deposit id and deposit/fill transaction receipts.

  /**
   * Execute a quote by:
   * 1. Approving the SpokePool contract if necessary
   * 2. Depositing the input token on the origin chain
   * 3. Waiting for the deposit to be filled on the destination chain
   *
   * See {@link executeQuote} for more details.
   *
   * @example
   * ```ts
   * const quote = await client.getQuote({ route, inputAmount });
   * const { depositId } = await client.executeQuote({ deposit: quote.deposit });
   * ```
   *
   * @param params - See {@link ExecuteQuoteParams}.
   * @returns The deposit ID and receipts for the deposit and fill transactions.
   */

https://github.com/across-protocol/toolkit/blob/master/packages/sdk/src/client.ts#L267-L283

I understand that users of the client can track progress using the onProgress callback. But I think they should also be able to just call the function and get a response.

Changes

  • Added new type ExecuteQuoteResponseParams.
  • Used ExecuteQuoteResponseParams as the return type in the executeQuote action and client function.
  • Returned result in the client function.
  • Added a test to ensure that the result gets returned and is usable by the caller.

@changeset-bot
Copy link

changeset-bot bot commented Jun 11, 2025

🦋 Changeset detected

Latest commit: eb6c389

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@across-protocol/app-sdk Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Jun 11, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
toolkit-example ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 11, 2025 3:54pm

@ashwinrava ashwinrava force-pushed the fix/return-execute-quote-result branch from 9469dce to 897ba8b Compare June 11, 2025 03:06
@ashwinrava ashwinrava marked this pull request as ready for review June 11, 2025 13:28
gsteenkamp89
gsteenkamp89 previously approved these changes Jun 11, 2025
Copy link
Collaborator

@gsteenkamp89 gsteenkamp89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent, good catch!

dohaki
dohaki previously approved these changes Jun 11, 2025
Copy link
Collaborator

@dohaki dohaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@ashwinrava ashwinrava merged commit 050a2e4 into master Jun 11, 2025
3 checks passed
@ashwinrava ashwinrava deleted the fix/return-execute-quote-result branch June 11, 2025 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants