Documentation
¶
Index ¶
- type IBCMiddleware
- func (im IBCMiddleware) OnAcknowledgementPacket(ctx sdk.Context, sourceClient string, destinationClient string, ...) error
- func (im IBCMiddleware) OnRecvPacket(ctx sdk.Context, sourceClient string, destinationClient string, ...) channeltypesv2.RecvPacketResult
- func (im IBCMiddleware) OnSendPacket(ctx sdk.Context, sourceClient string, destinationClient string, ...) error
- func (im IBCMiddleware) OnTimeoutPacket(ctx sdk.Context, sourceClient string, destinationClient string, ...) error
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.