events

package
v2.0.0-...-662c643 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

README

Convert native events emitted by precompiles to ethereum logs.

Documentation

Index

Constants

This section is empty.

Variables

Functions

func AccAddressFromBech32

func AccAddressFromBech32(address string) (addr sdk.AccAddress, err error)

func ConvertAccAddressFromBech32

func ConvertAccAddressFromBech32(attributeValue string, _ bool) ([]any, error)

func ConvertAmount

func ConvertAmount(attributeValue string, indexed bool) ([]any, error)

func ConvertPacketData

func ConvertPacketData(attributeValue string, indexed bool) ([]any, error)

func ConvertUint64

func ConvertUint64(attributeValue string, _ bool) ([]any, error)

func IcaConvertEvent

func IcaConvertEvent(event sdk.Event) (*ethtypes.Log, error)

func NewEventDescriptors

func NewEventDescriptors(a abi.ABI) map[string]*EventDescriptor

func RelayerConvertEvent

func RelayerConvertEvent(event sdk.Event) (*ethtypes.Log, error)

func ReturnStringAsIs

func ReturnStringAsIs(attributeValue string, _ bool) ([]any, error)

Types

type EventDescriptor

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

EventDescriptor describes how to convert an native event to a eth log

func (*EventDescriptor) ConvertEvent

func (desc *EventDescriptor) ConvertEvent(
	event []abci.EventAttribute,
	valueDecoders ValueDecoders,
) (*ethtypes.Log, error)

type ValueDecoder

type ValueDecoder func(attributeValue string, indexed bool) (ethPrimitives []any, err error)

type ValueDecoders

type ValueDecoders map[string]ValueDecoder

func (ValueDecoders) GetDecoder

func (d ValueDecoders) GetDecoder(name string) (ValueDecoder, bool)

Jump to

Keyboard shortcuts

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