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: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Keeper

type Keeper struct {
	types.EIBCKeeper
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey storetypes.StoreKey,
	ps paramtypes.Subspace,
	rollappKeeper types.RollappKeeper,
	sequencerKeeper types.SequencerKeeper,
	ics4Wrapper porttypes.ICS4Wrapper,
	channelKeeper types.ChannelKeeper,
	connectionKeeper types.ConnectionKeeper,
	clientKeeper types.ClientKeeper,
	eibcKeeper types.EIBCKeeper,
	bankKeeper types.BankKeeper,
) *Keeper

func (Keeper) BlockedAddr added in v3.1.0

func (k Keeper) BlockedAddr(addr string) bool

func (Keeper) EpochIdentifier added in v3.1.0

func (k Keeper) EpochIdentifier(ctx sdk.Context) (res string)

func (Keeper) ExtractChainIDFromChannel

func (k Keeper) ExtractChainIDFromChannel(ctx sdk.Context, portID string, channelID string) (string, error)

func (Keeper) FinalizeRollappPackets added in v3.1.0

func (k Keeper) FinalizeRollappPackets(ctx sdk.Context, ibc porttypes.IBCModule, rollappID string, stateEndHeight uint64) error

FinalizeRollappPackets finalizes the packets for the given rollapp until the given height which is the end height of the latest finalized state

func (Keeper) GetAllRollappPackets added in v3.1.0

func (k Keeper) GetAllRollappPackets(ctx sdk.Context) (list []commontypes.RollappPacket)

func (*Keeper) GetAppVersion

func (k *Keeper) GetAppVersion(
	ctx sdk.Context,
	portID,
	channelID string,
) (string, bool)

GetAppVersion wraps IBC ICS4Wrapper GetAppVersion function.

func (Keeper) GetClientState

func (k Keeper) GetClientState(ctx sdk.Context, portID string, channelID string) (exported.ClientState, error)

GetClientState retrieves the client state for a given packet.

func (Keeper) GetConnectionEnd added in v3.1.0

func (k Keeper) GetConnectionEnd(ctx sdk.Context, portID string, channelID string) (connectiontypes.ConnectionEnd, error)

func (Keeper) GetEIBCHooks added in v3.1.0

func (k Keeper) GetEIBCHooks() eibctypes.EIBCHooks

func (Keeper) GetEpochHooks added in v3.1.0

func (k Keeper) GetEpochHooks() epochstypes.EpochHooks

func (*Keeper) GetHooks added in v3.1.0

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

func (Keeper) GetParams added in v3.1.0

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, chainID string) (rollapptypes.Rollapp, bool)

func (Keeper) GetRollappFinalizedHeight

func (k Keeper) GetRollappFinalizedHeight(ctx sdk.Context, chainID string) (uint64, error)

func (Keeper) GetRollappPacket added in v3.1.0

func (k Keeper) GetRollappPacket(ctx sdk.Context, rollappPacketKey string) (*commontypes.RollappPacket, error)

GetRollappPacket retrieves a rollapp packet from the KVStore.

func (Keeper) HandleFraud added in v3.1.0

func (k Keeper) HandleFraud(ctx sdk.Context, rollappID string, ibc porttypes.IBCModule) error

func (Keeper) IsRollappsEnabled

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

func (Keeper) ListRollappPackets added in v3.1.0

func (k Keeper) ListRollappPackets(ctx sdk.Context, listFilter types.RollappPacketListFilter) (list []commontypes.RollappPacket)

ListRollappPackets retrieves a list rollapp packets from the KVStore by applying the given filter

func (Keeper) Logger

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

func (*Keeper) LookupModuleByChannel

func (k *Keeper) LookupModuleByChannel(ctx sdk.Context, portID, channelID string) (string, *capabilitytypes.Capability, error)

LookupModuleByChannel wraps ChannelKeeper LookupModuleByChannel function.

func (Keeper) PacketsFinalizationCorrespondsToFinalizationHeight added in v3.1.0

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

PacketsFinalizationCorrespondsToFinalizationHeight checks that all rollapp packets stored are set to finalized status for all heights up to the latest height. Skip the check if the rollapp is frozen

func (Keeper) PacketsFromRevertedHeightsAreReverted added in v3.1.0

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

PacketsFromRevertedHeightsAreReverted checks that all rollapp packets stored are set to reverted status for all heights up to the latest height Check if the rollapp is frozen

func (Keeper) RegisterInvariants added in v3.1.0

func (k Keeper) RegisterInvariants(ir sdk.InvariantRegistry)

RegisterInvariants registers the delayedack module invariants

func (Keeper) SendPacket

func (k Keeper) SendPacket(
	ctx sdk.Context,
	chanCap *capabilitytypes.Capability,
	sourcePort string, sourceChannel string,
	timeoutHeight clienttypes.Height,
	timeoutTimestamp uint64,
	data []byte,
) (sequence uint64, err error)

SendPacket wraps IBC ChannelKeeper's SendPacket function

func (*Keeper) SetHooks added in v3.1.0

func (k *Keeper) SetHooks(hooks types.MultiDelayedAckHooks)

func (Keeper) SetParams added in v3.1.0

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

SetParams set the params

func (Keeper) SetRollappPacket

func (k Keeper) SetRollappPacket(ctx sdk.Context, rollappPacket commontypes.RollappPacket)

SetRollappPacket stores a rollapp packet in the KVStore. It logs the saving of the packet and marshals the packet into bytes before storing. The key for the packet is generated using the rollappID, proofHeight and the packet itself.

func (Keeper) UpdateRollappPacketTransferAddress added in v3.1.0

func (k Keeper) UpdateRollappPacketTransferAddress(
	ctx sdk.Context,
	rollappPacketKey string,
	address string,
) error

UpdateRollappPacketTransferAddress updates the recipient of the underlying packet. Only pending packets can be updated.

func (*Keeper) UpdateRollappPacketWithStatus added in v3.1.0

func (k *Keeper) UpdateRollappPacketWithStatus(ctx sdk.Context, rollappPacket commontypes.RollappPacket, newStatus commontypes.Status) (commontypes.RollappPacket, error)

UpdateRollappPacketWithStatus deletes the current rollapp packet and creates a new one with and updated status under a new key. Updating the status should be called only with this method as it effects the key of the packet. The assumption is that the passed rollapp packet status field is not updated directly.

func (*Keeper) ValidateRollappId added in v3.1.0

func (k *Keeper) ValidateRollappId(ctx sdk.Context, rollappID, rollappPortOnHub string, rollappChannelOnHub string) error

ValidateRollappId checks that the rollapp id from the ibc connection matches the rollapp, checking the sequencer registered with the consensus state validator set

func (*Keeper) WriteAcknowledgement

func (k *Keeper) WriteAcknowledgement(ctx sdk.Context, chanCap *capabilitytypes.Capability, packet exported.PacketI, acknowledgement exported.Acknowledgement) error

WriteAcknowledgement wraps IBC ICS4Wrapper WriteAcknowledgement function. ICS29 WriteAcknowledgement is used for asynchronous acknowledgements.

type Querier added in v3.1.0

type Querier struct {
	Keeper
}

func NewQuerier added in v3.1.0

func NewQuerier(k Keeper) Querier

NewQuerier creates a new Querier struct.

func (Querier) GetPackets added in v3.1.0

GetPackets implements types.QueryServer.

func (Querier) Params added in v3.1.0

Jump to

Keyboard shortcuts

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