Open hugjobk opened 11 months ago
hmm, this makes the API pretty complex. The whole idea of setting the gas price is that you don't need to set it per tx. Otherwise you can also just calculate the fee on demand.
Could you elaborate on the use case for this? Would a setGasPrice
setter on the client do the job as well?
Currently, gas price is defined within the client options and cannot be dynamically adjusted based on market fluctuations. This limitation can be addressed by:
gasPrice
argument to the function: This allows specifying the gas price directly during function call, offering real-time adaptability.gasPrice
argument is omitted, the existing gasPrice
from the client options will be used seamlessly, ensuring backwards compatibility.setGasPrice
setter, setting the gas price within the function call avoids potential concurrency issues.This feature is intended for scenarios where you want to set gas=auto
and have the gasPrice
automatically adjust in real-time based on current market conditions.
Suggest changes:
Give users more control over gas prices! Instead of locking them in the
SigningStargateClientOptions
, let them adjust it on the fly withsignAndBroadcast
andsignAndBroadcastSync
. No more client recreations just to tweak that gas!