-
Notifications
You must be signed in to change notification settings - Fork 404
add dynamic gasfee pricing as a signing client option - Feemarket/Osmosis #1911
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
base: main
Are you sure you want to change the base?
Conversation
|
|
||
| // Multiply by multiplier 18 fractional digits for Dec type | ||
| const fractionalDigits = minGasPrice.amount.fractionalDigits; | ||
| const adjustedGasPrice = multiplyDecimalByNumber( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is a cleaner way to do this please advise
|
|
||
| // Replace with your mnemonic or set MNEMONIC env var | ||
| // WARNING: Never commit real mnemonics to git! | ||
| const MNEMONIC = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
throwaway mnemonic for you to test with.
| @@ -0,0 +1,278 @@ | |||
| #!/usr/bin/env node | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a complete integration test to validate the PR, can be removed once merged
45ed0de to
713f6bb
Compare
| } | ||
| } | ||
|
|
||
| // Minimal protobuf type definitions matching cosmjs-types pattern |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or should this actually go into cosmjs/types? they refer to /feemarket module ofcourse and not base SDK
Summary
Adds automatic gas price discovery for chains with dynamic feemarket modules (Osmosis EIP-1559 and Skip feemarket). Instead of manually setting static gas prices, CosmJS can now query current prices from the chain, preventing transaction failures from outdated pricing.
Changes
Usage
Features
Graceful fallback to minGasPrice if feemarket query fails
Min/max constraint enforcement with configurable multiplier
backward compatible - existing code unchanged
Automatic chain detection for Osmosis variants
Inspired by Hermes relayer PR #4004.