keeper

package
v4.4.2 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: Apache-2.0 Imports: 9 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 {
	// embed the ICS-20 transfer keeper
	ibctransferkeeper.Keeper
	// contains filtered or unexported fields
}

Keeper embeds the ICS-20 transfer keeper where we only override specific methods.

func (Keeper) OnRecvPacket

func (k Keeper) OnRecvPacket(
	ctx sdk.Context,
	packet channeltypes.Packet,
	data ibctransfertypes.FungibleTokenPacketData,
) error

OnRecvPacket delegates the OnRecvPacket call to the embedded ICS-20 transfer module and updates metadata if successful.

func (Keeper) PostOnRecvPacket

func (k Keeper) PostOnRecvPacket(
	ctx sdk.Context,
	packet channeltypes.Packet,
	data ibctransfertypes.FungibleTokenPacketData,
)

PostOnRecvPacket executes arbitrary logic after a successful OnRecvPacket call. Currently, it checks and adds denomination metadata upon receiving an IBC asset.

func (Keeper) TrackDenomMetadata

func (k Keeper) TrackDenomMetadata(ctx sdk.Context, denomTrace ibctransfertypes.DenomTrace)

TrackDenomMetadata checks for the metadata existence of an IBC transferred asset and if it does not exist, it attempts to add it. Note, we cannot infer the exponent or any units so we default to zero.

func (Keeper) Transfer added in v4.3.0

Transfer defines a rpc handler method for MsgTransfer.

type LeverageKeeper added in v4.3.0

type LeverageKeeper interface {
	GetTokenSettings(ctx sdk.Context, baseDenom string) (ltypes.Token, error)
}

Jump to

Keyboard shortcuts

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