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: add solana gas fees endpoint #1051

Merged
merged 16 commits into from
Oct 2, 2024
Merged

Conversation

NeOMakinG
Copy link
Contributor

@NeOMakinG NeOMakinG commented Sep 27, 2024

closes #1042

Description

Simply add the gas fee endpoint supporting the parameters message

as getFeeForMessage supports a Message param, it feels simpler to support the base64 of the message so we don't even have to build the full tx to estimate fees but only compose instructions and send them through this endpoint

We could also send the full base64 tx and decode the message part but why would we build the full TX to estimate gas fees while we can do it earlier? We can discuss about it if needed

We don't have a notion of slow, medium, fast gas fees, getFeeForMessage returns the best fees for the TX to be executed as fast as possible regarding the history of priority fees of the last TXs

Screenshots

Small test using a basic send TX:
image

feat: revert unwanted ignore

fix: remove solana web3js

fix: remove unwanted spaces

fix: lint

fix: moove dependence to solana coinstack
@NeOMakinG NeOMakinG requested a review from a team as a code owner September 27, 2024 14:50
@NeOMakinG NeOMakinG marked this pull request as draft September 27, 2024 14:50
Base automatically changed from solana-priority-fees to develop October 1, 2024 21:19
@NeOMakinG NeOMakinG marked this pull request as ready for review October 2, 2024 07:30
@kaladinlight
Copy link
Collaborator

Overall looks sounds, just updates to vernacular and suggestion to use VersionedMessage.

We can update in the future to add rawTx as a possible param to estimate (simulate) from the raw unsigned tx depending on the most ergonomic usage in web.

@kaladinlight kaladinlight merged commit ecf8ef0 into develop Oct 2, 2024
2 checks passed
@kaladinlight kaladinlight deleted the solana-gast-estimate branch October 2, 2024 21:23
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.

Solana - /api/v1/gas/estimate
2 participants