-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug: Added not set to ibc ante handler (#684)
- Loading branch information
Showing
2 changed files
with
29 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package app | ||
|
||
import ( | ||
"github.com/cosmos/cosmos-sdk/client" | ||
sdktypes "github.com/cosmos/cosmos-sdk/types" | ||
"github.com/cosmos/cosmos-sdk/x/auth/ante" | ||
ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante" | ||
) | ||
|
||
// setAnteHandler Reference github.com/cosmos/cosmos-sdk/x/auth/ante/ante.go | ||
func (app *App) setAnteHandler(txConfig client.TxConfig) { | ||
app.SetAnteHandler( | ||
sdktypes.ChainAnteDecorators( | ||
ante.NewSetUpContextDecorator(), // outermost AnteDecorator. SetUpContext must be called first | ||
ante.NewExtensionOptionsDecorator(nil), | ||
ante.NewValidateBasicDecorator(), | ||
ante.NewTxTimeoutHeightDecorator(), | ||
ante.NewValidateMemoDecorator(app.AccountKeeper), | ||
ante.NewConsumeGasForTxSizeDecorator(app.AccountKeeper), | ||
ante.NewDeductFeeDecorator(app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, nil), | ||
ante.NewSetPubKeyDecorator(app.AccountKeeper), // SetPubKeyDecorator must be called before all signature verification decorators | ||
ante.NewValidateSigCountDecorator(app.AccountKeeper), | ||
ante.NewSigGasConsumeDecorator(app.AccountKeeper, ante.DefaultSigVerificationGasConsumer), | ||
ante.NewSigVerificationDecorator(app.AccountKeeper, txConfig.SignModeHandler()), | ||
ante.NewIncrementSequenceDecorator(app.AccountKeeper), | ||
ibcante.NewRedundantRelayDecorator(app.IBCKeeper), | ||
), | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters