keeper

package
v4.0.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 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) SendTransfer

func (k Keeper) SendTransfer(
	ctx sdk.Context,
	sourcePort,
	sourceChannel string,
	token sdk.Coin,
	sender sdk.AccAddress,
	receiver string,
	timeoutHeight clienttypes.Height,
	timeoutTimestamp uint64,
) error

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

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.

Jump to

Keyboard shortcuts

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