decoders

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: May 25, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NotFound = errors.New("resource not found")
)
View Source
var (
	ZeroAddress = utils.NamedAddr{
		Name: "Zero Address",
		Addr: utils.ZeroAddress,
		Type: utils.ZeroAddressRecipient,
		Tags: []string{"zero_address", "burn", "genesis"},
	}
)

Functions

func DecodeAddress

func DecodeAddress(ctx context.Context, networkId utils.NetworkID, pool *clients.ClientPool, dbA db.Adapter, addr common.Address) (*utils.NamedAddr, error)

DecodeAddress decodes an Ethereum address into a more informative structure that includes possible names, types, and other relevant metadata such as ENS names or related tags. It utilizes a client pool to interact with the Ethereum network, queries the ENS (Ethereum Name Service), and checks the blockchain and a local database for additional metadata about the address.

Types

type LogDecoder

type LogDecoder struct {
	Signature common.Hash   `json:"signature"`
	LogTx     *bytecode.Log `json:"log"`
	Event     *models.Event `json:"event"`
}

func DecodeLog

func DecodeLog(ctx context.Context, networkId utils.NetworkID, pool *clients.ClientPool, dbA db.Adapter, addr *utils.NamedAddr, log *types.Log) (*LogDecoder, error)

type TransactionDecoder

type TransactionDecoder struct {
	Signature  string                `json:"signature"`
	BytecodeTx *bytecode.Transaction `json:"bytecode"`
	Fn         *models.Function      `json:"function"`
}

func DecodeTransaction

func DecodeTransaction(ctx context.Context, networkId utils.NetworkID, pool *clients.ClientPool, dbA db.Adapter, senderAddr, recipientAddr *utils.NamedAddr, data []byte) (*TransactionDecoder, error)

Jump to

Keyboard shortcuts

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