uevent

package
v0.2.12 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: MIT Imports: 9 Imported by: 16

Documentation

Index

Constants

View Source
const (
	EventTypeError = "error"

	AttributeKeyError  = "message"
	AttributeKeyHeight = "height"
)

Variables

This section is empty.

Functions

func EmitErrorEvent

func EmitErrorEvent(ctx sdk.Context, err error)

EmitErrorEvent emits an error event. Example of an error event:

- attributes:

  • key: ibccallbackerror-height value: "439"
  • key: ibccallbackerror-message value: 'transfer genesis: get valid transfer: get rollapp id: rollapp canonical channel mapping has not been set: rollappeve_1235-1: unmet precondition' type: ibccallbackerror-error

Example query to get the error event: dymd q txs --events ibccallbackerror-error.ibccallbackerror-height=439

func EmitTypedEvent

func EmitTypedEvent(ctx sdk.Context, tev proto.Message) error

EmitTypedEvent takes a typed event and emits it. The original EmitTypedEvent from cosmos-sdk adds double quotes around the string attributes, which makes it difficult, if not impossible to query/subscribe to those events. See https://github.com/cosmos/cosmos-sdk/issues/12592 and https://github.com/dymensionxyz/sdk-utils/pull/5#discussion_r1724688379

func NewErrorAcknowledgement

func NewErrorAcknowledgement(ctx sdk.Context, err error) types.Acknowledgement

NewErrorAcknowledgement wraps the standard error acknowledgement with an error event.

func TypedEventToEvent

func TypedEventToEvent(tev proto.Message) (ev sdk.Event, err error)

TypedEventToEvent takes typed event and converts to Event object

Types

This section is empty.

Jump to

Keyboard shortcuts

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