keeper

package
v21.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	StoreKeyContracts = []byte("contracts")
)

Store Keys for clock contracts (both jailed and unjailed)

Functions

func NewMsgServerImpl

func NewMsgServerImpl(k Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the x/clock MsgServer interface.

Types

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

Keeper of the clock store

func NewKeeper

func NewKeeper(
	key storetypes.StoreKey,
	cdc codec.BinaryCodec,
	wasmKeeper wasmkeeper.Keeper,
	contractKeeper wasmtypes.ContractOpsKeeper,
	authority string,
) Keeper

func (Keeper) GetAllContracts

func (k Keeper) GetAllContracts(ctx sdk.Context) ([]types.ClockContract, error)

Get all clock contract addresses from the KV store.

func (Keeper) GetAuthority

func (k Keeper) GetAuthority() string

GetAuthority returns the x/clock module's authority.

func (Keeper) GetCdc

func (k Keeper) GetCdc() codec.BinaryCodec

GetCdc returns the x/clock module's codec.

func (Keeper) GetClockContract

func (k Keeper) GetClockContract(ctx sdk.Context, contractAddress string) (*types.ClockContract, error)

Get a clock contract address from the KV store.

func (Keeper) GetContractKeeper

func (k Keeper) GetContractKeeper() wasmtypes.ContractOpsKeeper

GetContractKeeper returns the x/wasm module's contract keeper.

func (Keeper) GetPaginatedContracts

func (k Keeper) GetPaginatedContracts(ctx sdk.Context, pag *query.PageRequest) (*types.QueryClockContractsResponse, error)

Get all registered fee pay contracts

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) (p types.Params)

GetParams returns the current x/clock module parameters.

func (Keeper) GetStore

func (k Keeper) GetStore() storetypes.StoreKey

GetStore returns the x/clock module's store key.

func (Keeper) IsClockContract

func (k Keeper) IsClockContract(ctx sdk.Context, contractAddress string) bool

Check if a clock contract address is in the KV store.

func (Keeper) IsContractManager

func (k Keeper) IsContractManager(ctx sdk.Context, senderAddress string, contractAddress string) (bool, error)

Check if the sender is the designated contract manager for the FeePay contract. If an admin is present, they are considered the manager. If there is no admin, the contract creator is considered the manager.

func (Keeper) Logger

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

Logger returns a module-specific logger.

func (Keeper) RegisterContract

func (k Keeper) RegisterContract(ctx sdk.Context, senderAddress string, contractAddress string) error

Register a clock contract address in the KV store.

func (Keeper) RemoveContract

func (k Keeper) RemoveContract(ctx sdk.Context, contractAddress string)

Remove a clock contract address from the KV store.

func (Keeper) SetClockContract

func (k Keeper) SetClockContract(ctx sdk.Context, contract types.ClockContract) error

Set a clock contract address in the KV store.

func (Keeper) SetJailStatus

func (k Keeper) SetJailStatus(ctx sdk.Context, contractAddress string, isJailed bool) error

Set the jail status of a clock contract in the KV store.

func (Keeper) SetJailStatusBySender

func (k Keeper) SetJailStatusBySender(ctx sdk.Context, senderAddress string, contractAddress string, jailStatus bool) error

Set the jail status of a clock contract by the sender address.

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, p types.Params) error

SetParams sets the x/clock module parameters.

func (Keeper) UnregisterContract

func (k Keeper) UnregisterContract(ctx sdk.Context, senderAddress string, contractAddress string) error

Unregister a clock contract from either the jailed or unjailed KV store.

type Querier

type Querier struct {
	// contains filtered or unexported fields
}

func NewQuerier

func NewQuerier(k Keeper) Querier

func (Querier) ClockContract

ClockContract returns the clock contract information

func (Querier) ClockContracts

ContractModules returns contract addresses which are using the clock

func (Querier) Params

Params returns the total set of clock parameters.

Jump to

Keyboard shortcuts

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