keeper

package
v7.3.0-rc3 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: Apache-2.0 Imports: 29 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 {
	ibctransferkeeper.Keeper
	// contains filtered or unexported fields
}

Keeper defines the IBC fungible transfer keeper

func NewKeeper

NewKeeper creates a new IBC transfer Keeper instance

func (Keeper) GetAppVersion

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

func (Keeper) HandlerIbcCall

func (k Keeper) HandlerIbcCall(ctx sdk.Context, sourcePort, sourceChannel string, data types.FungibleTokenPacketData) error

func (Keeper) HandlerIbcCallEvm

func (k Keeper) HandlerIbcCallEvm(ctx sdk.Context, sender common.Address, evmPacket *types.IbcCallEvmPacket) error

func (Keeper) Logger

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

Logger returns a module-specific logger.

func (Keeper) OnAcknowledgementPacket

func (k Keeper) OnAcknowledgementPacket(ctx sdk.Context, packet channeltypes.Packet, data types.FungibleTokenPacketData, ack channeltypes.Acknowledgement) error

OnAcknowledgementPacket responds to the the success or failure of a packet acknowledgement written on the receiving chain. If the acknowledgement was a success then nothing occurs. If the acknowledgement failed, then the sender is refunded their tokens using the refundPacketToken function.

func (Keeper) OnRecvPacket

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

OnRecvPacket processes a cross chain fungible token transfer. If the sender chain is the source of minted tokens then vouchers will be minted and sent to the receiving address. Otherwise if the sender chain is sending back tokens this chain originally transferred to it, the tokens are unescrowed and sent to the receiving address.

func (Keeper) OnTimeoutPacket

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

OnTimeoutPacket refunds the sender since the original packet sent was never received and has been timed out.

func (Keeper) SendPacket

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

SendPacket implements the ICS4Wrapper interface from the transfer module. It calls the underlying SendPacket function directly to move down the middleware stack. Without SendPacket, this module would be skipped, when sending packages from the transferKeeper to core IBC.

func (Keeper) SetErc20Keeper

func (k Keeper) SetErc20Keeper(erc20Keeper types.Erc20Keeper) Keeper

func (Keeper) SetEvmKeeper

func (k Keeper) SetEvmKeeper(evmKeeper types.EvmKeeper) Keeper

func (Keeper) SetRefundHook

func (k Keeper) SetRefundHook(hook types.RefundHook) Keeper

func (Keeper) SetRouter

func (k Keeper) SetRouter(rtr types.Router) Keeper

SetRouter sets the Router in IBC Transfer Keeper and seals it. The method panics if there is an existing router that's already sealed.

func (Keeper) Transfer

Transfer defines a rpc handler method for MsgTransfer.

func (Keeper) WriteAcknowledgement

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

WriteAcknowledgement implements the ICS4Wrapper interface from the transfer module. It calls the underlying WriteAcknowledgement function directly to move down the middleware stack.

Jump to

Keyboard shortcuts

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