diff --git a/changelog.md b/changelog.md index 03a0c25f5f..83c51df477 100644 --- a/changelog.md +++ b/changelog.md @@ -34,7 +34,8 @@ - [#4199](https://github.com/ignite/cli/pull/4199) Set and seal SDK global config in `app/config.go` - [#4212](https://github.com/ignite/cli/pull/4212) Set default values for extension flag to dont crash ignite - [#4216](https://github.com/ignite/cli/pull/4216) Avoid create duplicated scopedKeppers -- [#4242](https://github.com/ignite/cli/pull/4242) Use buf build binary from the gobin path +- [#4242](https://github.com/ignite/cli/pull/4242) Use buf build binary from the gobin path +- [#4250](https://github.com/ignite/cli/pull/4250) Set gas adjustment before calculating ## [`v28.4.0`](https://github.com/ignite/cli/releases/tag/v28.4.0) diff --git a/ignite/pkg/cosmosclient/cosmosclient.go b/ignite/pkg/cosmosclient/cosmosclient.go index b66380c7c6..d0802e8e72 100644 --- a/ignite/pkg/cosmosclient/cosmosclient.go +++ b/ignite/pkg/cosmosclient/cosmosclient.go @@ -571,6 +571,10 @@ func (c Client) CreateTx(goCtx context.Context, account cosmosaccount.Account, m return TxService{}, err } + if c.gasAdjustment != 0 && c.gasAdjustment != defaultGasAdjustment { + txf = txf.WithGasAdjustment(c.gasAdjustment) + } + var gas uint64 if c.gas != "" && c.gas != GasAuto { gas, err = strconv.ParseUint(c.gas, 10, 64) @@ -593,10 +597,6 @@ func (c Client) CreateTx(goCtx context.Context, account cosmosaccount.Account, m txf = txf.WithGasPrices(c.gasPrices) } - if c.gasAdjustment != 0 && c.gasAdjustment != defaultGasAdjustment { - txf = txf.WithGasAdjustment(c.gasAdjustment) - } - txUnsigned, err := txf.BuildUnsignedTx(msgs...) if err != nil { return TxService{}, errors.WithStack(err)