uniq

package
v0.0.0-...-3f8eaf4 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: GPL-3.0 Imports: 11 Imported by: 1

Documentation

Overview

Package uniq faciliates the extraction of unique addresses from blocks or transactions.

Index

Constants

This section is empty.

Variables

View Source
var AppearanceFmt = "%s\t%09d\t%05d"

Functions

func AddMiner

func AddMiner(chain string, miner base.Address, bn base.Blknum, addrMap AddressBooleanMap) (err error)

AddMiner adds the miner address (for use with post-merge)

func GetUniqAddressesInBlock

func GetUniqAddressesInBlock(chain, flow string, conn *rpc.Connection, procFunc UniqProcFunc, bn uint64) error

func GetUniqAddressesInTransaction

func GetUniqAddressesInTransaction(chain string, procFunc UniqProcFunc, flow string, trans *types.SimpleTransaction, ts int64, addrMap AddressBooleanMap, conn *rpc.Connection) error

func IsImplicitAddress

func IsImplicitAddress(addr string) bool

IsImplicitAddress processes a transaction's 'input' data and 'output' data or an event's data field. Anything with 12 bytes of leading zeros but not more than 19 leading zeros (24 and 38 characters respectively).

func UniqFromReceipts

func UniqFromReceipts(chain string, receipts []types.SimpleReceipt, addrMap AddressBooleanMap) (err error)

UniqFromReceipts extracts addresses from an array of receipts

func UniqFromTraces

func UniqFromTraces(chain string, traces []types.SimpleTrace, addrMap AddressBooleanMap) (err error)

UniqFromTraces extracts addresses from traces

func UniqFromWithdrawals

func UniqFromWithdrawals(chain string, withdrawals []types.SimpleWithdrawal, bn base.Blknum, addrMap AddressBooleanMap) (err error)

UniqFromWithdrawals extracts addresses from an array of receipts

Types

type AddressBooleanMap

type AddressBooleanMap map[string]bool

func (*AddressBooleanMap) Insert

func (a *AddressBooleanMap) Insert(address string, bn uint64, txid uint64) string

Insert generates item's key according to `AppearanceFmt` and adds the item to the map

type UniqProcFunc

type UniqProcFunc func(s *types.SimpleAppearance) error

Jump to

Keyboard shortcuts

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