Documentation ¶
Index ¶
- Constants
- func NewLegacyQuerier(keeper Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) Cdc() codec.BinaryCodec
- func (k Keeper) GetAllWrkChainBlockHashes(ctx sdk.Context, wrkchainID uint64) (wrkChainBlocks []types.WrkChainBlock)
- func (k Keeper) GetAllWrkChainBlockHashesForGenesisExport(ctx sdk.Context, wrkchainID uint64) (wrkChainBlocks types.WrkChainBlockGenesisExports)
- func (k Keeper) GetAllWrkChains(ctx sdk.Context) (wrkChains []types.WrkChain)
- func (k Keeper) GetHighestWrkChainID(ctx sdk.Context) (wrkChainID uint64, err error)
- func (k Keeper) GetLastWrkChainHeightInState(ctx sdk.Context, wrkchainID uint64) (height uint64)
- func (k Keeper) GetMaxPurchasableSlots(ctx sdk.Context, wrkchainId uint64) uint64
- func (k Keeper) GetParamDefaultStorageLimit(ctx sdk.Context) uint64
- func (k Keeper) GetParamDenom(ctx sdk.Context) string
- func (k Keeper) GetParamMaxStorageLimit(ctx sdk.Context) uint64
- func (k Keeper) GetParamPurchaseStorageFee(ctx sdk.Context) uint64
- func (k Keeper) GetParamRecordFee(ctx sdk.Context) uint64
- func (k Keeper) GetParamRegistrationFee(ctx sdk.Context) uint64
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetPurchaseStorageFeeAsCoin(ctx sdk.Context) sdk.Coin
- func (k Keeper) GetPurchaseStorageFeeAsCoins(ctx sdk.Context) sdk.Coins
- func (k Keeper) GetRecordFeeAsCoin(ctx sdk.Context) sdk.Coin
- func (k Keeper) GetRecordFeeAsCoins(ctx sdk.Context) sdk.Coins
- func (k Keeper) GetRegistrationFeeAsCoin(ctx sdk.Context) sdk.Coin
- func (k Keeper) GetRegistrationFeeAsCoins(ctx sdk.Context) sdk.Coins
- func (k Keeper) GetWrkChain(ctx sdk.Context, wrkchainId uint64) (types.WrkChain, bool)
- func (k Keeper) GetWrkChainBlock(ctx sdk.Context, wrkchainId uint64, height uint64) (types.WrkChainBlock, bool)
- func (k Keeper) GetWrkChainBlockHashesIterator(ctx sdk.Context, wrkchainID uint64) sdk.Iterator
- func (k Keeper) GetWrkChainOwner(ctx sdk.Context, wrkchainId uint64) sdk.AccAddress
- func (k Keeper) GetWrkChainStorageLimit(ctx sdk.Context, wrkchainId uint64) (types.WrkChainStorageLimit, bool)
- func (k Keeper) GetWrkChainsFiltered(ctx sdk.Context, params types.QueryWrkChainsFilteredRequest) []types.WrkChain
- func (k Keeper) GetWrkChainsIterator(ctx sdk.Context) sdk.Iterator
- func (k Keeper) GetZeroFeeAsCoin(ctx sdk.Context) sdk.Coin
- func (k Keeper) GetZeroFeeAsCoins(ctx sdk.Context) sdk.Coins
- func (k Keeper) HasWrkChainStorageLimit(ctx sdk.Context, wrkchainId uint64) bool
- func (k Keeper) IncreaseInStateStorage(ctx sdk.Context, wrkchainId, amount uint64) error
- func (k Keeper) IsAuthorisedToRecord(ctx sdk.Context, wrkchainId uint64, recorder sdk.AccAddress) bool
- func (k Keeper) IsWrkChainBlockRecorded(ctx sdk.Context, wrkchainId uint64, height uint64) bool
- func (k Keeper) IsWrkChainRegistered(ctx sdk.Context, wrkchainId uint64) bool
- func (k Keeper) IterateWrkChainBlockHashes(ctx sdk.Context, wrkchainID uint64, ...)
- func (k Keeper) IterateWrkChainBlockHashesPaginated(ctx sdk.Context, wrkchainID uint64, page, limit uint, ...)
- func (k Keeper) IterateWrkChainBlockHashesReverse(ctx sdk.Context, wrkchainID uint64, ...)
- func (k Keeper) IterateWrkChains(ctx sdk.Context, cb func(wrkChain types.WrkChain) (stop bool))
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) QuickCheckHeightIsNew(ctx sdk.Context, wrkchainId uint64, height uint64) bool
- func (k Keeper) QuickCheckHeightIsRecorded(ctx sdk.Context, wrkchainId uint64, height uint64) bool
- func (k Keeper) RecordNewWrkchainHashes(ctx sdk.Context, wrkchainId uint64, height uint64, blockHash string, ...) (uint64, error)
- func (k Keeper) RegisterNewWrkChain(ctx sdk.Context, moniker string, wrkchainName string, genesisHash string, ...) (uint64, error)
- func (k Keeper) SetHighestWrkChainID(ctx sdk.Context, wrkChainID uint64)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetWrkChain(ctx sdk.Context, wrkchain types.WrkChain) error
- func (k Keeper) SetWrkChainBlock(ctx sdk.Context, wrkchainId uint64, wrkchainBlock types.WrkChainBlock) error
- func (k Keeper) SetWrkChainStorageLimit(ctx sdk.Context, wrkchainId, limit uint64) error
- func (q Keeper) WrkChain(c context.Context, req *types.QueryWrkChainRequest) (*types.QueryWrkChainResponse, error)
- func (q Keeper) WrkChainBlock(c context.Context, req *types.QueryWrkChainBlockRequest) (*types.QueryWrkChainBlockResponse, error)
- func (q Keeper) WrkChainStorage(c context.Context, req *types.QueryWrkChainStorageRequest) (*types.QueryWrkChainStorageResponse, error)
- func (q Keeper) WrkChainsFiltered(c context.Context, req *types.QueryWrkChainsFilteredRequest) (*types.QueryWrkChainsFilteredResponse, error)
- type Migrator
Constants ¶
const ( QueryParameters = "params" QueryWrkChain = "wrkchain" QueryWrkChainsFiltered = "wrkchains-filtered" QueryWrkChainBlock = "block" )
query endpoints supported by the wrkchain Querier
Variables ¶
This section is empty.
Functions ¶
func NewLegacyQuerier ¶
func NewLegacyQuerier(keeper Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
NewLegacyQuerier is the module level router for state queries
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the gov MsgServer interface for the provided Keeper.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper maintains the link to data storage and exposes getter/setter methods for the various parts of the state machine
func NewKeeper ¶
func NewKeeper(storeKey sdk.StoreKey, paramSpace paramtypes.Subspace, cdc codec.BinaryCodec) Keeper
NewKeeper creates new instances of the wrkchain Keeper
func (Keeper) Cdc ¶
func (k Keeper) Cdc() codec.BinaryCodec
func (Keeper) GetAllWrkChainBlockHashes ¶
func (k Keeper) GetAllWrkChainBlockHashes(ctx sdk.Context, wrkchainID uint64) (wrkChainBlocks []types.WrkChainBlock)
GetAllWrkChainBlockHashes returns all the wrkchain's hashes from store
func (Keeper) GetAllWrkChainBlockHashesForGenesisExport ¶
func (k Keeper) GetAllWrkChainBlockHashesForGenesisExport(ctx sdk.Context, wrkchainID uint64) (wrkChainBlocks types.WrkChainBlockGenesisExports)
GetAllWrkChainBlockHashesForGenesisExport returns all the wrkchain's hashes from store for export in an optimised format ready for genesis
func (Keeper) GetAllWrkChains ¶
GetAllWrkChains returns all the registered wrkchain metadata from store
func (Keeper) GetHighestWrkChainID ¶
GetHighestWrkChainID gets the highest WRKChain ID
func (Keeper) GetLastWrkChainHeightInState ¶ added in v1.6.1
func (Keeper) GetMaxPurchasableSlots ¶ added in v1.6.1
func (Keeper) GetParamDefaultStorageLimit ¶ added in v1.6.1
func (Keeper) GetParamMaxStorageLimit ¶ added in v1.6.1
func (Keeper) GetParamPurchaseStorageFee ¶ added in v1.6.1
func (Keeper) GetParamRegistrationFee ¶
func (Keeper) GetPurchaseStorageFeeAsCoin ¶ added in v1.6.1
func (Keeper) GetPurchaseStorageFeeAsCoins ¶ added in v1.6.1
func (Keeper) GetRegistrationFeeAsCoin ¶
func (Keeper) GetRegistrationFeeAsCoins ¶
func (Keeper) GetWrkChain ¶
GetWrkChain Gets the entire WRKChain metadata struct for a wrkchainId
func (Keeper) GetWrkChainBlock ¶
func (k Keeper) GetWrkChainBlock(ctx sdk.Context, wrkchainId uint64, height uint64) (types.WrkChainBlock, bool)
GetWrkChainBlock Gets the entire WRKChain metadata struct for a wrkchainId
func (Keeper) GetWrkChainBlockHashesIterator ¶
GetWrkChainBlockHashesIterator Gets an iterator over all WrkChain hashess in which the keys are the WrkChain Ids and the values are the WrkChainBlocks
func (Keeper) GetWrkChainOwner ¶
GetWrkChainOwner - get the current owner of a WRKChain
func (Keeper) GetWrkChainStorageLimit ¶ added in v1.6.1
func (Keeper) GetWrkChainsFiltered ¶
func (k Keeper) GetWrkChainsFiltered(ctx sdk.Context, params types.QueryWrkChainsFilteredRequest) []types.WrkChain
GetWrkChainsFiltered retrieves wrkchains filtered by a given set of params which include pagination parameters along a moniker and owner address.
NOTE: If no filters are provided, all proposals will be returned in paginated form.
func (Keeper) GetWrkChainsIterator ¶
GetWrkChainsIterator Get an iterator over all WrkChains in which the keys are the WrkChain Ids and the values are the WrkChains
func (Keeper) HasWrkChainStorageLimit ¶ added in v1.6.1
func (Keeper) IncreaseInStateStorage ¶ added in v1.6.1
func (Keeper) IsAuthorisedToRecord ¶
func (k Keeper) IsAuthorisedToRecord(ctx sdk.Context, wrkchainId uint64, recorder sdk.AccAddress) bool
IsAuthorisedToRecord ensures only the WRKChain owner is recording hashes
func (Keeper) IsWrkChainBlockRecorded ¶
IsWrkChainBlockRecorded Check if the WrkChainBlock is present in the store or not
func (Keeper) IsWrkChainRegistered ¶
IsWrkChainRegistered Checks if the WrkChain is present in the store or not
func (Keeper) IterateWrkChainBlockHashes ¶
func (k Keeper) IterateWrkChainBlockHashes(ctx sdk.Context, wrkchainID uint64, cb func(wrkChain types.WrkChainBlock) (stop bool))
IterateWrkChainBlockHashes iterates over the all the hashes for a wrkchain and performs a callback function
func (Keeper) IterateWrkChainBlockHashesPaginated ¶ added in v1.6.1
func (Keeper) IterateWrkChainBlockHashesReverse ¶
func (k Keeper) IterateWrkChainBlockHashesReverse(ctx sdk.Context, wrkchainID uint64, cb func(wrkChain types.WrkChainBlock) (stop bool))
IterateWrkChainBlockHashesReverse iterates over the all the hashes for a wrkchain in reverse order and performs a callback function
func (Keeper) IterateWrkChains ¶
IterateWrkChains iterates over the all the wrkchain metadata and performs a callback function
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) QuickCheckHeightIsNew ¶ added in v1.6.1
QuickCheckHeightIsNew Checks if the given height can be recorded
func (Keeper) QuickCheckHeightIsRecorded ¶
QuickCheckHeightIsRecorded Checks if the given height can be recorded
func (Keeper) RecordNewWrkchainHashes ¶
func (k Keeper) RecordNewWrkchainHashes( ctx sdk.Context, wrkchainId uint64, height uint64, blockHash string, parentHash string, hash1 string, hash2 string, hash3 string) (uint64, error)
RecordNewWrkchainHashes records a WRKChain block has for a registered WRKChain
func (Keeper) RegisterNewWrkChain ¶
func (k Keeper) RegisterNewWrkChain(ctx sdk.Context, moniker string, wrkchainName string, genesisHash string, baseType string, owner sdk.AccAddress) (uint64, error)
RegisterNewWrkChain registers a WRKChain in the store
func (Keeper) SetHighestWrkChainID ¶
SetHighestWrkChainID sets the new highest WRKChain ID to the store
func (Keeper) SetWrkChain ¶
SetWrkChain Sets the WrkChain metadata struct for a wrkchainId
func (Keeper) SetWrkChainBlock ¶
func (k Keeper) SetWrkChainBlock(ctx sdk.Context, wrkchainId uint64, wrkchainBlock types.WrkChainBlock) error
SetWrkChainBlock Sets the WrkChain Block struct for a wrkchainId & height
func (Keeper) SetWrkChainStorageLimit ¶ added in v1.6.1
func (Keeper) WrkChain ¶
func (q Keeper) WrkChain(c context.Context, req *types.QueryWrkChainRequest) (*types.QueryWrkChainResponse, error)
func (Keeper) WrkChainBlock ¶
func (q Keeper) WrkChainBlock(c context.Context, req *types.QueryWrkChainBlockRequest) (*types.QueryWrkChainBlockResponse, error)
func (Keeper) WrkChainStorage ¶ added in v1.6.1
func (q Keeper) WrkChainStorage(c context.Context, req *types.QueryWrkChainStorageRequest) (*types.QueryWrkChainStorageResponse, error)
func (Keeper) WrkChainsFiltered ¶
func (q Keeper) WrkChainsFiltered(c context.Context, req *types.QueryWrkChainsFilteredRequest) (*types.QueryWrkChainsFilteredResponse, error)
type Migrator ¶ added in v1.6.1
type Migrator struct {
// contains filtered or unexported fields
}
Migrator is a struct for handling in-place store migrations.
func NewMigrator ¶ added in v1.6.1
NewMigrator returns a new Migrator.