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

Introduce a set of assertion-coercion utilities for experimental Web3 JS types #1600

Closed
buffalojoec opened this issue Sep 15, 2023 · 2 comments · Fixed by #1619
Closed

Introduce a set of assertion-coercion utilities for experimental Web3 JS types #1600

buffalojoec opened this issue Sep 15, 2023 · 2 comments · Fixed by #1619
Assignees
Labels
enhancement New feature or request released

Comments

@buffalojoec
Copy link
Collaborator

Introduce a set of assertion-coercion utilities that turn this:

await rpc.requestAirdrop(address, 1_000_000n as LamportsUnsafeBeyond2Pow53Minus1).send()

…into this:

await rpc.requestAirdrop(address, lamports(1_000_000n)).send()

lamports() being essentially:

function lamports(putativeLamports: bigint): LamportsUnsafeBeyond2Pow53Minus1 {
  assertIsLamports(putativeLamports);
  return putativeLamports;
}

Aside from lamports(), cover other types such as address(): Base58EncodedAddress.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 4, 2023

🎉 This issue has been resolved in version 1.78.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link
Contributor

Because there has been no activity on this issue for 7 days since it was closed, it has been automatically locked. Please open a new issue if it requires a follow up.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant