2021-10-01 07:30:22 -07:00
|
|
|
package middleware
|
2020-04-21 09:56:18 -07:00
|
|
|
|
|
|
|
import (
|
|
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
|
|
"github.com/cosmos/cosmos-sdk/x/auth/types"
|
|
|
|
)
|
|
|
|
|
|
|
|
// AccountKeeper defines the contract needed for AccountKeeper related APIs.
|
2021-10-01 07:30:22 -07:00
|
|
|
// Interface provides support to use non-sdk AccountKeeper for TxHandler's middlewares.
|
2020-04-21 09:56:18 -07:00
|
|
|
type AccountKeeper interface {
|
|
|
|
GetParams(ctx sdk.Context) (params types.Params)
|
2020-05-20 12:21:00 -07:00
|
|
|
GetAccount(ctx sdk.Context, addr sdk.AccAddress) types.AccountI
|
|
|
|
SetAccount(ctx sdk.Context, acc types.AccountI)
|
2020-04-21 09:56:18 -07:00
|
|
|
GetModuleAddress(moduleName string) sdk.AccAddress
|
|
|
|
}
|
2021-03-23 00:31:09 -07:00
|
|
|
|
|
|
|
// FeegrantKeeper defines the expected feegrant keeper.
|
|
|
|
type FeegrantKeeper interface {
|
2021-04-09 09:49:24 -07:00
|
|
|
UseGrantedFees(ctx sdk.Context, granter, grantee sdk.AccAddress, fee sdk.Coins, msgs []sdk.Msg) error
|
2021-03-23 00:31:09 -07:00
|
|
|
}
|