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

To have a method : provider.getGasprice() #761

Closed
PhilippeR26 opened this issue Sep 16, 2023 · 9 comments · Fixed by #1056
Closed

To have a method : provider.getGasprice() #761

PhilippeR26 opened this issue Sep 16, 2023 · 9 comments · Fixed by #1056
Assignees
Labels
OnlyDust Open for OnlyDust contributors released on @next Type: feature New feature or request

Comments

@PhilippeR26
Copy link
Collaborator

PhilippeR26 commented Sep 16, 2023

Is your feature request related to a problem? Please describe.
Improvement :
Rpc specification v0.5.0 will add :

 "l1_gas_price": {
                        "title": "L1 gas price",
                        "descritpion": "The price of l1 gas in the block",
                        "$ref": "#/components/schemas/RESOURCE_PRICE"
                    },

It could be helpful to DAPP devs to have an easy access to this value.

Describe the solution you'd like
Something like this :

const GasPrice = provider.getGasPrice();

Describe alternatives you've considered
"alternative facts" ?

Additional context
To consider when PR for rpc 0.5.0 will be merged.
I can easily propose a PR on this subject.
Probably a subject that will have to be handled and to be customizable in starknet-devnet-rs.
Same thing can be applied for these new rpc 0.5.0 points : provider.getStarknetSpecVersion() and provider.getStarknetVersion()
These 3 methods could be specific of a RpcProvider v0.5.0 (see #760 )

@PhilippeR26 PhilippeR26 added the Type: feature New feature or request label Sep 16, 2023
@tabaktoni
Copy link
Collaborator

If I understand correctly you are proposing a new RPC endpoint here?
If so this should be an Issue on the RPC-Spec repo and we can close it here until the actual endpoint becomes part of the spec?

@PhilippeR26
Copy link
Collaborator Author

No, it's just an helper to extract the gasPrice info from RPC get_block

@ivpavici ivpavici added the OnlyDust Open for OnlyDust contributors label Feb 2, 2024
@0xibs
Copy link
Contributor

0xibs commented Mar 5, 2024

If this is still open, I would like to try it out @tabaktoni

@ivpavici
Copy link
Collaborator

@princeibs hi! any progress please?

@0xibs
Copy link
Contributor

0xibs commented Mar 28, 2024

Hi @ivpavici, I got caught up with some ODH task last week. But I'll jump right right back and complete this task ASAP

@ivpavici
Copy link
Collaborator

ok please try to do it as soon as possible, we have more and more users requesting this feature!

@0xibs
Copy link
Contributor

0xibs commented Apr 2, 2024

@ivpavici

Copy link

🎉 This issue has been resolved in version 6.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link

github-actions bot commented Jul 3, 2024

🎉 This issue has been resolved in version 7.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OnlyDust Open for OnlyDust contributors released on @next Type: feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants