Documentation ¶
Index ¶
- func FilterEvents[T proto.Message](t *testing.T, allEvents cosmostypes.Events) (parsedEvents []T)
- func GetAttributeValue(event *cosmostypes.Event, key string) (value string, hasAttr bool)
- func NewEventTypeMatchFn(matchEventType string) func(*cosmostypes.Event) bool
- func NewMsgEventMatchFn(matchMsgTypeURL string) func(*cosmostypes.Event) bool
- func QuoteEventMode(event *abci.Event)
- func ResetEventManager(ctx context.Context) (context.Context, cosmostypes.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterEvents ¶
func FilterEvents[T proto.Message]( t *testing.T, allEvents cosmostypes.Events, ) (parsedEvents []T)
FilterEvents filters allEvents, returning list of T type events whose protobuf message type string matches protoType.
func GetAttributeValue ¶ added in v0.0.10
func GetAttributeValue( event *cosmostypes.Event, key string, ) (value string, hasAttr bool)
GetAttributeValue returns the value of the attribute with the given key in the event. The returned attribute value is trimmed of any quotation marks. If the attribute does not exist, hasAttr is false.
func NewEventTypeMatchFn ¶ added in v0.0.10
func NewEventTypeMatchFn(matchEventType string) func(*cosmostypes.Event) bool
NewEventTypeMatchFn returns a function that matches events whose type is "message" and whose "action" attribute matches the given message (protobuf message) type URL.
func NewMsgEventMatchFn ¶ added in v0.0.10
func NewMsgEventMatchFn(matchMsgTypeURL string) func(*cosmostypes.Event) bool
NewMsgEventMatchFn returns a function that matches events whose type equals the given event (protobuf message) type URL.
func QuoteEventMode ¶
QuoteEventMode quotes (i.e. URL escape) the value associated with the 'mode' key in the event. This is injected by the caller that emits the event and causes issues in calling 'ParseTypedEvent'.
func ResetEventManager ¶ added in v0.0.10
ResetEventManager re-initializes the cosmos event manager in the context such that prior event emissions are cleared. It returns the context as both a stdlib and cosmos context types.
Types ¶
This section is empty.