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: added getMinimumBalanceForRentExemption with no network call #10

Merged
merged 2 commits into from
Jan 23, 2025

Conversation

nickfrosty
Copy link
Collaborator

Problem

obtaining the minimum value for rent exception is most commonly obtained from the getMinimumBalanceForRentExemption rpc method, which results in a network call and therefore slower

Summary of Changes

add a sync getMinimumBalanceForRentExemption function to perform the math required to calculate the min rent exempt value

Note: there is a trade off here we are making in that IF/WHEN the min rent value is changed or made dynamic, this calculation would become invalid. This should be acceptable for the foreseeable future since this type of change would require a SIMD and have a long rollout time, allowing ample time to adjust this function

Copy link

changeset-bot bot commented Jan 23, 2025

🦋 Changeset detected

Latest commit: 3c46c8a

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

This PR includes changesets to release 2 packages
Name Type
gill Minor
gill-react Major

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

@nickfrosty nickfrosty merged commit 0c03cb8 into master Jan 23, 2025
3 checks passed
@nickfrosty nickfrosty deleted the getMinimumBalanceForRentExemption branch January 23, 2025 19:41
@github-actions github-actions bot mentioned this pull request Jan 23, 2025
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.

1 participant