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: Support waiting for faucet transactions #38

Merged
merged 6 commits into from
Oct 30, 2024

Conversation

alex-stone
Copy link
Contributor

What changed? Why?

This adds support for waiting for faucet transactions on the SDK side instead of on the server-side.

This pattern mirrors the wait paradigm for other inherently async processes (e.g. transfers, contract invocations, traces, etc...), and also extends to more networks where block time may or may not be slower.

Qualified Impact

@alex-stone alex-stone force-pushed the stone/async-faucet-tx branch from 0c44549 to 686b790 Compare October 30, 2024 16:24
Copy link
Contributor

@John-peterson-coinbase John-peterson-coinbase left a comment

Choose a reason for hiding this comment

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

LGTM! 2 small nits

"""Get the faucet transaction status.

Returns:
str: The facuet transaction status.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
str: The facuet transaction status.
str: The faucet transaction status.

@@ -104,6 +104,11 @@ def transaction_hash(self) -> str:
"""Get the transaction hash."""
return self._model.transaction_hash

@property
def network_id(self) -> str:
"""Get the Network ID of the Transfer."""
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"""Get the Network ID of the Transfer."""
"""Get the Network ID of the Transaction."""

@alex-stone alex-stone merged commit afc594a into v0.10.0 Oct 30, 2024
5 checks passed
@alex-stone alex-stone mentioned this pull request Oct 31, 2024
alex-stone added a commit that referenced this pull request Oct 31, 2024
* feat: Support waiting for faucet transactions (#38)

* chore: Bump OpenAPI client

* chore: Add network_id to Transaction resource

* chore: Update faucet transaction payload

This updates the faucet transaction payload to reflect what our
API now returns.

* feat: Support fetching faucet transaction status

* chore: Add status and network to faucet transaction string

* chore: Fix typos

* chore: Prepare v0.10.0 release
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