mirror of
https://github.com/planetmint/planetmint-go.git
synced 2025-05-20 05:46:38 +00:00

* add MintAddress to params.proto * ignite scaffold message update-params params:Params --module dao * add dao get and set params * make dao.MsgUpdateParams.Params non-nullable * use GetMintAddress in ante handler * adjust dao e2e test suit for mint address param * change msg creator to authority and set gov module as default in gov proposal * fix staticcheck error * remove depricated config param * fix linter errors Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
41 lines
1.6 KiB
Go
41 lines
1.6 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"
|
|
daotypes "github.com/planetmint/planetmint-go/x/dao/types"
|
|
)
|
|
|
|
type MachineKeeper interface {
|
|
GetMachineIndexByPubKey(ctx sdk.Context, pubKey string) (val types.MachineIndex, found bool)
|
|
GetMachineIndexByAddress(ctx sdk.Context, address 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
|
|
}
|
|
|
|
type DaoKeeper interface {
|
|
GetMintRequestByHash(ctx sdk.Context, hash string) (val daotypes.MintRequest, found bool)
|
|
GetMintAddress(ctx sdk.Context) (mintAddress string)
|
|
}
|