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

Add commitment to RPC request #41

Open
GitBolt opened this issue Jan 7, 2024 · 0 comments
Open

Add commitment to RPC request #41

GitBolt opened this issue Jan 7, 2024 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@GitBolt
Copy link
Collaborator

GitBolt commented Jan 7, 2024

Right now, most of the Client class method accept commitment parameter, however it isn't actually being used when the request is being sent.

This part is where the commitment needs to be added: https://github.com/SuperteamDAO/solathon/blob/master/solathon/core/http.py

Solana JSON RPC commitment reference: https://docs.solana.com/api/http#example

The logic is simple. If the user enters parameters array, with an object, having "commitment" key, then we have to add it to our request.
The commitment is validated using this helper function: https://github.com/SuperteamDAO/solathon/blob/master/solathon/utils.py#L27

Also, some important RPC methods like send_transaction don't have commitment parameter accepted yet either, so that needs to be added too.

@GitBolt GitBolt added enhancement New feature or request help wanted Extra attention is needed labels Jan 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant