Skip to content

Fix Squid swap gas limit#1121

Merged
0xh3rman merged 2 commits into
mainfrom
cosmos-swap-gas-fallback
May 12, 2026
Merged

Fix Squid swap gas limit#1121
0xh3rman merged 2 commits into
mainfrom
cosmos-swap-gas-fallback

Conversation

@0xh3rman
Copy link
Copy Markdown
Collaborator

Prefer provider gas limit, if not set, we will use a default value

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request modifies the Cosmos chain signer to support a fallback mechanism for gas limits when the provider's value is missing or invalid. It also refactors the fee calculation into a scale_fee helper and adds a unit test for the fallback logic. Feedback was provided regarding a potential overflow in the gas limit calculation, recommending the use of u128 for intermediate operations to maintain consistency and safety.

Comment thread crates/gem_cosmos/src/signer/chain_signer.rs Outdated
@0xh3rman 0xh3rman merged commit c61db18 into main May 12, 2026
4 checks passed
@0xh3rman 0xh3rman deleted the cosmos-swap-gas-fallback branch May 12, 2026 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant