types

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

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

Go to latest
Published: Sep 1, 2024 License: GPL-3.0 Imports: 17 Imported by: 12

Documentation

Overview

Package types provides types that allow for a layer of abstraction over the internal types. This makes exporting easier.

Index

Constants

View Source
const (
	// below are stored in cache, do not change
	BlockReward     base.Txnum = 99999 // the largest five-digit decimal number
	UncleReward     base.Txnum = 99998
	MisconfigReward base.Txnum = 99997
	ExternalReward  base.Txnum = 99996
	WithdrawalAmt   base.Txnum = 99995
	// above are stored in cache, do not change
	NephewReward base.Txnum = 99994
	TxFeeReward  base.Txnum = 99993
)

Variables

View Source
var AppMapSize int = 20

TODO: Do we want this to be configurable? Maybe, maybe not

Functions

func AbiBy

func AbiBy(field AbiField, order SortOrder) func(p1, p2 Abi) bool

AbiBy returns a comparison function for sorting Abi instances by the given field. These comparison functions may be strung together by the CmdAbis function.

func AbiCmp

func AbiCmp(slice []Abi, orders ...func(p1, p2 Abi) bool) func(i, j int) bool

AbiCmp accepts a slice and variadic comparison functions and returns a functions that can be used to sort the slice.

func AsSliceOfMaps

func AsSliceOfMaps[T MappedType](apps []Appearance, reversed bool) ([]map[Appearance]*T, int, error)

func ChunkRecordBy

func ChunkRecordBy(field ChunkRecordField, order SortOrder) func(p1, p2 ChunkRecord) bool

ChunkRecordBy returns a comparison function for sorting ChunkRecord instances by the given field. These comparison functions may be strung together by the CmdChunkRecords function.

func ChunkRecordCmp

func ChunkRecordCmp(slice []ChunkRecord, orders ...func(p1, p2 ChunkRecord) bool) func(i, j int) bool

ChunkRecordCmp accepts a slice and variadic comparison functions and returns a functions that can be used to sort the slice.

func ChunkStatsBy

func ChunkStatsBy(field ChunkStatsField, order SortOrder) func(p1, p2 ChunkStats) bool

ChunkStatsBy returns a comparison function for sorting ChunkStats instances by the given field. These comparison functions may be strung together by the CmdChunkStats function.

func ChunkStatsCmp

func ChunkStatsCmp(slice []ChunkStats, orders ...func(p1, p2 ChunkStats) bool) func(i, j int) bool

ChunkStatsCmp accepts a slice and variadic comparison functions and returns a functions that can be used to sort the slice.

func FormattedTag

func FormattedTag(verbose bool, hash base.Hash) string

EXISTING_CODE

func FunctionBy

func FunctionBy(field FunctionField, order SortOrder) func(p1, p2 Function) bool

FunctionBy returns a comparison function for sorting Function instances by the given field. These comparison functions may be strung together by the CmdFunctions function.

func FunctionCmp

func FunctionCmp(slice []Function, orders ...func(p1, p2 Function) bool) func(i, j int) bool

FunctionCmp accepts a slice and variadic comparison functions and returns a functions that can be used to sort the slice.

func IsTokenFunction

func IsTokenFunction(needle string) bool

func IsValidAbiField

func IsValidAbiField(field string) bool

IsValidAbiField returns true if the given field is a valid sortable Abi field.

func IsValidChunkRecordField

func IsValidChunkRecordField(field string) bool

IsValidChunkRecordField returns true if the given field is a valid sortable ChunkRecord field.

func IsValidChunkStatsField

func IsValidChunkStatsField(field string) bool

IsValidChunkStatsField returns true if the given field is a valid sortable ChunkStats field.

func IsValidFunctionField

func IsValidFunctionField(field string) bool

IsValidFunctionField returns true if the given field is a valid sortable Function field.

func IsValidNameField

func IsValidNameField(field string) bool

IsValidNameField returns true if the given field is a valid sortable Name field.

func NameBy

func NameBy(field NameField, order SortOrder) func(p1, p2 Name) bool

NameBy returns a comparison function for sorting Name instances by the given field. These comparison functions may be strung together by the CmdNames function.

func NameCmp

func NameCmp(slice []Name, orders ...func(p1, p2 Name) bool) func(i, j int) bool

NameCmp accepts a slice and variadic comparison functions and returns a functions that can be used to sort the slice.

Types

type Abi

type Abi struct {
	Address        base.Address `json:"address"`
	FileSize       int64        `json:"fileSize"`
	Functions      []Function   `json:"functions"`
	HasConstructor bool         `json:"hasConstructor"`
	HasFallback    bool         `json:"hasFallback"`
	IsEmpty        bool         `json:"isEmpty"`
	IsKnown        bool         `json:"isKnown"`
	LastModDate    string       `json:"lastModDate"`
	NEvents        int64        `json:"nEvents"`
	NFunctions     int64        `json:"nFunctions"`
	Name           string       `json:"name"`
	Path           string       `json:"path"`
}

func (*Abi) FinishUnmarshal

func (s *Abi) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*Abi) Model

func (s *Abi) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (Abi) String

func (s Abi) String() string

type AbiField

type AbiField string
const (
	AbiAddress        AbiField = "address"
	AbiFileSize       AbiField = "fileSize"
	AbiHasConstructor AbiField = "hasConstructor"
	AbiHasFallback    AbiField = "hasFallback"
	AbiIsEmpty        AbiField = "isEmpty"
	AbiIsKnown        AbiField = "isKnown"
	AbiLastModDate    AbiField = "lastModDate"
	AbiNEvents        AbiField = "nEvents"
	AbiNFunctions     AbiField = "nFunctions"
	AbiName           AbiField = "name"
)

Fields in the Abi struct available for sorting.

type AddrRecord

type AddrRecord struct {
	Address base.Address `json:"address"`
	Offset  uint32       `json:"offset"`
	Count   uint32       `json:"count"`
}

type AppRecord

type AppRecord struct {
	BlockNumber      uint32 `json:"blockNumber"`
	TransactionIndex uint32 `json:"transactionIndex"`
}

type Appearance

type Appearance struct {
	Address          base.Address   `json:"address"`
	BlockNumber      uint32         `json:"blockNumber"`
	Reason           string         `json:"reason,omitempty"`
	Timestamp        base.Timestamp `json:"timestamp"`
	TraceIndex       uint32         `json:"traceIndex,omitempty"`
	TransactionIndex uint32         `json:"transactionIndex"`
}

func (*Appearance) Date

func (s *Appearance) Date() string

func (*Appearance) FinishUnmarshal

func (s *Appearance) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*Appearance) GetKey

func (s *Appearance) GetKey() string

func (*Appearance) Model

func (s *Appearance) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (*Appearance) Orig

func (s *Appearance) Orig() string

func (Appearance) String

func (s Appearance) String() string

type AppearanceTable

type AppearanceTable struct {
	AddressRecord AddrRecord  `json:"AddressRecord"`
	Appearances   []AppRecord `json:"Appearances"`
}

func (*AppearanceTable) FinishUnmarshal

func (s *AppearanceTable) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*AppearanceTable) Model

func (s *AppearanceTable) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (AppearanceTable) String

func (s AppearanceTable) String() string

type Block

type Block struct {
	BaseFeePerGas base.Gas       `json:"baseFeePerGas"`
	BlockNumber   base.Blknum    `json:"blockNumber"`
	Difficulty    base.Value     `json:"difficulty"`
	GasLimit      base.Gas       `json:"gasLimit"`
	GasUsed       base.Gas       `json:"gasUsed"`
	Hash          base.Hash      `json:"hash"`
	Miner         base.Address   `json:"miner"`
	ParentHash    base.Hash      `json:"parentHash"`
	Timestamp     base.Timestamp `json:"timestamp"`
	Transactions  []Transaction  `json:"transactions"`
	Uncles        []base.Hash    `json:"uncles,omitempty"`
	Withdrawals   []Withdrawal   `json:"withdrawals,omitempty"`
	// EXISTING_CODE
	Number base.Blknum `json:"number"`
}

func (*Block) CacheLocations

func (s *Block) CacheLocations() (string, string, string)

func (*Block) Date

func (s *Block) Date() string

func (*Block) FinishUnmarshal

func (s *Block) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*Block) MarshalCache

func (s *Block) MarshalCache(writer io.Writer) (err error)

func (*Block) Model

func (s *Block) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (Block) String

func (s Block) String() string

func (*Block) UnmarshalCache

func (s *Block) UnmarshalCache(vers uint64, reader io.Reader) (err error)

type BlockCount

type BlockCount struct {
	AddressCnt      uint64         `json:"addressCnt,omitempty"`
	BlockNumber     base.Blknum    `json:"blockNumber"`
	LogsCnt         uint64         `json:"logsCnt,omitempty"`
	Timestamp       base.Timestamp `json:"timestamp"`
	TracesCnt       uint64         `json:"tracesCnt,omitempty"`
	TransactionsCnt uint64         `json:"transactionsCnt"`
	UnclesCnt       uint64         `json:"unclesCnt,omitempty"`
	WithdrawalsCnt  uint64         `json:"withdrawalsCnt,omitempty"`
}

func (*BlockCount) Date

func (s *BlockCount) Date() string

func (*BlockCount) FinishUnmarshal

func (s *BlockCount) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*BlockCount) Model

func (s *BlockCount) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (BlockCount) String

func (s BlockCount) String() string

type Bounds

type Bounds struct {
	Count     uint64         `json:"count"`
	FirstApp  Appearance     `json:"firstApp"`
	FirstTs   base.Timestamp `json:"firstTs"`
	LatestApp Appearance     `json:"latestApp"`
	LatestTs  base.Timestamp `json:"latestTs"`
}

func (*Bounds) FinishUnmarshal

func (s *Bounds) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*Bounds) Model

func (s *Bounds) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (Bounds) String

func (s Bounds) String() string

type CacheItem

type CacheItem struct {
	Items         []any  `json:"items"`
	LastCached    string `json:"lastCached,omitempty"`
	NFiles        uint64 `json:"nFiles"`
	NFolders      uint64 `json:"nFolders"`
	Path          string `json:"path"`
	SizeInBytes   int64  `json:"sizeInBytes"`
	CacheItemType string `json:"type"`
}

func (*CacheItem) FinishUnmarshal

func (s *CacheItem) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*CacheItem) Model

func (s *CacheItem) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (CacheItem) String

func (s CacheItem) String() string

type Chain

type Chain struct {
	Chain          string `json:"chain"`
	ChainId        uint64 `json:"chainId"`
	IpfsGateway    string `json:"ipfsGateway"`
	LocalExplorer  string `json:"localExplorer"`
	RemoteExplorer string `json:"remoteExplorer"`
	RpcProvider    string `json:"rpcProvider"`
	Symbol         string `json:"symbol"`
}

func (*Chain) FinishUnmarshal

func (s *Chain) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*Chain) Model

func (s *Chain) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (Chain) String

func (s Chain) String() string

type ChunkAddress

type ChunkAddress struct {
	Address    base.Address `json:"address"`
	Count      uint64       `json:"count"`
	Offset     uint64       `json:"offset"`
	Range      string       `json:"range"`
	RangeDates RangeDates   `json:"rangeDates"`
}

func (*ChunkAddress) FinishUnmarshal

func (s *ChunkAddress) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*ChunkAddress) Model

func (s *ChunkAddress) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (ChunkAddress) String

func (s ChunkAddress) String() string

type ChunkAppearance

type ChunkAppearance = Appearance

type ChunkBloom

type ChunkBloom struct {
	ByteWidth  uint64     `json:"byteWidth"`
	Hash       base.Hash  `json:"hash"`
	Magic      string     `json:"magic"`
	NBlooms    uint64     `json:"nBlooms"`
	NInserted  uint64     `json:"nInserted"`
	Range      string     `json:"range"`
	RangeDates RangeDates `json:"rangeDates"`
	Size       uint64     `json:"size"`
}

func (*ChunkBloom) FinishUnmarshal

func (s *ChunkBloom) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*ChunkBloom) Model

func (s *ChunkBloom) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (ChunkBloom) String

func (s ChunkBloom) String() string

type ChunkIndex

type ChunkIndex struct {
	Hash         base.Hash  `json:"hash"`
	Magic        string     `json:"magic"`
	NAddresses   uint64     `json:"nAddresses"`
	NAppearances uint64     `json:"nAppearances"`
	Range        string     `json:"range"`
	RangeDates   RangeDates `json:"rangeDates"`
	Size         uint64     `json:"size"`
}

func (*ChunkIndex) FinishUnmarshal

func (s *ChunkIndex) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*ChunkIndex) Model

func (s *ChunkIndex) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (ChunkIndex) String

func (s ChunkIndex) String() string

type ChunkManifest

type ChunkManifest = Manifest

type ChunkPin

type ChunkPin struct {
	Chain         string        `json:"chain"`
	ManifestHash  base.IpfsHash `json:"manifestHash"`
	SpecHash      base.IpfsHash `json:"specHash"`
	TimestampHash base.IpfsHash `json:"timestampHash"`
	Version       string        `json:"version"`
}

func (*ChunkPin) FinishUnmarshal

func (s *ChunkPin) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*ChunkPin) Model

func (s *ChunkPin) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (ChunkPin) String

func (s ChunkPin) String() string

type ChunkRecord

type ChunkRecord struct {
	BloomHash  base.IpfsHash `json:"bloomHash"`
	BloomSize  int64         `json:"bloomSize"`
	IndexHash  base.IpfsHash `json:"indexHash"`
	IndexSize  int64         `json:"indexSize"`
	Range      string        `json:"range"`
	RangeDates RangeDates    `json:"rangeDates"`
}

func (*ChunkRecord) FinishUnmarshal

func (s *ChunkRecord) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*ChunkRecord) Model

func (s *ChunkRecord) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (ChunkRecord) String

func (s ChunkRecord) String() string

type ChunkRecordField

type ChunkRecordField string
const (
	ChunkRecordBloomSize  ChunkRecordField = "bloomSize"
	ChunkRecordIndexSize  ChunkRecordField = "indexSize"
	ChunkRecordRange      ChunkRecordField = "range"
	ChunkRecordRangeDates ChunkRecordField = "rangeDates"
)

Fields in the ChunkRecord struct available for sorting.

type ChunkStats

type ChunkStats struct {
	AddrsPerBlock float64    `json:"addrsPerBlock"`
	AppsPerAddr   float64    `json:"appsPerAddr"`
	AppsPerBlock  float64    `json:"appsPerBlock"`
	BloomSz       uint64     `json:"bloomSz"`
	ChunkSz       uint64     `json:"chunkSz"`
	NAddrs        uint64     `json:"nAddrs"`
	NApps         uint64     `json:"nApps"`
	NBlocks       uint64     `json:"nBlocks"`
	NBlooms       uint64     `json:"nBlooms"`
	Range         string     `json:"range"`
	RangeDates    RangeDates `json:"rangeDates"`
	Ratio         float64    `json:"ratio"`
	RecWid        uint64     `json:"recWid"`
}

func (*ChunkStats) FinishUnmarshal

func (s *ChunkStats) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*ChunkStats) Model

func (s *ChunkStats) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (ChunkStats) String

func (s ChunkStats) String() string

type ChunkStatsField

type ChunkStatsField string
const (
	ChunkStatsAddrsPerBlock ChunkStatsField = "addrsPerBlock"
	ChunkStatsAppsPerAddr   ChunkStatsField = "appsPerAddr"
	ChunkStatsAppsPerBlock  ChunkStatsField = "appsPerBlock"
	ChunkStatsBloomSz       ChunkStatsField = "bloomSz"
	ChunkStatsChunkSz       ChunkStatsField = "chunkSz"
	ChunkStatsNAddrs        ChunkStatsField = "nAddrs"
	ChunkStatsNApps         ChunkStatsField = "nApps"
	ChunkStatsNBlocks       ChunkStatsField = "nBlocks"
	ChunkStatsNBlooms       ChunkStatsField = "nBlooms"
	ChunkStatsRange         ChunkStatsField = "range"
	ChunkStatsRangeDates    ChunkStatsField = "rangeDates"
	ChunkStatsRatio         ChunkStatsField = "ratio"
)

Fields in the ChunkStats struct available for sorting.

type Count

type Count struct {
	Count uint64 `json:"count"`
}

func (*Count) FinishUnmarshal

func (s *Count) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*Count) Model

func (s *Count) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (Count) String

func (s Count) String() string

type Function

type Function struct {
	Anonymous       bool        `json:"anonymous,omitempty"`
	Constant        bool        `json:"constant,omitempty"`
	Encoding        string      `json:"encoding"`
	Inputs          []Parameter `json:"inputs"`
	Message         string      `json:"message,omitempty"`
	Name            string      `json:"name"`
	Outputs         []Parameter `json:"outputs"`
	Signature       string      `json:"signature,omitempty"`
	StateMutability string      `json:"stateMutability,omitempty"`
	FunctionType    string      `json:"type"`
	// contains filtered or unexported fields
}

func FunctionFromAbiEvent

func FunctionFromAbiEvent(ethEvent *abi.Event) *Function

func FunctionFromAbiMethod

func FunctionFromAbiMethod(ethMethod *abi.Method) *Function

FunctionFromAbiMethod converts go-ethereum's abi.Method to our Function

func (*Function) AbiEventFromFunction

func (s *Function) AbiEventFromFunction() (ethMethod *abi.Event, err error)

func (*Function) AbiMethodFromFunction

func (s *Function) AbiMethodFromFunction() (ethMethod *abi.Method, err error)

func (*Function) Clone

func (s *Function) Clone() *Function

func (*Function) FinishUnmarshal

func (s *Function) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*Function) GetAbiEvent

func (s *Function) GetAbiEvent() (abiEvent *abi.Event, err error)

func (*Function) GetAbiMethod

func (s *Function) GetAbiMethod() (abiMethod *abi.Method, err error)

func (*Function) IsMethod

func (s *Function) IsMethod() bool

func (*Function) MarshalCache

func (s *Function) MarshalCache(writer io.Writer) (err error)

func (*Function) Model

func (s *Function) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (*Function) Normalize

func (s *Function) Normalize()

Normalize sets StateMutability from `payable` field. It is only useful when reading ABIs generated before Solidity 0.5.0, which use `payable` field: https://docs.soliditylang.org/en/develop/050-breaking-changes.html#command-line-and-json-interfaces

func (*Function) Pack

func (s *Function) Pack(callArguments []any) (packed []byte, err error)

Pack encodes function call

func (*Function) SetAbiEvent

func (s *Function) SetAbiEvent(event *abi.Event)

func (*Function) SetAbiMethod

func (s *Function) SetAbiMethod(method *abi.Method)

func (Function) String

func (s Function) String() string

func (*Function) UnmarshalCache

func (s *Function) UnmarshalCache(vers uint64, reader io.Reader) (err error)

type FunctionField

type FunctionField string
const (
	FunctionEncoding        FunctionField = "encoding"
	FunctionName            FunctionField = "name"
	FunctionSignature       FunctionField = "signature"
	FunctionStateMutability FunctionField = "stateMutability"
	FunctionType            FunctionField = "type"
)

Fields in the Function struct available for sorting.

type IpfsPin

type IpfsPin struct {
	Cid        base.IpfsHash `json:"cid"`
	DatePinned string        `json:"datePinned"`
	FileName   string        `json:"fileName"`
	Size       int64         `json:"size"`
	Status     string        `json:"status"`
}

func (*IpfsPin) FinishUnmarshal

func (s *IpfsPin) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*IpfsPin) Model

func (s *IpfsPin) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (IpfsPin) String

func (s IpfsPin) String() string

type Ledgerer

type Ledgerer interface {
	Prev() base.Blknum
	Cur() base.Blknum
	Next() base.Blknum
}

type LightBlock

type LightBlock struct {
	BaseFeePerGas base.Gas       `json:"baseFeePerGas"`
	BlockNumber   base.Blknum    `json:"blockNumber"`
	Difficulty    base.Value     `json:"difficulty"`
	GasLimit      base.Gas       `json:"gasLimit"`
	GasUsed       base.Gas       `json:"gasUsed"`
	Hash          base.Hash      `json:"hash"`
	Miner         base.Address   `json:"miner"`
	ParentHash    base.Hash      `json:"parentHash"`
	Timestamp     base.Timestamp `json:"timestamp"`
	Transactions  []string       `json:"transactions"`
	Uncles        []base.Hash    `json:"uncles,omitempty"`
	Withdrawals   []Withdrawal   `json:"withdrawals,omitempty"`
	// EXISTING_CODE
	Number base.Blknum `json:"number"`
}

func (*LightBlock) CacheLocations

func (s *LightBlock) CacheLocations() (string, string, string)

func (*LightBlock) Date

func (s *LightBlock) Date() string

func (*LightBlock) FinishUnmarshal

func (s *LightBlock) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*LightBlock) MarshalCache

func (s *LightBlock) MarshalCache(writer io.Writer) (err error)

func (*LightBlock) Model

func (s *LightBlock) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (LightBlock) String

func (s LightBlock) String() string

func (*LightBlock) UnmarshalCache

func (s *LightBlock) UnmarshalCache(vers uint64, reader io.Reader) (err error)

type Log

type Log struct {
	Address          base.Address   `json:"address"`
	ArticulatedLog   *Function      `json:"articulatedLog,omitempty"`
	BlockHash        base.Hash      `json:"blockHash"`
	BlockNumber      base.Blknum    `json:"blockNumber"`
	Data             string         `json:"data,omitempty"`
	LogIndex         base.Lognum    `json:"logIndex"`
	Timestamp        base.Timestamp `json:"timestamp,omitempty"`
	Topics           []base.Hash    `json:"topics,omitempty"`
	TransactionHash  base.Hash      `json:"transactionHash"`
	TransactionIndex base.Txnum     `json:"transactionIndex"`
}

func (*Log) Date

func (s *Log) Date() string

func (*Log) FinishUnmarshal

func (s *Log) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*Log) MarshalCache

func (s *Log) MarshalCache(writer io.Writer) (err error)

func (*Log) Model

func (s *Log) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (Log) String

func (s Log) String() string

func (*Log) UnmarshalCache

func (s *Log) UnmarshalCache(vers uint64, reader io.Reader) (err error)

type LogGroup

type LogGroup struct {
	BlockNumber      base.Blknum
	TransactionIndex base.Txnum
	Logs             []Log
}

func (*LogGroup) CacheLocations

func (s *LogGroup) CacheLocations() (string, string, string)

func (*LogGroup) MarshalCache

func (s *LogGroup) MarshalCache(writer io.Writer) (err error)

func (*LogGroup) UnmarshalCache

func (s *LogGroup) UnmarshalCache(vers uint64, reader io.Reader) (err error)

type Manifest

type Manifest struct {
	Chain         string        `json:"chain"`
	Chunks        []ChunkRecord `json:"chunks"`
	Specification base.IpfsHash `json:"specification"`
	Version       string        `json:"version"`
}

func (*Manifest) FinishUnmarshal

func (s *Manifest) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*Manifest) Model

func (s *Manifest) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (Manifest) String

func (s Manifest) String() string

type MappedType

type MappedType interface {
	Transaction |
		Block |
		LightBlock |
		Appearance |
		Withdrawal |
		[]Result |
		Token |
		bool
}

type Message

type Message struct {
	Msg string `json:"msg,omitempty"`
	Num int64  `json:"num,omitempty"`
}

func (*Message) FinishUnmarshal

func (s *Message) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*Message) Model

func (s *Message) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (Message) String

func (s Message) String() string

type MetaData

type MetaData struct {
	Latest    base.Blknum `json:"client"`
	Finalized base.Blknum `json:"finalized"`
	Staging   base.Blknum `json:"staging"`
	Ripe      base.Blknum `json:"ripe"`
	Unripe    base.Blknum `json:"unripe"`
	ChainId   uint64      `json:"chainId,omitempty"`
	NetworkId uint64      `json:"networkId,omitempty"`
	Chain     string      `json:"chain,omitempty"`
}

func (*MetaData) ChainHeight

func (m *MetaData) ChainHeight() base.Blknum

ChainHeight returns the block after the height of the index.

func (*MetaData) IndexHeight

func (m *MetaData) IndexHeight() base.Blknum

Highest returns the height of the index (i.e., max between the finalized, staging, and ripe indexes).

func (*MetaData) NextIndexHeight

func (m *MetaData) NextIndexHeight() base.Blknum

NextIndexHeight returns the block after the height of the index.

func (*MetaData) StageHeight

func (m *MetaData) StageHeight() base.Blknum

StageHeight returns the highest block that's been staged

func (*MetaData) String

func (m *MetaData) String() string

type Model

type Model struct {
	Data  map[string]any
	Order []string
}

type Modeler

type Modeler interface {
	Model(chain, format string, verbose bool, extraOpts map[string]any) Model
}

type Monitor

type Monitor struct {
	Address     base.Address `json:"address"`
	Deleted     bool         `json:"deleted"`
	FileSize    int64        `json:"fileSize"`
	IsEmpty     bool         `json:"isEmpty"`
	IsStaged    bool         `json:"isStaged"`
	LastScanned uint32       `json:"lastScanned"`
	NRecords    int64        `json:"nRecords"`
	Name        string       `json:"name"`
}

func (*Monitor) FinishUnmarshal

func (s *Monitor) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*Monitor) MarshalCache

func (s *Monitor) MarshalCache(writer io.Writer) (err error)

func (*Monitor) Model

func (s *Monitor) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (Monitor) String

func (s Monitor) String() string

func (*Monitor) UnmarshalCache

func (s *Monitor) UnmarshalCache(vers uint64, reader io.Reader) (err error)

type MonitorClean

type MonitorClean struct {
	Address  base.Address `json:"address"`
	Dups     int64        `json:"dups"`
	Removed  bool         `json:"removed"`
	SizeNow  int64        `json:"sizeNow"`
	SizeThen int64        `json:"sizeThen"`
	Staged   bool         `json:"staged"`
}

func (*MonitorClean) FinishUnmarshal

func (s *MonitorClean) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*MonitorClean) Model

func (s *MonitorClean) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (MonitorClean) String

func (s MonitorClean) String() string

type Name

type Name struct {
	Address    base.Address `json:"address"`
	Decimals   uint64       `json:"decimals"`
	Deleted    bool         `json:"deleted,omitempty"`
	IsContract bool         `json:"isContract,omitempty"`
	IsCustom   bool         `json:"isCustom,omitempty"`
	IsErc20    bool         `json:"isErc20,omitempty"`
	IsErc721   bool         `json:"isErc721,omitempty"`
	IsPrefund  bool         `json:"isPrefund,omitempty"`
	Name       string       `json:"name"`
	Source     string       `json:"source"`
	Symbol     string       `json:"symbol"`
	Tags       string       `json:"tags"`
	// EXISTING_CODE
	Prefund base.Wei `json:"prefund,omitempty"`
	Parts   Parts    `json:"parts,omitempty"`
}

func (*Name) FinishUnmarshal

func (s *Name) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*Name) Model

func (s *Name) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (Name) String

func (s Name) String() string

type NameField

type NameField string
const (
	NameAddress    NameField = "address"
	NameDecimals   NameField = "decimals"
	NameDeleted    NameField = "deleted"
	NameIsContract NameField = "isContract"
	NameIsCustom   NameField = "isCustom"
	NameIsErc20    NameField = "isErc20"
	NameIsErc721   NameField = "isErc721"
	NameIsPrefund  NameField = "isPrefund"
	NameName       NameField = "name"
	NameSource     NameField = "source"
	NameSymbol     NameField = "symbol"
	NameTags       NameField = "tags"
)

Fields in the Name struct available for sorting.

type NamedBlock

type NamedBlock struct {
	BlockNumber base.Blknum    `json:"blockNumber"`
	Component   string         `json:"component,omitempty"`
	Description string         `json:"description,omitempty"`
	Name        string         `json:"name,omitempty"`
	Timestamp   base.Timestamp `json:"timestamp"`
}

func (*NamedBlock) Date

func (s *NamedBlock) Date() string

func (*NamedBlock) FinishUnmarshal

func (s *NamedBlock) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*NamedBlock) Model

func (s *NamedBlock) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (NamedBlock) String

func (s NamedBlock) String() string

type Parameter

type Parameter struct {
	Components    []Parameter `json:"components,omitempty"`
	Indexed       bool        `json:"indexed,omitempty"`
	InternalType  string      `json:"internalType,omitempty"`
	Name          string      `json:"name"`
	StrDefault    string      `json:"strDefault,omitempty"`
	ParameterType string      `json:"type"`
	Value         any         `json:"value,omitempty"`
}

func (*Parameter) DisplayName

func (s *Parameter) DisplayName(index int) string

DisplayName returns parameter name if defined, or a default name "val_" + index

func (*Parameter) FinishUnmarshal

func (s *Parameter) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*Parameter) MarshalCache

func (s *Parameter) MarshalCache(writer io.Writer) (err error)

func (*Parameter) Model

func (s *Parameter) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (Parameter) String

func (s Parameter) String() string

func (*Parameter) UnmarshalCache

func (s *Parameter) UnmarshalCache(vers uint64, reader io.Reader) (err error)

type Parts

type Parts int

EXISTING_CODE

const (
	None Parts = (1 << iota)
	Regular
	Custom
	Prefund
	Baddress
	Testing
	MatchCase
	Expanded
	Tags
)

Parts is a bitfield that defines what parts of a name to return and other options

type RangeDates

type RangeDates struct {
	FirstDate string         `json:"firstDate,omitempty"`
	FirstTs   base.Timestamp `json:"firstTs,omitempty"`
	LastDate  string         `json:"lastDate,omitempty"`
	LastTs    base.Timestamp `json:"lastTs,omitempty"`
}

func (*RangeDates) Cmp

func (p1 *RangeDates) Cmp(p2 RangeDates) int64

EXISTING_CODE

func (*RangeDates) FinishUnmarshal

func (s *RangeDates) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*RangeDates) Model

func (s *RangeDates) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (RangeDates) String

func (s RangeDates) String() string

type Receipt

type Receipt struct {
	BlockHash         base.Hash    `json:"blockHash,omitempty"`
	BlockNumber       base.Blknum  `json:"blockNumber"`
	ContractAddress   base.Address `json:"contractAddress,omitempty"`
	CumulativeGasUsed base.Gas     `json:"cumulativeGasUsed,omitempty"`
	EffectiveGasPrice base.Gas     `json:"effectiveGasPrice,omitempty"`
	From              base.Address `json:"from,omitempty"`
	GasUsed           base.Gas     `json:"gasUsed"`
	IsError           bool         `json:"isError,omitempty"`
	Logs              []Log        `json:"logs"`
	Status            base.Value   `json:"status"`
	To                base.Address `json:"to,omitempty"`
	TransactionHash   base.Hash    `json:"transactionHash"`
	TransactionIndex  base.Txnum   `json:"transactionIndex"`
}

func (*Receipt) FinishUnmarshal

func (s *Receipt) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*Receipt) IsDefault

func (s *Receipt) IsDefault() bool

func (*Receipt) MarshalCache

func (s *Receipt) MarshalCache(writer io.Writer) (err error)

func (*Receipt) Model

func (s *Receipt) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (Receipt) String

func (s Receipt) String() string

func (*Receipt) UnmarshalCache

func (s *Receipt) UnmarshalCache(vers uint64, reader io.Reader) (err error)

type ReceiptGroup

type ReceiptGroup struct {
	BlockNumber      base.Blknum
	TransactionIndex base.Txnum
	Receipts         []Receipt
}

func (*ReceiptGroup) CacheLocations

func (s *ReceiptGroup) CacheLocations() (string, string, string)

func (*ReceiptGroup) MarshalCache

func (s *ReceiptGroup) MarshalCache(writer io.Writer) (err error)

func (*ReceiptGroup) UnmarshalCache

func (s *ReceiptGroup) UnmarshalCache(vers uint64, reader io.Reader) (err error)

type ReconType

type ReconType int
const (
	Invalid ReconType = 1 << iota
	Genesis
	DiffDiff
	SameSame
	DiffSame
	SameDiff
	ShouldNotHappen
	First
	Last
)

func (ReconType) String

func (r ReconType) String() string

type ReportCheck

type ReportCheck struct {
	CheckedCnt uint64   `json:"checkedCnt"`
	FailedCnt  uint64   `json:"failedCnt"`
	MsgStrings []string `json:"msgStrings"`
	PassedCnt  uint64   `json:"passedCnt"`
	Reason     string   `json:"reason"`
	Result     string   `json:"result"`
	SkippedCnt uint64   `json:"skippedCnt"`
	VisitedCnt uint64   `json:"visitedCnt"`
}

func (*ReportCheck) FinishUnmarshal

func (s *ReportCheck) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*ReportCheck) Model

func (s *ReportCheck) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (ReportCheck) String

func (s ReportCheck) String() string

type Result

type Result struct {
	Address          base.Address   `json:"address"`
	ArticulatedOut   *Function      `json:"articulatedOut"`
	BlockNumber      base.Blknum    `json:"blockNumber"`
	EncodedArguments string         `json:"encodedArguments"`
	Encoding         string         `json:"encoding"`
	Name             string         `json:"name"`
	Signature        string         `json:"signature"`
	Timestamp        base.Timestamp `json:"timestamp"`
	// EXISTING_CODE
	Values        map[string]string `json:"values"`
	ReturnedBytes string
}

func (*Result) CacheLocations

func (s *Result) CacheLocations() (string, string, string)

func (*Result) Date

func (s *Result) Date() string

func (*Result) FinishUnmarshal

func (s *Result) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*Result) MarshalCache

func (s *Result) MarshalCache(writer io.Writer) (err error)

func (*Result) Model

func (s *Result) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (Result) String

func (s Result) String() string

func (*Result) UnmarshalCache

func (s *Result) UnmarshalCache(vers uint64, reader io.Reader) (err error)

type Rewards

type Rewards struct {
	Block  base.Wei `json:"block"`
	Nephew base.Wei `json:"nephew"`
	TxFee  base.Wei `json:"txFee"`
	Uncle  base.Wei `json:"uncle"`
}

func NewReward

func NewReward(block, nephew, txFee, uncle *base.Wei) (Rewards, base.Wei)

type Slurp

type Slurp struct {
	ArticulatedTx     *Function      `json:"articulatedTx"`
	BlockHash         base.Hash      `json:"blockHash"`
	BlockNumber       base.Blknum    `json:"blockNumber"`
	ContractAddress   base.Address   `json:"contractAddress"`
	CumulativeGasUsed string         `json:"cumulativeGasUsed"`
	From              base.Address   `json:"from"`
	FunctionName      string         `json:"functionName"`
	Gas               base.Gas       `json:"gas"`
	GasPrice          base.Gas       `json:"gasPrice"`
	GasUsed           base.Gas       `json:"gasUsed"`
	HasToken          bool           `json:"hasToken"`
	Hash              base.Hash      `json:"hash"`
	Input             string         `json:"input"`
	IsError           bool           `json:"-"`
	MethodId          string         `json:"methodId"`
	Nonce             base.Value     `json:"nonce"`
	Timestamp         base.Timestamp `json:"timestamp"`
	To                base.Address   `json:"to"`
	TransactionIndex  base.Txnum     `json:"transactionIndex"`
	TxReceiptStatus   string         `json:"txReceiptStatus"`
	ValidatorIndex    base.Value     `json:"validatorIndex"`
	Value             base.Wei       `json:"value"`
	WithdrawalIndex   base.Value     `json:"withdrawalIndex"`
	// EXISTING_CODE
	Amount base.Wei `json:"amount"`
}

func (*Slurp) Date

func (s *Slurp) Date() string

func (*Slurp) FinishUnmarshal

func (s *Slurp) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*Slurp) GasCost

func (s *Slurp) GasCost() base.Gas

func (*Slurp) MarshalCache

func (s *Slurp) MarshalCache(writer io.Writer) (err error)

func (*Slurp) Model

func (s *Slurp) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (Slurp) String

func (s Slurp) String() string

func (*Slurp) UnmarshalCache

func (s *Slurp) UnmarshalCache(vers uint64, reader io.Reader) (err error)

type SlurpGroup

type SlurpGroup struct {
	BlockNumber      base.Blknum
	TransactionIndex base.Txnum
	Address          base.Address
	Slurps           []Slurp
}

func (*SlurpGroup) CacheLocations

func (s *SlurpGroup) CacheLocations() (string, string, string)

func (*SlurpGroup) MarshalCache

func (s *SlurpGroup) MarshalCache(writer io.Writer) (err error)

func (*SlurpGroup) UnmarshalCache

func (s *SlurpGroup) UnmarshalCache(vers uint64, reader io.Reader) (err error)

type SortBy

type SortBy int
const (
	SortByAddress SortBy = iota
	SortByTags
)

SortBy is a bitfield that defines how to sort the names

type SortOrder

type SortOrder bool
const (
	Ascending  SortOrder = true
	Descending SortOrder = false
)

type State

type State struct {
	AccountType string         `json:"accountType"`
	Address     base.Address   `json:"address"`
	Balance     base.Wei       `json:"balance"`
	BlockNumber base.Blknum    `json:"blockNumber"`
	Code        string         `json:"code"`
	Deployed    base.Blknum    `json:"deployed"`
	Nonce       base.Value     `json:"nonce"`
	Parts       StatePart      `json:"parts"`
	Proxy       base.Address   `json:"proxy"`
	Timestamp   base.Timestamp `json:"timestamp"`
}

func (*State) CacheLocations

func (s *State) CacheLocations() (string, string, string)

func (*State) Date

func (s *State) Date() string

func (*State) FinishUnmarshal

func (s *State) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*State) MarshalCache

func (s *State) MarshalCache(writer io.Writer) (err error)

func (*State) Model

func (s *State) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (State) String

func (s State) String() string

func (*State) UnmarshalCache

func (s *State) UnmarshalCache(vers uint64, reader io.Reader) (err error)

type StatePart

type StatePart int

EXISTING_CODE StatePart is a bit mask for querying various parts an address's state

const (
	Balance StatePart = 1 << iota
	Nonce
	Code
	Deployed
	Proxy
	Type
)

func SliceToStateParts

func SliceToStateParts(parts []string) (stateFields StatePart, outputFields []string, none bool)

SliceToStateParts converts a string array of part names to a bit mask of parts and returns the corresponding output field names or none if no valid parts are present

func (StatePart) String

func (s StatePart) String() string

type Statement

type Statement struct {
	AccountedFor        base.Address   `json:"accountedFor"`
	AmountIn            base.Wei       `json:"amountIn,omitempty"`
	AmountOut           base.Wei       `json:"amountOut,omitempty"`
	AssetAddr           base.Address   `json:"assetAddr"`
	AssetSymbol         string         `json:"assetSymbol"`
	BegBal              base.Wei       `json:"begBal"`
	BlockNumber         base.Blknum    `json:"blockNumber"`
	CorrectingIn        base.Wei       `json:"correctingIn,omitempty"`
	CorrectingOut       base.Wei       `json:"correctingOut,omitempty"`
	CorrectingReason    string         `json:"correctingReason,omitempty"`
	Decimals            base.Value     `json:"decimals"`
	EndBal              base.Wei       `json:"endBal"`
	GasOut              base.Wei       `json:"gasOut,omitempty"`
	InternalIn          base.Wei       `json:"internalIn,omitempty"`
	InternalOut         base.Wei       `json:"internalOut,omitempty"`
	LogIndex            base.Lognum    `json:"logIndex"`
	MinerBaseRewardIn   base.Wei       `json:"minerBaseRewardIn,omitempty"`
	MinerNephewRewardIn base.Wei       `json:"minerNephewRewardIn,omitempty"`
	MinerTxFeeIn        base.Wei       `json:"minerTxFeeIn,omitempty"`
	MinerUncleRewardIn  base.Wei       `json:"minerUncleRewardIn,omitempty"`
	PrefundIn           base.Wei       `json:"prefundIn,omitempty"`
	PrevBal             base.Wei       `json:"prevBal,omitempty"`
	PriceSource         string         `json:"priceSource"`
	Recipient           base.Address   `json:"recipient"`
	SelfDestructIn      base.Wei       `json:"selfDestructIn,omitempty"`
	SelfDestructOut     base.Wei       `json:"selfDestructOut,omitempty"`
	Sender              base.Address   `json:"sender"`
	SpotPrice           base.Float     `json:"spotPrice"`
	Timestamp           base.Timestamp `json:"timestamp"`
	TransactionHash     base.Hash      `json:"transactionHash"`
	TransactionIndex    base.Txnum     `json:"transactionIndex"`
	// EXISTING_CODE
	ReconType ReconType `json:"-"`
	AssetType string    `json:"-"`
}

func (*Statement) AmountNet

func (s *Statement) AmountNet() *base.Wei

func (*Statement) BegBalDiff

func (s *Statement) BegBalDiff() *base.Wei

func (*Statement) CorrectForNullTransfer

func (s *Statement) CorrectForNullTransfer(tx *Transaction) bool

func (*Statement) CorrectForSomethingElse

func (s *Statement) CorrectForSomethingElse(tx *Transaction) bool

func (*Statement) Date

func (s *Statement) Date() string

func (*Statement) DebugStatement

func (s *Statement) DebugStatement(ctx Ledgerer)

func (*Statement) EndBalCalc

func (s *Statement) EndBalCalc() *base.Wei

func (*Statement) EndBalDiff

func (s *Statement) EndBalDiff() *base.Wei

func (*Statement) FinishUnmarshal

func (s *Statement) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*Statement) IsEth

func (s *Statement) IsEth() bool

func (*Statement) IsMaterial

func (s *Statement) IsMaterial() bool

func (*Statement) IsStableCoin

func (s *Statement) IsStableCoin() bool

func (*Statement) MarshalCache

func (s *Statement) MarshalCache(writer io.Writer) (err error)

func (*Statement) Model

func (s *Statement) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (*Statement) Reconciled

func (s *Statement) Reconciled() bool

func (Statement) String

func (s Statement) String() string

func (*Statement) TotalIn

func (s *Statement) TotalIn() *base.Wei

func (*Statement) TotalOut

func (s *Statement) TotalOut() *base.Wei

func (*Statement) TotalOutLessGas

func (s *Statement) TotalOutLessGas() *base.Wei

func (*Statement) UnmarshalCache

func (s *Statement) UnmarshalCache(vers uint64, reader io.Reader) (err error)

type StatementGroup

type StatementGroup struct {
	BlockNumber      base.Blknum
	TransactionIndex base.Txnum
	Address          base.Address
	Statements       []Statement
}

func (*StatementGroup) CacheLocations

func (s *StatementGroup) CacheLocations() (string, string, string)

func (*StatementGroup) MarshalCache

func (s *StatementGroup) MarshalCache(writer io.Writer) (err error)

func (*StatementGroup) UnmarshalCache

func (s *StatementGroup) UnmarshalCache(vers uint64, reader io.Reader) (err error)

type Status

type Status struct {
	CachePath     string      `json:"cachePath,omitempty"`
	Caches        []CacheItem `json:"caches"`
	Chain         string      `json:"chain,omitempty"`
	ChainConfig   string      `json:"chainConfig,omitempty"`
	ChainId       string      `json:"chainId,omitempty"`
	Chains        []Chain     `json:"chains"`
	ClientVersion string      `json:"clientVersion,omitempty"`
	HasEsKey      bool        `json:"hasEsKey,omitempty"`
	HasPinKey     bool        `json:"hasPinKey,omitempty"`
	IndexPath     string      `json:"indexPath,omitempty"`
	IsApi         bool        `json:"isApi,omitempty"`
	IsArchive     bool        `json:"isArchive,omitempty"`
	IsScraping    bool        `json:"isScraping,omitempty"`
	IsTesting     bool        `json:"isTesting,omitempty"`
	IsTracing     bool        `json:"isTracing,omitempty"`
	NetworkId     string      `json:"networkId,omitempty"`
	Progress      string      `json:"progress,omitempty"`
	RootConfig    string      `json:"rootConfig,omitempty"`
	RpcProvider   string      `json:"rpcProvider,omitempty"`
	Version       string      `json:"version,omitempty"`
	// EXISTING_CODE
	Meta  *MetaData `json:"meta,omitempty"`
	Diffs *MetaData `json:"diffs,omitempty"`
}

func (*Status) FinishUnmarshal

func (s *Status) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*Status) Model

func (s *Status) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (*Status) ShallowCopy

func (s *Status) ShallowCopy() Status

EXISTING_CODE

func (Status) String

func (s Status) String() string

type StorageSlot

type StorageSlot struct {
	Address     base.Address `json:"address"`
	StorageKeys []base.Hash  `json:"storageKeys"`
}

type Timestamp

type Timestamp struct {
	BlockNumber base.Blknum    `json:"blockNumber"`
	Diff        int64          `json:"diff"`
	Timestamp   base.Timestamp `json:"timestamp"`
}

func (*Timestamp) Date

func (s *Timestamp) Date() string

func (*Timestamp) FinishUnmarshal

func (s *Timestamp) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*Timestamp) Model

func (s *Timestamp) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (Timestamp) String

func (s Timestamp) String() string

type Token

type Token struct {
	Address          base.Address   `json:"address"`
	Balance          base.Wei       `json:"balance"`
	BlockNumber      base.Blknum    `json:"blockNumber"`
	Decimals         uint64         `json:"decimals"`
	Holder           base.Address   `json:"holder"`
	Name             string         `json:"name"`
	PriorBalance     base.Wei       `json:"priorBalance,omitempty"`
	Symbol           string         `json:"symbol"`
	Timestamp        base.Timestamp `json:"timestamp"`
	TotalSupply      base.Wei       `json:"totalSupply"`
	TransactionIndex base.Txnum     `json:"transactionIndex,omitempty"`
	TokenType        TokenType      `json:"type"`
}

func (*Token) Date

func (s *Token) Date() string

func (*Token) FinishUnmarshal

func (s *Token) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*Token) IsErc20

func (s *Token) IsErc20() bool

func (*Token) IsErc721

func (s *Token) IsErc721() bool

func (*Token) Model

func (s *Token) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (Token) String

func (s Token) String() string

type TokenType

type TokenType int
const (
	TokenErc20 TokenType = iota
	TokenErc721
)

func (TokenType) IsErc20

func (t TokenType) IsErc20() bool

func (TokenType) IsErc721

func (t TokenType) IsErc721() bool

type Trace

type Trace struct {
	Action           *TraceAction   `json:"action"`
	ArticulatedTrace *Function      `json:"articulatedTrace,omitempty"`
	BlockHash        base.Hash      `json:"blockHash"`
	BlockNumber      base.Blknum    `json:"blockNumber"`
	Error            string         `json:"error,omitempty"`
	Result           *TraceResult   `json:"result"`
	Subtraces        uint64         `json:"subtraces"`
	Timestamp        base.Timestamp `json:"timestamp"`
	TraceAddress     []uint64       `json:"traceAddress"`
	TransactionHash  base.Hash      `json:"transactionHash"`
	TransactionIndex base.Txnum     `json:"transactionIndex"`
	TraceType        string         `json:"type,omitempty"`
	// EXISTING_CODE
	TraceIndex base.Tracenum `json:"-"`

	TransactionPosition base.Txnum `json:"transactionPosition,omitempty"`
	// contains filtered or unexported fields
}

func (*Trace) Date

func (s *Trace) Date() string

func (*Trace) FinishUnmarshal

func (s *Trace) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*Trace) GetSortString

func (s *Trace) GetSortString() string

func (*Trace) MarshalCache

func (s *Trace) MarshalCache(writer io.Writer) (err error)

func (*Trace) Model

func (s *Trace) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (Trace) String

func (s Trace) String() string

func (*Trace) UnmarshalCache

func (s *Trace) UnmarshalCache(vers uint64, reader io.Reader) (err error)

type TraceAction

type TraceAction struct {
	Address        base.Address `json:"address,omitempty"`
	Author         base.Address `json:"author,omitempty"`
	Balance        base.Wei     `json:"balance,omitempty"`
	CallType       string       `json:"callType"`
	From           base.Address `json:"from"`
	Gas            base.Gas     `json:"gas"`
	Init           string       `json:"init,omitempty"`
	Input          string       `json:"input,omitempty"`
	RefundAddress  base.Address `json:"refundAddress,omitempty"`
	RewardType     string       `json:"rewardType,omitempty"`
	SelfDestructed base.Address `json:"selfDestructed,omitempty"`
	To             base.Address `json:"to"`
	Value          base.Wei     `json:"value"`
}

func (*TraceAction) FinishUnmarshal

func (s *TraceAction) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*TraceAction) MarshalCache

func (s *TraceAction) MarshalCache(writer io.Writer) (err error)

func (*TraceAction) Model

func (s *TraceAction) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (TraceAction) String

func (s TraceAction) String() string

func (*TraceAction) UnmarshalCache

func (s *TraceAction) UnmarshalCache(vers uint64, reader io.Reader) (err error)

type TraceCount

type TraceCount struct {
	BlockNumber      base.Blknum    `json:"blockNumber"`
	Timestamp        base.Timestamp `json:"timestamp"`
	TracesCnt        uint64         `json:"tracesCnt"`
	TransactionHash  base.Hash      `json:"transactionHash"`
	TransactionIndex base.Txnum     `json:"transactionIndex"`
}

func (*TraceCount) Date

func (s *TraceCount) Date() string

func (*TraceCount) FinishUnmarshal

func (s *TraceCount) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*TraceCount) Model

func (s *TraceCount) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (TraceCount) String

func (s TraceCount) String() string

type TraceFilter

type TraceFilter struct {
	After       uint64       `json:"after,omitempty"`
	Count       uint64       `json:"count,omitempty"`
	FromAddress base.Address `json:"fromAddress,omitempty"`
	FromBlock   base.Blknum  `json:"fromBlock,omitempty"`
	ToAddress   base.Address `json:"toAddress,omitempty"`
	ToBlock     base.Blknum  `json:"toBlock,omitempty"`
}

func (*TraceFilter) FinishUnmarshal

func (s *TraceFilter) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*TraceFilter) Model

func (s *TraceFilter) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (*TraceFilter) ParseBangString

func (s *TraceFilter) ParseBangString(chain, filter string) (ret map[string]any, br base.BlockRange)

func (*TraceFilter) PassesBasic

func (s *TraceFilter) PassesBasic(trace *Trace, nTested uint64, nPassed uint64) (bool, string)

func (TraceFilter) String

func (s TraceFilter) String() string

type TraceGroup

type TraceGroup struct {
	BlockNumber      base.Blknum
	TransactionIndex base.Txnum
	Traces           []Trace
}

func (*TraceGroup) CacheLocations

func (s *TraceGroup) CacheLocations() (string, string, string)

func (*TraceGroup) MarshalCache

func (s *TraceGroup) MarshalCache(writer io.Writer) (err error)

func (*TraceGroup) UnmarshalCache

func (s *TraceGroup) UnmarshalCache(vers uint64, reader io.Reader) (err error)

type TraceResult

type TraceResult struct {
	Address base.Address `json:"address,omitempty"`
	Code    string       `json:"code,omitempty"`
	GasUsed base.Gas     `json:"gasUsed,omitempty"`
	Output  string       `json:"output,omitempty"`
}

func (*TraceResult) FinishUnmarshal

func (s *TraceResult) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*TraceResult) MarshalCache

func (s *TraceResult) MarshalCache(writer io.Writer) (err error)

func (*TraceResult) Model

func (s *TraceResult) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (TraceResult) String

func (s TraceResult) String() string

func (*TraceResult) UnmarshalCache

func (s *TraceResult) UnmarshalCache(vers uint64, reader io.Reader) (err error)

type Transaction

type Transaction struct {
	ArticulatedTx        *Function      `json:"articulatedTx"`
	BlockHash            base.Hash      `json:"blockHash"`
	BlockNumber          base.Blknum    `json:"blockNumber"`
	From                 base.Address   `json:"from"`
	Gas                  base.Gas       `json:"gas"`
	GasPrice             base.Gas       `json:"gasPrice"`
	GasUsed              base.Gas       `json:"gasUsed"`
	HasToken             bool           `json:"hasToken"`
	Hash                 base.Hash      `json:"hash"`
	Input                string         `json:"input"`
	IsError              bool           `json:"isError"`
	MaxFeePerGas         base.Gas       `json:"maxFeePerGas"`
	MaxPriorityFeePerGas base.Gas       `json:"maxPriorityFeePerGas"`
	Nonce                base.Value     `json:"nonce"`
	Receipt              *Receipt       `json:"receipt"`
	Timestamp            base.Timestamp `json:"timestamp"`
	To                   base.Address   `json:"to"`
	Traces               []Trace        `json:"traces"`
	TransactionIndex     base.Txnum     `json:"transactionIndex"`
	TransactionType      string         `json:"type"`
	Value                base.Wei       `json:"value"`
	// EXISTING_CODE
	Message    string       `json:"-"`
	Rewards    *Rewards     `json:"-"`
	Statements *[]Statement `json:"statements"`
}

func (*Transaction) CacheLocations

func (s *Transaction) CacheLocations() (string, string, string)

func (*Transaction) Date

func (s *Transaction) Date() string

func (*Transaction) FinishUnmarshal

func (s *Transaction) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*Transaction) GasCost

func (s *Transaction) GasCost() base.Gas

func (*Transaction) MarshalCache

func (s *Transaction) MarshalCache(writer io.Writer) (err error)

func (*Transaction) Model

func (s *Transaction) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (Transaction) String

func (s Transaction) String() string

func (*Transaction) UnmarshalCache

func (s *Transaction) UnmarshalCache(vers uint64, reader io.Reader) (err error)

type Withdrawal

type Withdrawal struct {
	Address        base.Address   `json:"address"`
	Amount         base.Wei       `json:"amount"`
	BlockNumber    base.Blknum    `json:"blockNumber"`
	Index          base.Value     `json:"index"`
	Timestamp      base.Timestamp `json:"timestamp"`
	ValidatorIndex base.Value     `json:"validatorIndex"`
}

func (*Withdrawal) Date

func (s *Withdrawal) Date() string

func (*Withdrawal) FinishUnmarshal

func (s *Withdrawal) FinishUnmarshal()

FinishUnmarshal is used by the cache. It may be unused depending on auto-code-gen

func (*Withdrawal) MarshalCache

func (s *Withdrawal) MarshalCache(writer io.Writer) (err error)

func (*Withdrawal) Model

func (s *Withdrawal) Model(chain, format string, verbose bool, extraOpts map[string]any) Model

func (Withdrawal) String

func (s Withdrawal) String() string

func (*Withdrawal) UnmarshalCache

func (s *Withdrawal) UnmarshalCache(vers uint64, reader io.Reader) (err error)

type WithdrawalGroup

type WithdrawalGroup struct {
	BlockNumber      base.Blknum
	TransactionIndex base.Txnum
	Withdrawals      []Withdrawal
}

func (*WithdrawalGroup) CacheLocations

func (s *WithdrawalGroup) CacheLocations() (string, string, string)

func (*WithdrawalGroup) MarshalCache

func (s *WithdrawalGroup) MarshalCache(writer io.Writer) (err error)

func (*WithdrawalGroup) UnmarshalCache

func (s *WithdrawalGroup) UnmarshalCache(vers uint64, reader io.Reader) (err error)

Jump to

Keyboard shortcuts

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