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

feat: Use async faucet transactions and support wait/reload #309

Merged
merged 5 commits into from
Oct 30, 2024

Conversation

alex-stone
Copy link
Contributor

@alex-stone alex-stone commented Oct 30, 2024

What changed? Why?

This makes it so that our faucet transactions will be created on the server-side without waiting for confirmation and then will be able to be waited-on / polled from the SDK.

This allows us to have more stable faucet implementations (since there are fewer persistent connections across multiple services / clients) and will return a resource that can be more useful on the SDK side of things.

How was this tested?

ts-node

> import { Coinbase, Wallet } from "./src/index";
> Coinbase.configureFromJson({ filePath: "..." });

> const wallet = await Wallet.create();

> const faucetTx = await wallet.faucet();

> await faucetTx.wait();

Qualified Impact

This makes it so that when you call wallet.faucet() or address.faucet() it returns a faucet transaction that is not necessarily confirmed yet.

This makes it so that we use the transaction payload in the faucet
transaction resource as the source of truth.
This makes it so that our faucet transactions will be created on
the server-side without waiting for confirmation and then will be
able to be waited-on / polled from the SDK.

This allows us to have more stable faucet implementations (since there
are fewer persistent connections across multiple services / clients)

and will return a resource that can be more useful on the SDK side
of things.
@alex-stone alex-stone merged commit daecac3 into v0.10.0 Oct 30, 2024
9 checks passed
@alex-stone alex-stone deleted the stone/async-faucet-tx branch October 30, 2024 23:46
alex-stone added a commit that referenced this pull request Oct 31, 2024
feat: Use async faucet transactions and support wait/reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants