keeper

package
v0.7.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) typesv1.MsgServer

NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.

Types

type Keeper

type Keeper struct {
	WasmKeeper     wasmkeeper.Keeper
	ContractKeeper *wasmkeeper.PermissionedKeeper
	AccountKeeper  types.AccountKeeper
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey storetypes.StoreKey,
	ps paramtypes.Subspace,
	wp wasmkeeper.Keeper,
	contractKeeper *wasmkeeper.PermissionedKeeper,
	ak types.AccountKeeper,
) Keeper

func (Keeper) ActiveSmartAccount

func (k Keeper) ActiveSmartAccount(
	ctx sdk.Context,
	msg *typesv1.MsgActivateAccount,
	sAccount authtypes.AccountI,
) (cryptotypes.PubKey, error)

create a new smart account from an inactive account

func (Keeper) CallSMValidate

func (k Keeper) CallSMValidate(ctx sdk.Context, msg *typesv1.MsgRecover, saAddr sdk.AccAddress, pubKey cryptotypes.PubKey) error

CallSMValidate to check logic recover from smart account

func (Keeper) CheckAllowedMsgs

func (k Keeper) CheckAllowedMsgs(ctx sdk.Context, msgs []sdk.Msg) error

IsAllowed returns true when msg URL is not found in the DisableList for given context, else false.

func (Keeper) DeleteGasRemaining

func (k Keeper) DeleteGasRemaining(ctx sdk.Context)

func (Keeper) DeleteSignerAddress

func (k Keeper) DeleteSignerAddress(ctx sdk.Context)

func (Keeper) GetAndIncrementNextAccountID

func (k Keeper) GetAndIncrementNextAccountID(ctx sdk.Context) uint64

func (Keeper) GetGasRemaining

func (k Keeper) GetGasRemaining(ctx sdk.Context) uint64

func (Keeper) GetNextAccountID

func (k Keeper) GetNextAccountID(ctx sdk.Context) uint64

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) (params typesv1.Params)

GetParams get all parameters as types.Params

func (Keeper) GetSignerAddress

func (k Keeper) GetSignerAddress(ctx sdk.Context) sdk.AccAddress

func (Keeper) GetSmartAccountByAddress

func (k Keeper) GetSmartAccountByAddress(ctx sdk.Context, address sdk.AccAddress) (*typesv1.SmartAccount, error)

func (Keeper) HandleAfterActive

func (k Keeper) HandleAfterActive(ctx sdk.Context, sAccount authtypes.AccountI, backupSeq uint64, pubKey cryptotypes.PubKey) error

HandleAfterActive change type of account to smart account and recover seq of this account

func (Keeper) HasGasRemaining

func (k Keeper) HasGasRemaining(ctx sdk.Context) bool

func (Keeper) IsInactiveAccount

func (k Keeper) IsInactiveAccount(ctx sdk.Context, acc sdk.AccAddress) (authtypes.AccountI, error)

Inactive smart-account must be base account with empty public key

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

func (Keeper) PrepareBeforeActive

func (k Keeper) PrepareBeforeActive(ctx sdk.Context, sAccount authtypes.AccountI) error

func (Keeper) SetGasRemaining

func (k Keeper) SetGasRemaining(ctx sdk.Context, gasRemaining uint64)

func (Keeper) SetNextAccountID

func (k Keeper) SetNextAccountID(ctx sdk.Context, id uint64)

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params typesv1.Params) error

SetParams set the params

func (Keeper) SetSignerAddress

func (k Keeper) SetSignerAddress(ctx sdk.Context, signerAddr sdk.AccAddress)

func (Keeper) UpdateAccountPubKey

func (k Keeper) UpdateAccountPubKey(ctx sdk.Context, acc authtypes.AccountI, pubKey cryptotypes.PubKey) error

set new pubkey for an account

func (Keeper) ValidateActiveSA

func (k Keeper) ValidateActiveSA(ctx sdk.Context, msg *typesv1.MsgActivateAccount) (authtypes.AccountI, error)

func (Keeper) ValidateRecoverSA

func (k Keeper) ValidateRecoverSA(ctx sdk.Context, msg *typesv1.MsgRecover) (authtypes.AccountI, error)

ValidateRecoverSA check input before recover smart account

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL