quota

package
v6.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateReceiverAddress

func ValidateReceiverAddress(packet channeltypes.Packet) error

Types

type ICS20Module

type ICS20Module struct {
	porttypes.IBCModule
	// contains filtered or unexported fields
}

ICS20Module overwrites OnAcknowledgementPacket and OnTimeoutPacket to revert quota update on acknowledgement error or timeout.

func NewICS20Module

func NewICS20Module(app porttypes.IBCModule, k keeper.Builder, cdc codec.JSONCodec) ICS20Module

NewICS20Module is an IBCMiddlware constructor. `app` must be an ICS20 app.

func (ICS20Module) OnAcknowledgementPacket

func (im ICS20Module) OnAcknowledgementPacket(ctx sdk.Context, packet channeltypes.Packet, acknowledgement []byte,
	relayer sdk.AccAddress,
) error

OnAcknowledgementPacket implements types.Middleware

func (ICS20Module) OnRecvPacket

func (im ICS20Module) OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress,
) exported.Acknowledgement

OnRecvPacket implements types.Middleware

func (ICS20Module) OnTimeoutPacket

func (im ICS20Module) OnTimeoutPacket(ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress) error

OnTimeoutPacket implements types.Middleware

type ICS4

type ICS4 struct {
	porttypes.ICS4Wrapper
	// contains filtered or unexported fields
}

ICS4 wraps SendPacket to check IBC quota.

func NewICS4

func NewICS4(parent porttypes.ICS4Wrapper, kb keeper.Builder) ICS4

func (ICS4) SendPacket

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

SendPacket implements types.Middleware

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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