feat(cosmos): dynamic gas price and gas limit #1894
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
IBC and standard withdrawals for Cosmos now allow users to specify the gas price and gas limit for each transaction. You can do this by including the following information in the RPC payloads:
e.g. payload in the integration test:
https://github.com/KomodoPlatform/atomicDEX-API/blob/af74b50b2714cf77c576e4a85c858e4b2a36191b/mm2src/mm2_main/tests/mm2_tests/tendermint_tests.rs#L162-L171
Determining the gas price to be used:
1- From the RPC payload.
2- From the coins configuration.
3- A default value of
0.25
, which is currently hardcoded in the source code.Higher prior always overrides the others.
Resolves #1847
cc @yurii-khi @tonymorony