Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support prepareForSend Transaction Flow #486

Open
3 tasks
danielbate opened this issue Feb 20, 2025 · 1 comment
Open
3 tasks

Support prepareForSend Transaction Flow #486

danielbate opened this issue Feb 20, 2025 · 1 comment

Comments

@danielbate
Copy link
Member

Within the TS SDK, we are introducing an inverted transaction flow. Currently, the dApp hands off a transaction request to the connector, the connector submits it and passes back the transaction ID. If the dApp remains responsible for submission, we reduce the number of round trips from submission to summary by 2 requests.

Image

The following SDK PR:

Introduces the following properties to the FuelConnector interface:

  • usePrepareForSend - a boolean flag to signal to Account.sendTransaction that of the submission flow
  • prepareForSend - the implementation to prepare a transaction for submission via the connector (eg. for EVM/SVM this would be the addition of the predicate account)

Note

This is not a breaking change, the original flow is still supported but we should gradually move to this approach due to it's performance benefits.

As proof of concept, I implemented prepareForSend in the EVM/SVM/burner wallet connectors:

For the completion of this issue:

  • Finalise the EVM/SVM/Burner PR
  • Introduce this flow to the native Fuel Wallet (this will need changes in the Fuel Wallet)
  • Notify external teams of the connector changes (Bako, Arcana etc)
@Uyoxy
Copy link

Uyoxy commented Feb 20, 2025

I'd be happy to do this."Hi, I'm a TypeScript and Web3 developer with experience in NestJS and blockchain integrations. I understand the inverted transaction flow and its benefits, and I’d love to contribute. My approach includes implementing prepareForSend in the Fuel Wallet and optimizing submission efficiency.. Looking forward to collaborating!"

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

No branches or pull requests

2 participants