starknet.js
starknet.js copied to clipboard
To have a method : provider.getGasprice()
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 )
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?
No, it's just an helper to extract the gasPrice info from RPC get_block
If this is still open, I would like to try it out @tabaktoni
@princeibs hi! any progress please?
Hi @ivpavici, I got caught up with some ODH task last week. But I'll jump right right back and complete this task ASAP
ok please try to do it as soon as possible, we have more and more users requesting this feature!
@ivpavici
:tada: This issue has been resolved in version 6.8.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
:tada: This issue has been resolved in version 7.0.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket: