Skip to content

Commit

Permalink
fix: add gas adjustment parameter to paloma txs
Browse files Browse the repository at this point in the history
Make sure pigeon txs to paloma have enough gas.
  • Loading branch information
maharifu committed Sep 30, 2024
1 parent 0a8c518 commit a7c72fe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions util/ion/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import (
"google.golang.org/grpc/status"
)

const txGasAdjustment = 1.2

func (cc *Client) TxFactory() tx.Factory {
return tx.Factory{}.
WithAccountRetriever(cc).
Expand Down Expand Up @@ -68,6 +70,8 @@ func (cc *Client) SendMsgs(ctx context.Context, msgs []sdk.Msg, memo string, opt
return nil, err
}

txf = txf.WithGasAdjustment(txGasAdjustment)

// TODO: Make this work with new CalculateGas method
// TODO: This is related to GRPC client stuff?
// https://github.com/cosmos/cosmos-sdk/blob/5725659684fc93790a63981c653feee33ecf3225/client/tx/tx.go#L297
Expand Down

0 comments on commit a7c72fe

Please sign in to comment.