Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/dependencies #3

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
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
17 changes: 9 additions & 8 deletions app/ante/ante.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package ante

import (
storetypes "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/x/auth/ante"
ibcante "github.com/cosmos/ibc-go/v3/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v3/modules/core/keeper"
ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper"

wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
wasmTypes "github.com/CosmWasm/wasmd/x/wasm/types"
Expand All @@ -17,7 +18,7 @@
ante.HandlerOptions

IBCkeeper *ibckeeper.Keeper
TxCounterStoreKey sdk.StoreKey
TxCounterStoreKey storetypes.StoreKey
WasmConfig wasmTypes.WasmConfig
}

Expand All @@ -25,19 +26,19 @@
// numbers, checks signatures & account numbers, and deducts fees from the first
// signer.
func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
if options.AccountKeeper == nil {

Check failure on line 29 in app/ante/ante.go

View workflow job for this annotation

GitHub Actions / golangci-lint

options.AccountKeeper undefined (type HandlerOptions has no field or method AccountKeeper) (typecheck)
return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "account keeper is required for ante builder")
}

if options.BankKeeper == nil {

Check failure on line 33 in app/ante/ante.go

View workflow job for this annotation

GitHub Actions / golangci-lint

options.BankKeeper undefined (type HandlerOptions has no field or method BankKeeper) (typecheck)
return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "bank keeper is required for ante builder")
}

if options.SignModeHandler == nil {

Check failure on line 37 in app/ante/ante.go

View workflow job for this annotation

GitHub Actions / golangci-lint

options.SignModeHandler undefined (type HandlerOptions has no field or method SignModeHandler) (typecheck)
return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "sign mode handler is required for ante builder")
}

sigGasConsumer := options.SigGasConsumer

Check failure on line 41 in app/ante/ante.go

View workflow job for this annotation

GitHub Actions / golangci-lint

options.SigGasConsumer undefined (type HandlerOptions has no field or method SigGasConsumer) (typecheck)
if sigGasConsumer == nil {
sigGasConsumer = ante.DefaultSigVerificationGasConsumer
}
Expand All @@ -46,20 +47,20 @@
ante.NewSetUpContextDecorator(), // outermost AnteDecorator. SetUpContext must be called first
wasmkeeper.NewLimitSimulationGasDecorator(options.WasmConfig.SimulationGasLimit),
wasmkeeper.NewCountTXDecorator(options.TxCounterStoreKey),
ante.NewRejectExtensionOptionsDecorator(),
ante.NewMempoolFeeDecorator(),
ante.NewExtensionOptionsDecorator(nil),
ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper, nil),

Check failure on line 51 in app/ante/ante.go

View workflow job for this annotation

GitHub Actions / golangci-lint

options.AccountKeeper undefined (type HandlerOptions has no field or method AccountKeeper) (typecheck)
ante.NewValidateBasicDecorator(),
ante.NewTxTimeoutHeightDecorator(),
ante.NewValidateMemoDecorator(options.AccountKeeper),

Check failure on line 54 in app/ante/ante.go

View workflow job for this annotation

GitHub Actions / golangci-lint

options.AccountKeeper undefined (type HandlerOptions has no field or method AccountKeeper) (typecheck)
ante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper),
ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper),
ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper, nil),
// SetPubKeyDecorator must be called before all signature verification decorators
ante.NewSetPubKeyDecorator(options.AccountKeeper),
ante.NewSetPubKeyDecorator(options.AccountKeeper, options.BankKeeper),
ante.NewValidateSigCountDecorator(options.AccountKeeper),
ante.NewSigGasConsumeDecorator(options.AccountKeeper, sigGasConsumer),
NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler),
ante.NewIncrementSequenceDecorator(options.AccountKeeper),
ibcante.NewAnteDecorator(options.IBCkeeper),
ibcante.NewRedundantRelayDecorator(options.IBCkeeper),
}

return sdk.ChainAnteDecorators(anteDecorators...), nil
Expand Down
156 changes: 0 additions & 156 deletions app/ante/ante_test.go

This file was deleted.

4 changes: 4 additions & 0 deletions app/ante/sigverify_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package ante_test

import _ "github.com/cosmos/cosmos-sdk/testutil/testdata"

/**
import (
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/codec"
Expand Down Expand Up @@ -194,3 +197,4 @@ func (suite *AnteTestSuite) TestSigVerification_ExplicitAmino() {
}
}
}
**/
Loading
Loading