Skip to content

Commit

Permalink
Problem: estimate less gas when miss max gas on txf when simualte run…
Browse files Browse the repository at this point in the history
…Tx (#1303)

* Problem: estimate less gas when miss max gas on txf when simualte runTx

* Update CHANGELOG.md
  • Loading branch information
mmsqe committed Oct 11, 2023
1 parent 259b127 commit a3cb991
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* [\#1221](https://github.com/cosmos/relayer/pull/1221) Update cometbft to v0.37.2 and ibc-go to v7.2.0.
* [\#1226](https://github.com/cosmos/relayer/pull/1226) Avoid invalid Bech32 prefix error in parallel tests when sdk Config get overwritten by each other in single process.
* [\#1231](https://github.com/cosmos/relayer/pull/1231) Reduce get bech32 prefix when get signer.
* [\#1303](https://github.com/cosmos/relayer/pull/1303) Add missing max gas amount on txf to avoid estimate less gas when simualte runTx.

## v0.9.3

Expand Down
3 changes: 3 additions & 0 deletions relayer/chains/cosmos/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -1668,6 +1668,9 @@ func (cc *CosmosProvider) PrepareFactory(txf tx.Factory, signingKey string) (tx.
txf = txf.WithGas(cc.PCfg.MinGasAmount)
}

if cc.PCfg.MaxGasAmount != 0 {
txf = txf.WithGas(cc.PCfg.MaxGasAmount)
}
txf, err = cc.SetWithExtensionOptions(txf)
if err != nil {
return tx.Factory{}, err
Expand Down

0 comments on commit a3cb991

Please sign in to comment.