keeper

package
v3.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllInvariants added in v3.1.0

func AllInvariants(k Keeper) sdk.Invariant

AllInvariants runs all invariants of the X/bank module.

func BlockHeightToFinalizationQueueInvariant added in v3.1.0

func BlockHeightToFinalizationQueueInvariant(k Keeper) sdk.Invariant

BlockHeightToFinalizationQueueInvariant checks that all unfinalized states are in the finalization queue

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

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

func RegisterInvariants added in v3.1.0

func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper)

RegisterInvariants registers the bank module invariants

func RollappByEIP155KeyInvariant added in v3.1.0

func RollappByEIP155KeyInvariant(k Keeper) sdk.Invariant

RollappByEIP155KeyInvariant checks that assuming rollapp id is registered with eip155 chain id then it should be retrievable by eip155 key

func RollappCountInvariant added in v3.1.0

func RollappCountInvariant(k Keeper) sdk.Invariant

RollappCountInvariant checks that the number of rollapps is equal to the number of latestStateInfoIndex

func RollappFinalizedStateInvariant added in v3.1.0

func RollappFinalizedStateInvariant(k Keeper) sdk.Invariant

RollappFinalizedStateInvariant checks that all the states until latest finalized state are finalized

func RollappLatestStateIndexInvariant added in v3.1.0

func RollappLatestStateIndexInvariant(k Keeper) sdk.Invariant

RollappLatestStateIndexInvariant checks the following invariants per each rollapp that latest state index >= finalized state index

Types

type Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey storetypes.StoreKey,
	ps paramtypes.Subspace,
	ibcclientKeeper types.IBCClientKeeper,
	transferKeeper types.TransferKeeper,
	channelKeeper types.ChannelKeeper,
	bankKeeper types.BankKeeper,
	denommetadataKeeper types.DenomMetadataKeeper,
) *Keeper

func (Keeper) DeployerWhitelist

func (k Keeper) DeployerWhitelist(ctx sdk.Context) (res []types.DeployerParams)

DeployerWhitelist returns the DeployerWhitelist param

func (Keeper) DisputePeriodInBlocks

func (k Keeper) DisputePeriodInBlocks(ctx sdk.Context) (res uint64)

DisputePeriodInBlocks returns the DisputePeriodInBlocks param

func (Keeper) FinalizeQueue added in v3.1.0

func (k Keeper) FinalizeQueue(ctx sdk.Context) error

FinalizeQueue is called every block to finalize states when their dispute period over.

func (Keeper) FindStateInfoByHeight

func (k Keeper) FindStateInfoByHeight(ctx sdk.Context, rollappId string, height uint64) (*types.StateInfo, error)

func (Keeper) GetAllBlockHeightToFinalizationQueue

func (k Keeper) GetAllBlockHeightToFinalizationQueue(ctx sdk.Context) (list []types.BlockHeightToFinalizationQueue)

GetAllBlockHeightToFinalizationQueue returns all blockHeightToFinalizationQueue

func (Keeper) GetAllFinalizationQueueUntilHeight added in v3.1.0

func (k Keeper) GetAllFinalizationQueueUntilHeight(ctx sdk.Context, height uint64) (list []types.BlockHeightToFinalizationQueue)

GetAllFinalizationQueueUntilHeight returns all the blockHeightToFinalizationQueues with creation height equal or less to the input height

func (Keeper) GetAllLatestFinalizedStateIndex

func (k Keeper) GetAllLatestFinalizedStateIndex(ctx sdk.Context) (list []types.StateInfoIndex)

GetAllLatestFinalizedStateIndex returns all latestFinalizedStateIndex

func (Keeper) GetAllLatestStateInfoIndex

func (k Keeper) GetAllLatestStateInfoIndex(ctx sdk.Context) (list []types.StateInfoIndex)

GetAllLatestStateInfoIndex returns all latestStateInfoIndex

func (Keeper) GetAllRollapps added in v3.1.0

func (k Keeper) GetAllRollapps(ctx sdk.Context) (list []types.Rollapp)

GetAllRollapp returns all rollapp

func (Keeper) GetAllStateInfo

func (k Keeper) GetAllStateInfo(ctx sdk.Context) (list []types.StateInfo)

GetAllStateInfo returns all stateInfo

func (Keeper) GetBlockHeightToFinalizationQueue

func (k Keeper) GetBlockHeightToFinalizationQueue(
	ctx sdk.Context,
	creationHeight uint64,
) (val types.BlockHeightToFinalizationQueue, found bool)

GetBlockHeightToFinalizationQueue returns a blockHeightToFinalizationQueue from its index

func (*Keeper) GetHooks

func (k *Keeper) GetHooks() types.MultiRollappHooks

func (Keeper) GetLatestFinalizedStateIndex

func (k Keeper) GetLatestFinalizedStateIndex(
	ctx sdk.Context,
	rollappId string,
) (val types.StateInfoIndex, found bool)

GetLatestFinalizedStateIndex returns a latestFinalizedStateIndex from its index

func (Keeper) GetLatestStateInfoIndex

func (k Keeper) GetLatestStateInfoIndex(
	ctx sdk.Context,
	rollappId string,
) (val types.StateInfoIndex, found bool)

GetLatestStateInfoIndex returns a latestStateInfoIndex from its index

func (Keeper) GetParams

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

GetParams get all parameters as types.Params

func (Keeper) GetRollapp

func (k Keeper) GetRollapp(
	ctx sdk.Context,
	rollappId string,
) (val types.Rollapp, found bool)

GetRollapp returns a rollapp from its chain name

func (Keeper) GetRollappByEIP155

func (k Keeper) GetRollappByEIP155(
	ctx sdk.Context,
	eip155 uint64,
) (val types.Rollapp, found bool)

GetRollappByEIP155 returns a rollapp from its EIP155 id (https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md) for EVM compatible rollapps

func (Keeper) GetStateInfo

func (k Keeper) GetStateInfo(
	ctx sdk.Context,
	rollappId string,
	index uint64,
) (val types.StateInfo, found bool)

GetStateInfo returns a stateInfo from its index

func (Keeper) HandleFraud added in v3.1.0

func (k Keeper) HandleFraud(ctx sdk.Context, rollappID, clientId string, fraudHeight uint64, seqAddr string) error

HandleFraud handles the fraud evidence submitted by the user.

func (Keeper) IsAddressInDeployerWhiteList added in v3.1.0

func (k Keeper) IsAddressInDeployerWhiteList(ctx sdk.Context, address string) bool

func (Keeper) IsRollappStarted added in v3.1.0

func (k Keeper) IsRollappStarted(ctx sdk.Context, rollappId string) bool

IsRollappStarted returns true if the rollapp is started

func (Keeper) LatestHeight added in v3.1.0

func (Keeper) Logger

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

func (Keeper) MustGetStateInfo added in v3.1.0

func (k Keeper) MustGetStateInfo(ctx sdk.Context,
	rollappId string,
	index uint64,
) (val types.StateInfo)

func (Keeper) Params

func (Keeper) RemoveBlockHeightToFinalizationQueue

func (k Keeper) RemoveBlockHeightToFinalizationQueue(
	ctx sdk.Context,
	creationHeight uint64,
)

RemoveBlockHeightToFinalizationQueue removes a blockHeightToFinalizationQueue from the store

func (Keeper) RemoveLatestFinalizedStateIndex

func (k Keeper) RemoveLatestFinalizedStateIndex(
	ctx sdk.Context,
	rollappId string,
)

RemoveLatestFinalizedStateIndex removes a latestFinalizedStateIndex from the store

func (Keeper) RemoveLatestStateInfoIndex

func (k Keeper) RemoveLatestStateInfoIndex(
	ctx sdk.Context,
	rollappId string,
)

RemoveLatestStateInfoIndex removes a latestStateInfoIndex from the store

func (Keeper) RemoveRollapp

func (k Keeper) RemoveRollapp(
	ctx sdk.Context,
	rollappId string,
)

RemoveRollapp removes a rollapp from the store using rollapp name

func (Keeper) RemoveStateInfo

func (k Keeper) RemoveStateInfo(
	ctx sdk.Context,
	rollappId string,
	index uint64,
)

RemoveStateInfo removes a stateInfo from the store

func (Keeper) RevertPendingStates added in v3.1.0

func (k Keeper) RevertPendingStates(ctx sdk.Context, rollappID string)

revert all pending states of a rollapp

func (Keeper) RollappsEnabled

func (k Keeper) RollappsEnabled(ctx sdk.Context) (res bool)

func (Keeper) SetBlockHeightToFinalizationQueue

func (k Keeper) SetBlockHeightToFinalizationQueue(ctx sdk.Context, blockHeightToFinalizationQueue types.BlockHeightToFinalizationQueue)

SetBlockHeightToFinalizationQueue set a specific blockHeightToFinalizationQueue in the store from its index

func (*Keeper) SetHooks

func (k *Keeper) SetHooks(sh types.MultiRollappHooks)

Set the rollapp hooks

func (Keeper) SetLatestFinalizedStateIndex

func (k Keeper) SetLatestFinalizedStateIndex(ctx sdk.Context, latestFinalizedStateIndex types.StateInfoIndex)

SetLatestFinalizedStateIndex set a specific latestFinalizedStateIndex in the store from its index

func (Keeper) SetLatestStateInfoIndex

func (k Keeper) SetLatestStateInfoIndex(ctx sdk.Context, latestStateInfoIndex types.StateInfoIndex)

SetLatestStateInfoIndex set a specific latestStateInfoIndex in the store from its index

func (Keeper) SetParams

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

SetParams set the params

func (Keeper) SetRollapp

func (k Keeper) SetRollapp(ctx sdk.Context, rollapp types.Rollapp)

SetRollapp set a specific rollapp in the store from its index

func (Keeper) SetStateInfo

func (k Keeper) SetStateInfo(ctx sdk.Context, stateInfo types.StateInfo)

SetStateInfo set a specific stateInfo in the store from its index

func (Keeper) TriggerRollappGenesisEvent added in v3.1.0

func (k Keeper) TriggerRollappGenesisEvent(ctx sdk.Context, rollapp types.Rollapp) error

TriggerRollappGenesisEvent triggers the genesis event for the rollapp.

Jump to

Keyboard shortcuts

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