mirror of
https://github.com/planetmint/planetmint-go.git
synced 2025-06-02 04:06:38 +00:00

This is the quasi-standard and fixes the error below: ``` $ go get -u github.com/planetmint/planetmint-go@v0.1.0 go: github.com/planetmint/planetmint-go@v0.1.0: parsing go.mod: module declares its path as: planetmint-go but was required as: github.com/planetmint/planetmint-go ``` Signed-off-by: Julian Strobl <jmastr@mailbox.org>
34 lines
1.3 KiB
Go
34 lines
1.3 KiB
Go
package ante
|
|
|
|
import (
|
|
"github.com/planetmint/planetmint-go/x/machine/types"
|
|
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
|
|
)
|
|
|
|
type MachineKeeper interface {
|
|
GetMachineIndex(ctx sdk.Context, pubKey string) (val types.MachineIndex, found bool)
|
|
GetTrustAnchor(ctx sdk.Context, pubKey string) (val types.TrustAnchor, activated bool, found bool)
|
|
}
|
|
|
|
// AccountKeeper defines the contract needed for AccountKeeper related APIs.
|
|
// Interface provides support to use non-sdk AccountKeeper for AnteHandler's decorators.
|
|
type AccountKeeper interface {
|
|
GetParams(ctx sdk.Context) (params authtypes.Params)
|
|
GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI
|
|
SetAccount(ctx sdk.Context, acc authtypes.AccountI)
|
|
GetModuleAddress(moduleName string) sdk.AccAddress
|
|
}
|
|
|
|
// FeegrantKeeper defines the expected feegrant keeper.
|
|
type FeegrantKeeper interface {
|
|
UseGrantedFees(ctx sdk.Context, granter, grantee sdk.AccAddress, fee sdk.Coins, msgs []sdk.Msg) error
|
|
}
|
|
|
|
type BankKeeper interface {
|
|
IsSendEnabledCoins(ctx sdk.Context, coins ...sdk.Coin) error
|
|
SendCoins(ctx sdk.Context, from, to sdk.AccAddress, amt sdk.Coins) error
|
|
SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
|
|
}
|