v2

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: Apache-2.0 Imports: 13 Imported by: 10 modules, 5 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IBCMiddleware

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

IBCMiddleware implements the ICS26 callbacks for the transfer middleware given the erc20 keeper and the underlying application. The logics are same as the IBCMiddleware, but this is a v2 version of the middleware

func NewIBCMiddleware

func NewIBCMiddleware(
	app ibcapi.IBCModule,
	k erc20types.Erc20Keeper,
) IBCMiddleware

NewIBCMiddleware creates a new IBCMiddleware given the keeper and underlying application

func (IBCMiddleware) OnAcknowledgementPacket

func (im IBCMiddleware) OnAcknowledgementPacket(
	ctx sdk.Context,
	sourceClient string,
	destinationClient string,
	sequence uint64,
	acknowledgement []byte,
	payload channeltypesv2.Payload,
	relayer sdk.AccAddress,
) error

OnAcknowledgementPacket implements the IBCModule interface. It refunds the token transferred and then automatically converts the Cosmos Coin to their ERC20 token representation.

func (IBCMiddleware) OnRecvPacket

func (im IBCMiddleware) OnRecvPacket(
	ctx sdk.Context,
	sourceClient string,
	destinationClient string,
	sequence uint64,
	payload channeltypesv2.Payload,
	relayer sdk.AccAddress,
) channeltypesv2.RecvPacketResult

OnRecvPacket implements the IBCModule interface. It receives the tokens through the default ICS20 OnRecvPacket callback logic and then automatically converts the Cosmos Coin to their ERC20 token representation. If the acknowledgement fails, this callback will default to the ibc-core packet callback.

func (IBCMiddleware) OnSendPacket

func (im IBCMiddleware) OnSendPacket(
	ctx sdk.Context,
	sourceClient string,
	destinationClient string,
	sequence uint64,
	payload channeltypesv2.Payload,
	signer sdk.AccAddress,
) error

OnSendPacket doesn't do anything in the erc20 middleware.

func (IBCMiddleware) OnTimeoutPacket

func (im IBCMiddleware) OnTimeoutPacket(
	ctx sdk.Context,
	sourceClient string,
	destinationClient string,
	sequence uint64,
	payload channeltypesv2.Payload,
	relayer sdk.AccAddress,
) error

OnTimeoutPacket implements the IBCModule interface. It refunds the token transferred and then automatically converts the Cosmos Coin to their ERC20 token representation.

Jump to

Keyboard shortcuts

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