Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions app/consumer/ante/disabled_modules_ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,17 @@ func NewDisabledModulesDecorator(disabledModules ...string) DisabledModulesDecor

func (dmd DisabledModulesDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) {
currHeight := ctx.BlockHeight()
errorMsg := fmt.Errorf("tx contains message types from unsupported modules at height %d", currHeight)

for _, msg := range tx.GetMsgs() {
if hasDisabledModuleMsgs(msg, dmd.prefixes...) {
return ctx, fmt.Errorf("tx contains message types from unsupported modules at height %d", currHeight)
return ctx, errorMsg
}

// Check if there is an attempt to bypass disabled module msg
// with authz MsgExec
if nestedAuthzMsgExecCheck(msg, dmd.prefixes...) {
return ctx, fmt.Errorf("tx contains message types from unsupported modules at height %d", currHeight)
return ctx, errorMsg
}
}

Expand Down