types

package
v6.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2026 License: GPL-3.0 Imports: 29 Imported by: 13

Documentation

Overview

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

Copyright 2016, 2024 The TrueBlocks Authors. All rights reserved. Use of this source code is governed by a license that can be found in the LICENSE file.

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

View Source
var ErrNormalization = errors.New("normalization error")

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 ApprovalBy

func ApprovalBy(field ApprovalField, order SortOrder) func(p1, p2 Approval) bool

ApprovalBy returns a comparison function for sorting Approval instances by the given field. These comparison functions may be strung together by the CmdApprovals function.

func ApprovalCmp

func ApprovalCmp(slice []Approval, orders ...func(p1, p2 Approval) bool) func(i, j int) bool

ApprovalCmp 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 CacheItemBy

func CacheItemBy(field CacheItemField, order SortOrder) func(p1, p2 CacheItem) bool

CacheItemBy returns a comparison function for sorting CacheItem instances by the given field. These comparison functions may be strung together by the CmdCacheItems function.

func CacheItemCmp

func CacheItemCmp(slice []CacheItem, orders ...func(p1, p2 CacheItem) bool) func(i, j int) bool

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

func ChainBy

func ChainBy(field ChainField, order SortOrder) func(p1, p2 Chain) bool

ChainBy returns a comparison function for sorting Chain instances by the given field. These comparison functions may be strung together by the CmdChains function.

func ChainCmp

func ChainCmp(slice []Chain, orders ...func(p1, p2 Chain) bool) func(i, j int) bool

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

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 ContractBy

func ContractBy(field ContractField, order SortOrder) func(p1, p2 Contract) bool

ContractBy returns a comparison function for sorting Contract instances by the given field. These comparison functions may be strung together by the CmdContracts function.

func ContractCmp

func ContractCmp(slice []Contract, orders ...func(p1, p2 Contract) bool) func(i, j int) bool

ContractCmp 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 GetSortFieldsAbi

func GetSortFieldsAbi() []string

GetSortFieldsAbi returns a []string of valid sort fields for the type.

func GetSortFieldsApproval

func GetSortFieldsApproval() []string

GetSortFieldsApproval returns a []string of valid sort fields for the type.

func GetSortFieldsCacheItem

func GetSortFieldsCacheItem() []string

GetSortFieldsCacheItem returns a []string of valid sort fields for the type.

func GetSortFieldsChain

func GetSortFieldsChain() []string

GetSortFieldsChain returns a []string of valid sort fields for the type.

func GetSortFieldsChunkRecord

func GetSortFieldsChunkRecord() []string

GetSortFieldsChunkRecord returns a []string of valid sort fields for the type.

func GetSortFieldsChunkStats

func GetSortFieldsChunkStats() []string

GetSortFieldsChunkStats returns a []string of valid sort fields for the type.

func GetSortFieldsContract

func GetSortFieldsContract() []string

GetSortFieldsContract returns a []string of valid sort fields for the type.

func GetSortFieldsFunction

func GetSortFieldsFunction() []string

GetSortFieldsFunction returns a []string of valid sort fields for the type.

func GetSortFieldsMonitor

func GetSortFieldsMonitor() []string

GetSortFieldsMonitor returns a []string of valid sort fields for the type.

func GetSortFieldsName

func GetSortFieldsName() []string

GetSortFieldsName returns a []string of valid sort fields for the type.

func GetSortFieldsTransaction

func GetSortFieldsTransaction() []string

GetSortFieldsTransaction returns a []string of valid sort fields for the type.

func IsAssetOfInterest

func IsAssetOfInterest(needle base.Address, filters []base.Address) bool

------------------------------------------------------------------------------------------

func IsTokenFunction

func IsTokenFunction(needle string) bool

func MakeCompressed

func MakeCompressed(input any) (result string)

MakeCompressed produces compressedTx|Trace|Log field value TODO: We may implement this function as an interface: https://github.com/TrueBlocks/trueblocks-core/pull/2707#discussion_r1116910420

func MonitorBy

func MonitorBy(field MonitorField, order SortOrder) func(p1, p2 Monitor) bool

MonitorBy returns a comparison function for sorting Monitor instances by the given field. These comparison functions may be strung together by the CmdMonitors function.

func MonitorCmp

func MonitorCmp(slice []Monitor, orders ...func(p1, p2 Monitor) bool) func(i, j int) bool

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

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.

func TransactionBy

func TransactionBy(field TransactionField, order SortOrder) func(p1, p2 Transaction) bool

TransactionBy returns a comparison function for sorting Transaction instances by the given field. These comparison functions may be strung together by the CmdTransactions function.

func TransactionCmp

func TransactionCmp(slice []Transaction, orders ...func(p1, p2 Transaction) bool) func(i, j int) bool

TransactionCmp 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"`
	AddressName    string       `json:"addressName,omitempty"`
	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"`
	Calcs          *AbiCalcs    `json:"calcs,omitempty"`
}

func (*Abi) CacheLocations

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

func (*Abi) CalcMap

func (s *Abi) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*Abi) EnsureCalcs

func (s *Abi) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*Abi) FinishUnmarshal

func (s *Abi) FinishUnmarshal(fileVersion uint64)

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

func (*Abi) MarshalCache

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

func (*Abi) Model

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

func (*Abi) RawMap

func (s *Abi) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this Abi.

func (*Abi) ShallowCopy

func (s *Abi) ShallowCopy() Abi

EXISTING_CODE

func (Abi) String

func (s Abi) String() string

func (*Abi) UnmarshalCache

func (s *Abi) UnmarshalCache(fileVersion uint64, reader io.Reader) (err error)

type AbiCalcs

type AbiCalcs struct {
	// EXISTING_CODE
	Name string `json:"name,omitempty"`
}

AbiCalcs holds lazy-loaded calculated fields for Abi

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 AppList

type AppList[T any] struct {
	Head *AppNode[T]
	Tail *AppNode[T]
}

func NewAppList

func NewAppList[T any](apps []NodeAppearance, dataItems []*T) (*AppList[T], error)

func NewAppListFromApps

func NewAppListFromApps[T any](apps []Appearance, dataItems []*T) (*AppList[T], error)

func (*AppList[T]) Count

func (l *AppList[T]) Count() int

type AppNode

type AppNode[T any] struct {
	// contains filtered or unexported fields
}

func NewAppNode

func NewAppNode[T any](appearance *NodeAppearance, data *T) *AppNode[T]

func (*AppNode[T]) Cur

func (a *AppNode[T]) Cur() *NodeAppearance

func (*AppNode[T]) CurBlock

func (a *AppNode[T]) CurBlock() base.Blknum

func (*AppNode[T]) CurTxId

func (a *AppNode[T]) CurTxId() base.Txnum

func (*AppNode[T]) Data

func (a *AppNode[T]) Data() *T

func (*AppNode[T]) Index

func (a *AppNode[T]) Index() int

func (*AppNode[T]) IsFirstInBlock

func (a *AppNode[T]) IsFirstInBlock() bool

func (*AppNode[T]) IsHead

func (a *AppNode[T]) IsHead() bool

func (*AppNode[T]) IsLastInBlock

func (a *AppNode[T]) IsLastInBlock() bool

func (*AppNode[T]) IsTail

func (a *AppNode[T]) IsTail() bool

func (*AppNode[T]) Next

func (a *AppNode[T]) Next() *AppNode[T]

func (*AppNode[T]) NextBlock

func (a *AppNode[T]) NextBlock() base.Blknum

func (*AppNode[T]) NextTxId

func (a *AppNode[T]) NextTxId() base.Txnum

func (*AppNode[T]) Prev

func (a *AppNode[T]) Prev() *AppNode[T]

func (*AppNode[T]) PrevBlock

func (a *AppNode[T]) PrevBlock() base.Blknum

func (*AppNode[T]) PrevTxId

func (a *AppNode[T]) PrevTxId() base.Txnum

func (*AppNode[T]) SetData

func (a *AppNode[T]) SetData(data *T)

func (*AppNode[T]) String

func (a *AppNode[T]) String() string

type AppRecord

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

type Appearance

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

func (*Appearance) CalcMap

func (s *Appearance) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*Appearance) Date

func (s *Appearance) Date() string

func (*Appearance) EnsureCalcs

func (s *Appearance) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*Appearance) FinishUnmarshal

func (s *Appearance) FinishUnmarshal(fileVersion uint64)

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) RawMap

func (s *Appearance) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this Appearance.

func (Appearance) String

func (s Appearance) String() string

type AppearanceCalcs

type AppearanceCalcs struct {
	// EXISTING_CODE
	Date string `json:"date,omitempty"`
}

AppearanceCalcs holds lazy-loaded calculated fields for Appearance

type AppearanceFilter

type AppearanceFilter struct {
	OuterBounds ranges.BlockRange

	Reversed bool

	BlocksOnly bool
	// contains filtered or unexported fields
}

func NewEmptyFilter

func NewEmptyFilter() *AppearanceFilter

func NewFilter

func NewFilter(reversed, reverted bool, fourBytes []string, exportRange ranges.BlockRange, recordRange ranges.RecordRange) *AppearanceFilter

func (*AppearanceFilter) GetOuterBounds

func (f *AppearanceFilter) GetOuterBounds() ranges.BlockRange

func (*AppearanceFilter) PassesCountFilter

func (f *AppearanceFilter) PassesCountFilter() (passed, finished bool)

PassesCountFilter checks to see if the appearance is at or later than the --first_record and less than (because it's zero-based) --max_records.

func (*AppearanceFilter) PassesFilter

func (f *AppearanceFilter) PassesFilter(app *AppRecord) (passed, finished bool)

PassesFilter checks to see if the appearance intersects with the user-supplied --first_block/--last_block pair (if any)

func (*AppearanceFilter) PassesLogFilter

func (f *AppearanceFilter) PassesLogFilter(log *Log, addrArray []base.Address) bool

func (*AppearanceFilter) PassesRangeFilter

func (f *AppearanceFilter) PassesRangeFilter(app *AppRecord) (passed, finished bool)

PassesRangeFilter checks to see if the appearance intersects with the user-supplied --first_block/--last_block pair (if any)

func (*AppearanceFilter) PassesTxFilter

func (f *AppearanceFilter) PassesTxFilter(tx *Transaction) bool

PassesTxFilter applies the four byte and reverted filters.

func (*AppearanceFilter) Reset

func (f *AppearanceFilter) Reset()

func (*AppearanceFilter) SetSort

func (f *AppearanceFilter) SetSort(sortBy AppearanceSort)

func (*AppearanceFilter) Sort

func (f *AppearanceFilter) Sort(fromDisc []AppRecord)

type AppearanceSort

type AppearanceSort int
const (
	NotSorted AppearanceSort = iota
	Sorted
	Reversed
)

type AppearanceTable

type AppearanceTable struct {
	AddressRecord AddrRecord            `json:"AddressRecord"`
	Appearances   []AppRecord           `json:"Appearances"`
	Calcs         *AppearanceTableCalcs `json:"calcs,omitempty"`
}

func (*AppearanceTable) CalcMap

func (s *AppearanceTable) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*AppearanceTable) EnsureCalcs

func (s *AppearanceTable) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*AppearanceTable) FinishUnmarshal

func (s *AppearanceTable) FinishUnmarshal(fileVersion uint64)

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) RawMap

func (s *AppearanceTable) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this AppearanceTable.

func (AppearanceTable) String

func (s AppearanceTable) String() string

type AppearanceTableCalcs

type AppearanceTableCalcs struct {
}

AppearanceTableCalcs holds lazy-loaded calculated fields for AppearanceTable

type Approval

type Approval struct {
	Allowance    base.Wei       `json:"allowance"`
	BlockNumber  base.Blknum    `json:"blockNumber"`
	LastAppBlock base.Blknum    `json:"lastAppBlock"`
	LastAppLogID base.Lognum    `json:"lastAppLogID"`
	LastAppTs    base.Timestamp `json:"lastAppTs"`
	LastAppTxID  base.Txnum     `json:"lastAppTxID"`
	Owner        base.Address   `json:"owner"`
	OwnerName    string         `json:"ownerName,omitempty"`
	Spender      base.Address   `json:"spender"`
	SpenderName  string         `json:"spenderName,omitempty"`
	Timestamp    base.Timestamp `json:"timestamp"`
	Token        base.Address   `json:"token"`
	TokenName    string         `json:"tokenName,omitempty"`
	Calcs        *ApprovalCalcs `json:"calcs,omitempty"`
}

func (*Approval) CacheLocations added in v6.6.5

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

func (*Approval) CalcMap

func (s *Approval) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*Approval) Date

func (s *Approval) Date() string

func (*Approval) EnsureCalcs

func (s *Approval) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*Approval) FinishUnmarshal

func (s *Approval) FinishUnmarshal(fileVersion uint64)

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

func (*Approval) MarshalCache added in v6.6.5

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

func (*Approval) Model

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

func (*Approval) RawMap

func (s *Approval) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this Approval.

func (Approval) String

func (s Approval) String() string

func (*Approval) UnmarshalCache added in v6.6.5

func (s *Approval) UnmarshalCache(fileVersion uint64, reader io.Reader) (err error)

type ApprovalCalcs

type ApprovalCalcs struct {
	// EXISTING_CODE
	Date        string `json:"date"`
	LastAppDate string `json:"lastAppDate"`
}

ApprovalCalcs holds lazy-loaded calculated fields for Approval

type ApprovalField

type ApprovalField string
const (
	ApprovalAllowance    ApprovalField = "allowance"
	ApprovalDate         ApprovalField = "date"
	ApprovalLastAppBlock ApprovalField = "lastAppBlock"
	ApprovalOwner        ApprovalField = "owner"
	ApprovalSpender      ApprovalField = "spender"
	ApprovalTimestamp    ApprovalField = "timestamp"
	ApprovalToken        ApprovalField = "token"
)

Fields in the Approval struct available for sorting.

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"`
	MinerName     string         `json:"minerName,omitempty"`
	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"`
	Calcs         *BlockCalcs    `json:"calcs,omitempty"`
	// EXISTING_CODE
	Number base.Blknum `json:"number"`
}

func (*Block) CacheLocations

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

func (*Block) CalcMap

func (s *Block) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*Block) Date

func (s *Block) Date() string

func (*Block) EnsureCalcs

func (s *Block) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*Block) FinishUnmarshal

func (s *Block) FinishUnmarshal(fileVersion uint64)

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) RawMap

func (s *Block) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this Block.

func (Block) String

func (s Block) String() string

func (*Block) UnmarshalCache

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

type BlockCalcs

type BlockCalcs struct {
	// EXISTING_CODE
	Date string `json:"date"`
}

BlockCalcs holds lazy-loaded calculated fields for Block

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"`
	Calcs           *BlockCountCalcs `json:"calcs,omitempty"`
}

func (*BlockCount) CalcMap

func (s *BlockCount) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*BlockCount) Date

func (s *BlockCount) Date() string

func (*BlockCount) EnsureCalcs

func (s *BlockCount) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*BlockCount) FinishUnmarshal

func (s *BlockCount) FinishUnmarshal(fileVersion uint64)

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) RawMap

func (s *BlockCount) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this BlockCount.

func (BlockCount) String

func (s BlockCount) String() string

type BlockCountCalcs

type BlockCountCalcs struct {
	// EXISTING_CODE
	Date string `json:"date,omitempty"`
}

BlockCountCalcs holds lazy-loaded calculated fields for BlockCount

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"`
	Calcs     *BoundsCalcs   `json:"calcs,omitempty"`
}

func (*Bounds) CalcMap

func (s *Bounds) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*Bounds) EnsureCalcs

func (s *Bounds) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*Bounds) FinishUnmarshal

func (s *Bounds) FinishUnmarshal(fileVersion uint64)

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) RawMap

func (s *Bounds) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this Bounds.

func (Bounds) String

func (s Bounds) String() string

type BoundsCalcs

type BoundsCalcs struct {
	// EXISTING_CODE
	FirstDate  string `json:"firstDate"`
	LatestDate string `json:"latestDate"`
	BlockSpan  uint64 `json:"blockSpan"`
	BlockFreq  uint64 `json:"blockFreq"`
}

BoundsCalcs holds lazy-loaded calculated fields for Bounds

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"`
	Calcs         *CacheItemCalcs `json:"calcs,omitempty"`
}

func (*CacheItem) CalcMap

func (s *CacheItem) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*CacheItem) EnsureCalcs

func (s *CacheItem) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*CacheItem) FinishUnmarshal

func (s *CacheItem) FinishUnmarshal(fileVersion uint64)

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) RawMap

func (s *CacheItem) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this CacheItem.

func (CacheItem) String

func (s CacheItem) String() string

type CacheItemCalcs

type CacheItemCalcs struct {
}

CacheItemCalcs holds lazy-loaded calculated fields for CacheItem

type CacheItemField

type CacheItemField string
const (
	CacheItemLastCached  CacheItemField = "lastCached"
	CacheItemNFiles      CacheItemField = "nFiles"
	CacheItemNFolders    CacheItemField = "nFolders"
	CacheItemPath        CacheItemField = "path"
	CacheItemSizeInBytes CacheItemField = "sizeInBytes"
	CacheItemType        CacheItemField = "type"
)

Fields in the CacheItem struct available for sorting.

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"`
	Calcs          *ChainCalcs `json:"calcs,omitempty"`
}

func (*Chain) CalcMap

func (s *Chain) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*Chain) EnsureCalcs

func (s *Chain) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*Chain) FinishUnmarshal

func (s *Chain) FinishUnmarshal(fileVersion uint64)

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) RawMap

func (s *Chain) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this Chain.

func (Chain) String

func (s Chain) String() string

type ChainCalcs

type ChainCalcs struct {
}

ChainCalcs holds lazy-loaded calculated fields for Chain

type ChainField

type ChainField string
const (
	ChainChain          ChainField = "chain"
	ChainChainId        ChainField = "chainId"
	ChainIpfsGateway    ChainField = "ipfsGateway"
	ChainLocalExplorer  ChainField = "localExplorer"
	ChainRemoteExplorer ChainField = "remoteExplorer"
	ChainRpcProvider    ChainField = "rpcProvider"
	ChainSymbol         ChainField = "symbol"
)

Fields in the Chain struct available for sorting.

type ChunkAddress

type ChunkAddress struct {
	Address     base.Address       `json:"address"`
	AddressName string             `json:"addressName,omitempty"`
	Count       uint64             `json:"count"`
	Offset      uint64             `json:"offset"`
	Range       string             `json:"range"`
	RangeDates  *RangeDates        `json:"rangeDates,omitempty"`
	Calcs       *ChunkAddressCalcs `json:"calcs,omitempty"`
}

func (*ChunkAddress) CalcMap

func (s *ChunkAddress) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*ChunkAddress) EnsureCalcs

func (s *ChunkAddress) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*ChunkAddress) FinishUnmarshal

func (s *ChunkAddress) FinishUnmarshal(fileVersion uint64)

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) RawMap

func (s *ChunkAddress) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this ChunkAddress.

func (ChunkAddress) String

func (s ChunkAddress) String() string

type ChunkAddressCalcs

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

ChunkAddressCalcs holds lazy-loaded calculated fields for ChunkAddress

type ChunkAppearance

type ChunkAppearance = Appearance

type ChunkBloom

type ChunkBloom struct {
	ByteWidth  uint64           `json:"byteWidth"`
	FileSize   uint64           `json:"fileSize"`
	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,omitempty"`
	Calcs      *ChunkBloomCalcs `json:"calcs,omitempty"`
}

func (*ChunkBloom) CalcMap

func (s *ChunkBloom) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*ChunkBloom) EnsureCalcs

func (s *ChunkBloom) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*ChunkBloom) FinishUnmarshal

func (s *ChunkBloom) FinishUnmarshal(fileVersion uint64)

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) RawMap

func (s *ChunkBloom) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this ChunkBloom.

func (ChunkBloom) String

func (s ChunkBloom) String() string

type ChunkBloomCalcs

type ChunkBloomCalcs struct {
	// EXISTING_CODE
	Hash       string         `json:"hash"`
	HashValue  string         `json:"hashValue,omitempty"`
	RangeDates interface{}    `json:"rangeDates,omitempty"`
	FirstTs    base.Timestamp `json:"firstTs,omitempty"`
	FirstDate  string         `json:"firstDate,omitempty"`
	LastTs     base.Timestamp `json:"lastTs,omitempty"`
	LastDate   string         `json:"lastDate,omitempty"`
}

ChunkBloomCalcs holds lazy-loaded calculated fields for ChunkBloom

type ChunkIndex

type ChunkIndex struct {
	FileSize     uint64           `json:"fileSize"`
	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,omitempty"`
	Calcs        *ChunkIndexCalcs `json:"calcs,omitempty"`
}

func (*ChunkIndex) CalcMap

func (s *ChunkIndex) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*ChunkIndex) EnsureCalcs

func (s *ChunkIndex) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*ChunkIndex) FinishUnmarshal

func (s *ChunkIndex) FinishUnmarshal(fileVersion uint64)

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) RawMap

func (s *ChunkIndex) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this ChunkIndex.

func (ChunkIndex) String

func (s ChunkIndex) String() string

type ChunkIndexCalcs

type ChunkIndexCalcs struct {
	// EXISTING_CODE
	Hash       string         `json:"hash"`
	HashValue  string         `json:"hashValue,omitempty"`
	RangeDates interface{}    `json:"rangeDates,omitempty"`
	FirstTs    base.Timestamp `json:"firstTs,omitempty"`
	FirstDate  string         `json:"firstDate,omitempty"`
	LastTs     base.Timestamp `json:"lastTs,omitempty"`
	LastDate   string         `json:"lastDate,omitempty"`
}

ChunkIndexCalcs holds lazy-loaded calculated fields for ChunkIndex

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"`
	Calcs         *ChunkPinCalcs `json:"calcs,omitempty"`
}

func (*ChunkPin) CalcMap

func (s *ChunkPin) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*ChunkPin) EnsureCalcs

func (s *ChunkPin) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*ChunkPin) FinishUnmarshal

func (s *ChunkPin) FinishUnmarshal(fileVersion uint64)

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) RawMap

func (s *ChunkPin) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this ChunkPin.

func (ChunkPin) String

func (s ChunkPin) String() string

type ChunkPinCalcs

type ChunkPinCalcs struct {
}

ChunkPinCalcs holds lazy-loaded calculated fields for ChunkPin

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,omitempty"`
	Calcs      *ChunkRecordCalcs `json:"calcs,omitempty"`
}

func (*ChunkRecord) CalcMap

func (s *ChunkRecord) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*ChunkRecord) EnsureCalcs

func (s *ChunkRecord) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*ChunkRecord) FinishUnmarshal

func (s *ChunkRecord) FinishUnmarshal(fileVersion uint64)

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) RawMap

func (s *ChunkRecord) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this ChunkRecord.

func (ChunkRecord) String

func (s ChunkRecord) String() string

type ChunkRecordCalcs

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

ChunkRecordCalcs holds lazy-loaded calculated fields for ChunkRecord

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,omitempty"`
	Ratio         float64          `json:"ratio"`
	RecWid        uint64           `json:"recWid"`
	Calcs         *ChunkStatsCalcs `json:"calcs,omitempty"`
}

func (*ChunkStats) CalcMap

func (s *ChunkStats) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*ChunkStats) EnsureCalcs

func (s *ChunkStats) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*ChunkStats) FinishUnmarshal

func (s *ChunkStats) FinishUnmarshal(fileVersion uint64)

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) RawMap

func (s *ChunkStats) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this ChunkStats.

func (*ChunkStats) ShallowCopy

func (s *ChunkStats) ShallowCopy() ChunkStats

EXISTING_CODE

func (ChunkStats) String

func (s ChunkStats) String() string

type ChunkStatsCalcs

type ChunkStatsCalcs struct {
	// EXISTING_CODE
	RangeDates interface{} `json:"rangeDates,omitempty"`
	FirstTs    uint64      `json:"firstTs,omitempty"`
	FirstDate  string      `json:"firstDate,omitempty"`
	LastTs     uint64      `json:"lastTs,omitempty"`
	LastDate   string      `json:"lastDate,omitempty"`
}

ChunkStatsCalcs holds lazy-loaded calculated fields for ChunkStats

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 Config

type Config struct {
	Version   configtypes.VersionGroup          `json:"version" toml:"version"`
	Settings  configtypes.SettingsGroup         `json:"settings" toml:"settings"`
	Keys      map[string]configtypes.KeyGroup   `json:"keys" toml:"keys"`
	Pinning   configtypes.PinningGroup          `json:"pinning" toml:"pinning"`
	Unchained configtypes.UnchainedGroup        `json:"unchained" toml:"unchained,omitempty" comment:"Do not edit these values unless instructed to do so."`
	Chains    map[string]configtypes.ChainGroup `json:"chains" toml:"chains"`
	Calcs     *ConfigCalcs                      `json:"calcs,omitempty"`
}

func (*Config) CalcMap

func (s *Config) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this Config.

func (*Config) EnsureCalcs

func (s *Config) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*Config) FinishUnmarshal

func (s *Config) FinishUnmarshal(fileVersion uint64)

func (*Config) Model

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

func (*Config) RawMap

func (s *Config) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this Config.

func (*Config) ShallowCopy

func (s *Config) ShallowCopy() Config

func (Config) String

func (s Config) String() string

type ConfigCalcs

type ConfigCalcs struct {
}

ConfigCalcs holds lazy-loaded calculated fields for Config

type Contract

type Contract struct {
	Abi         *Abi           `json:"abi"`
	Address     base.Address   `json:"address"`
	AddressName string         `json:"addressName,omitempty"`
	ErrorCount  int64          `json:"errorCount"`
	LastError   string         `json:"lastError"`
	LastUpdated base.Timestamp `json:"lastUpdated"`
	Name        string         `json:"name"`
	Calcs       *ContractCalcs `json:"calcs,omitempty"`
	// EXISTING_CODE
	ReadResults map[string]interface{} `json:"readResults"`
}

func (*Contract) CalcMap

func (s *Contract) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*Contract) Date

func (s *Contract) Date() string

EXISTING_CODE

func (*Contract) EnsureCalcs

func (s *Contract) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*Contract) FinishUnmarshal

func (s *Contract) FinishUnmarshal(fileVersion uint64)

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

func (*Contract) Model

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

func (*Contract) RawMap

func (s *Contract) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this Contract.

func (Contract) String

func (s Contract) String() string

type ContractCalcs

type ContractCalcs struct {
	// EXISTING_CODE
	Date string `json:"date,omitempty"`
}

ContractCalcs holds lazy-loaded calculated fields for Contract

type ContractField

type ContractField string
const (
	ContractAddress     ContractField = "address"
	ContractDate        ContractField = "date"
	ContractLastUpdated ContractField = "lastUpdated"
	ContractName        ContractField = "name"
)

Fields in the Contract struct available for sorting.

type Count

type Count struct {
	Count uint64      `json:"count"`
	Calcs *CountCalcs `json:"calcs,omitempty"`
}

func (*Count) CalcMap

func (s *Count) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*Count) EnsureCalcs

func (s *Count) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*Count) FinishUnmarshal

func (s *Count) FinishUnmarshal(fileVersion uint64)

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) RawMap

func (s *Count) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this Count.

func (Count) String

func (s Count) String() string

type CountCalcs

type CountCalcs struct {
}

CountCalcs holds lazy-loaded calculated fields for Count

type DestType

type DestType string

EXISTING_CODE

const (
	DestinationNone     DestType = "none"
	DestinationAddress  DestType = "address"
	DestinationName     DestType = "name"
	DestinationEnsName  DestType = "ensName"
	DestinationTx       DestType = "tx"
	DestinationBlock    DestType = "block"
	DestinationFourByte DestType = "4byte"
)

func (DestType) String

func (t DestType) String() string

type Destination

type Destination struct {
	Source   string            `json:"source"`
	Term     string            `json:"term"`
	TermType DestType          `json:"termType"`
	Url      string            `json:"url"`
	Calcs    *DestinationCalcs `json:"calcs,omitempty"`
}

func NewDestination

func NewDestination(term string, termType DestType) Destination

func NewDestinationEx

func NewDestinationEx(exp Destination, url, source string) Destination

func (*Destination) CalcMap

func (s *Destination) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*Destination) EnsureCalcs

func (s *Destination) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*Destination) FinishUnmarshal

func (s *Destination) FinishUnmarshal(fileVersion uint64)

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

func (*Destination) Model

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

func (*Destination) RawMap

func (s *Destination) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this Destination.

func (*Destination) Resolve

func (s *Destination) Resolve(chain string, google, dalle, local bool) []Destination

func (Destination) String

func (s Destination) String() string

type DestinationCalcs

type DestinationCalcs struct {
}

DestinationCalcs holds lazy-loaded calculated fields for Destination

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"`
	Calcs           *FunctionCalcs `json:"calcs,omitempty"`
	// 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) CalcMap

func (s *Function) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*Function) Clone

func (s *Function) Clone() *Function

func (*Function) EnsureCalcs

func (s *Function) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*Function) FinishUnmarshal

func (s *Function) FinishUnmarshal(fileVersion uint64)

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) RawMap

func (s *Function) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this Function.

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(fileVersion uint64, reader io.Reader) (err error)

type FunctionCalcs

type FunctionCalcs struct {
	// EXISTING_CODE
	Inputs  []interface{} `json:"inputs,omitempty"`
	Outputs []interface{} `json:"outputs,omitempty"`
}

FunctionCalcs holds lazy-loaded calculated fields for Function

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"`
	Calcs      *IpfsPinCalcs `json:"calcs,omitempty"`
}

func (*IpfsPin) CalcMap

func (s *IpfsPin) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*IpfsPin) EnsureCalcs

func (s *IpfsPin) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*IpfsPin) FinishUnmarshal

func (s *IpfsPin) FinishUnmarshal(fileVersion uint64)

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) RawMap

func (s *IpfsPin) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this IpfsPin.

func (IpfsPin) String

func (s IpfsPin) String() string

type IpfsPinCalcs

type IpfsPinCalcs struct {
	// EXISTING_CODE
	DatePinned string `json:"datePinned"`
}

IpfsPinCalcs holds lazy-loaded calculated fields for IpfsPin

type Labeler

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

func NewLabeler

func NewLabeler(addr base.Address, name string) Labeler

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"`
	MinerName     string           `json:"minerName,omitempty"`
	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"`
	Calcs         *LightBlockCalcs `json:"calcs,omitempty"`
	// EXISTING_CODE
	Number base.Blknum `json:"number"`
}

func (*LightBlock) CacheLocations

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

func (*LightBlock) CalcMap

func (s *LightBlock) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*LightBlock) Date

func (s *LightBlock) Date() string

func (*LightBlock) EnsureCalcs

func (s *LightBlock) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*LightBlock) FinishUnmarshal

func (s *LightBlock) FinishUnmarshal(fileVersion uint64)

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) RawMap

func (s *LightBlock) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this LightBlock.

func (LightBlock) String

func (s LightBlock) String() string

func (*LightBlock) UnmarshalCache

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

type LightBlockCalcs

type LightBlockCalcs struct {
	// EXISTING_CODE
	Date string `json:"date"`
}

LightBlockCalcs holds lazy-loaded calculated fields for LightBlock

type Log

type Log struct {
	Address          base.Address   `json:"address"`
	AddressName      string         `json:"addressName,omitempty"`
	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"`
	Calcs            *LogCalcs      `json:"calcs,omitempty"`
}

func NormalizeKnownLogs

func NormalizeKnownLogs(log *Log) (*Log, error)

func (*Log) CalcMap

func (s *Log) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*Log) CompressedLog

func (log *Log) CompressedLog() string

func (*Log) Date

func (s *Log) Date() string

func (*Log) EnsureCalcs

func (s *Log) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*Log) FinishUnmarshal

func (s *Log) FinishUnmarshal(fileVersion uint64)

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

func (*Log) IsNFT

func (log *Log) IsNFT() bool

func (*Log) IsRelevant

func (l *Log) IsRelevant(addr base.Address, checkAddress bool) bool

EXISTING_CODE

func (*Log) Log2Haystack

func (log *Log) Log2Haystack() string

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) RawMap

func (s *Log) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this Log.

func (Log) String

func (s Log) String() string

func (*Log) UnmarshalCache

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

type LogCalcs

type LogCalcs struct {
	// EXISTING_CODE
	Date           string                 `json:"date"`
	IsNFT          bool                   `json:"isNFT,omitempty"`
	Data           string                 `json:"data,omitempty"`
	ArticulatedLog map[string]interface{} `json:"articulatedLog,omitempty"`
	Topics         []string               `json:"topics,omitempty"`
	CompressedLog  string                 `json:"compressedLog,omitempty"`
	Topic0         string                 `json:"topic0,omitempty"`
	Topic1         string                 `json:"topic1,omitempty"`
	Topic2         string                 `json:"topic2,omitempty"`
	Topic3         string                 `json:"topic3,omitempty"`
}

LogCalcs holds lazy-loaded calculated fields for Log

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(fileVersion 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"`
	Calcs         *ManifestCalcs `json:"calcs,omitempty"`
}

func (*Manifest) CalcMap

func (s *Manifest) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*Manifest) EnsureCalcs

func (s *Manifest) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*Manifest) FinishUnmarshal

func (s *Manifest) FinishUnmarshal(fileVersion uint64)

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) RawMap

func (s *Manifest) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this Manifest.

func (*Manifest) ShallowCopy

func (s *Manifest) ShallowCopy() Manifest

EXISTING_CODE

func (Manifest) String

func (s Manifest) String() string

type ManifestCalcs

type ManifestCalcs struct {
}

ManifestCalcs holds lazy-loaded calculated fields for Manifest

type MappedType

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

type Message

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

func (*Message) CalcMap

func (s *Message) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*Message) EnsureCalcs

func (s *Message) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*Message) FinishUnmarshal

func (s *Message) FinishUnmarshal(fileVersion uint64)

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) RawMap

func (s *Message) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this Message.

func (Message) String

func (s Message) String() string

type MessageCalcs

type MessageCalcs struct {
}

MessageCalcs holds lazy-loaded calculated fields for Message

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"`
	Calcs     *MetaDataCalcs `json:"calcs,omitempty"`
}

func (*MetaData) CalcMap

func (m *MetaData) CalcMap(props *ModelProps, rawMap map[string]any) map[string]any

func (*MetaData) ChainHeight

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

ChainHeight returns the block after the height of the index.

func (*MetaData) EnsureCalcs

func (s *MetaData) EnsureCalcs(p *ModelProps, fieldFilter []string) error

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) Model

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

func (*MetaData) NextIndexHeight

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

NextIndexHeight returns the block after the height of the index.

func (*MetaData) RawMap

func (m *MetaData) RawMap(props *ModelProps) map[string]any

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 MetaDataCalcs

type MetaDataCalcs struct {
	// EXISTING_CODE
	IndexHeight     base.Blknum `json:"indexHeight"`
	NextIndexHeight base.Blknum `json:"nextIndexHeight"`
	ChainHeight     base.Blknum `json:"chainHeight"`
	StageHeight     base.Blknum `json:"stageHeight"`
}

MetaDataCalcs holds lazy-loaded calculated fields for MetaData

type Model

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

type ModelProps

type ModelProps struct {
	Chain     string
	Format    string
	Verbose   bool
	ExtraOpts map[string]any
}

func NewModelProps

func NewModelProps(chain, format string, verbose bool, extraOpts map[string]any) *ModelProps

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"`
	AddressName string        `json:"addressName,omitempty"`
	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"`
	Calcs       *MonitorCalcs `json:"calcs,omitempty"`
}

func (*Monitor) CalcMap

func (s *Monitor) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*Monitor) EnsureCalcs

func (s *Monitor) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*Monitor) FinishUnmarshal

func (s *Monitor) FinishUnmarshal(fileVersion uint64)

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) RawMap

func (s *Monitor) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this Monitor.

func (Monitor) String

func (s Monitor) String() string

func (*Monitor) UnmarshalCache

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

type MonitorCalcs

type MonitorCalcs struct {
	// EXISTING_CODE
	IsEmpty  bool `json:"isEmpty,omitempty"`
	IsStaged bool `json:"isStaged,omitempty"`
}

MonitorCalcs holds lazy-loaded calculated fields for Monitor

type MonitorClean

type MonitorClean struct {
	Address     base.Address       `json:"address"`
	AddressName string             `json:"addressName,omitempty"`
	Dups        int64              `json:"dups"`
	Removed     bool               `json:"removed"`
	SizeNow     int64              `json:"sizeNow"`
	SizeThen    int64              `json:"sizeThen"`
	Staged      bool               `json:"staged"`
	Calcs       *MonitorCleanCalcs `json:"calcs,omitempty"`
}

func (*MonitorClean) CalcMap

func (s *MonitorClean) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*MonitorClean) EnsureCalcs

func (s *MonitorClean) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*MonitorClean) FinishUnmarshal

func (s *MonitorClean) FinishUnmarshal(fileVersion uint64)

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) RawMap

func (s *MonitorClean) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this MonitorClean.

func (MonitorClean) String

func (s MonitorClean) String() string

type MonitorCleanCalcs

type MonitorCleanCalcs struct {
	// EXISTING_CODE
	Staged  uint64 `json:"staged,omitempty"`
	Removed uint64 `json:"removed,omitempty"`
}

MonitorCleanCalcs holds lazy-loaded calculated fields for MonitorClean

type MonitorField

type MonitorField string
const (
	MonitorAddress     MonitorField = "address"
	MonitorDeleted     MonitorField = "deleted"
	MonitorFileSize    MonitorField = "fileSize"
	MonitorIsEmpty     MonitorField = "isEmpty"
	MonitorIsStaged    MonitorField = "isStaged"
	MonitorLastScanned MonitorField = "lastScanned"
	MonitorNRecords    MonitorField = "nRecords"
)

Fields in the Monitor struct available for sorting.

type Name

type Name struct {
	Address     base.Address `json:"address"`
	AddressName string       `json:"addressName,omitempty"`
	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"`
	Calcs       *NameCalcs   `json:"calcs,omitempty"`
	// EXISTING_CODE
	Prefund base.Wei `json:"prefund,omitempty"`
	Parts   Parts    `json:"parts,omitempty"`
}

func (*Name) CalcMap

func (s *Name) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*Name) EnsureCalcs

func (s *Name) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*Name) FinishUnmarshal

func (s *Name) FinishUnmarshal(fileVersion uint64)

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

func (*Name) IsAirdrop

func (n *Name) IsAirdrop() bool

func (*Name) Model

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

func (*Name) RawMap

func (s *Name) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this Name.

func (Name) String

func (s Name) String() string

type NameCalcs

type NameCalcs struct {
}

NameCalcs holds lazy-loaded calculated fields for Name

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"`
	Calcs       *NamedBlockCalcs `json:"calcs,omitempty"`
	// EXISTING_CODE
	NBlocks base.Blknum `json:"nBlocks,omitempty"`
}

func (*NamedBlock) CalcMap

func (s *NamedBlock) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*NamedBlock) Date

func (s *NamedBlock) Date() string

func (*NamedBlock) EnsureCalcs

func (s *NamedBlock) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*NamedBlock) FinishUnmarshal

func (s *NamedBlock) FinishUnmarshal(fileVersion uint64)

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) RawMap

func (s *NamedBlock) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this NamedBlock.

func (NamedBlock) String

func (s NamedBlock) String() string

type NamedBlockCalcs

type NamedBlockCalcs struct {
	// EXISTING_CODE
	Date string `json:"date"`
	Name string `json:"name,omitempty"`
}

NamedBlockCalcs holds lazy-loaded calculated fields for NamedBlock

type NodeAppearance

type NodeAppearance struct {
	Type             string
	BlockNumber      base.Blknum
	TransactionIndex base.Txnum
	LogIndex         base.Lognum
}

type NullTest

type NullTest struct {
	NLogs int
	To    base.Address
}

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"`
	Calcs         *ParameterCalcs `json:"calcs,omitempty"`
}

func (*Parameter) AbiType added in v6.7.0

func (p *Parameter) AbiType(abiType *abi.Type) (any, error)

AbiType converts the Parameter's Value to the proper Go type for ABI encoding. The Value field is expected to be a string (as it comes from Wails or other sources).

func (*Parameter) CalcMap

func (s *Parameter) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*Parameter) DisplayName

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

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

func (*Parameter) EnsureCalcs

func (s *Parameter) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*Parameter) FinishUnmarshal

func (s *Parameter) FinishUnmarshal(fileVersion uint64)

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) RawMap

func (s *Parameter) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this Parameter.

func (Parameter) String

func (s Parameter) String() string

func (*Parameter) UnmarshalCache

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

type ParameterCalcs

type ParameterCalcs struct {
	// EXISTING_CODE
	Indexed      bool   `json:"indexed,omitempty"`
	InternalType string `json:"internalType,omitempty"`
}

ParameterCalcs holds lazy-loaded calculated fields for Parameter

type Parts

type Parts int

EXISTING_CODE

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

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"`
	Calcs     *RangeDatesCalcs `json:"calcs,omitempty"`
}

func (*RangeDates) CalcMap

func (s *RangeDates) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*RangeDates) Cmp

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

EXISTING_CODE

func (*RangeDates) EnsureCalcs

func (s *RangeDates) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*RangeDates) FinishUnmarshal

func (s *RangeDates) FinishUnmarshal(fileVersion uint64)

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) RawMap

func (s *RangeDates) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this RangeDates.

func (RangeDates) String

func (s RangeDates) String() string

type RangeDatesCalcs

type RangeDatesCalcs struct {
}

RangeDatesCalcs holds lazy-loaded calculated fields for RangeDates

type Receipt

type Receipt struct {
	BlockHash           base.Hash     `json:"blockHash,omitempty"`
	BlockNumber         base.Blknum   `json:"blockNumber"`
	ContractAddress     base.Address  `json:"contractAddress,omitempty"`
	ContractAddressName string        `json:"contractAddressName,omitempty"`
	CumulativeGasUsed   base.Gas      `json:"cumulativeGasUsed,omitempty"`
	EffectiveGasPrice   base.Gas      `json:"effectiveGasPrice,omitempty"`
	From                base.Address  `json:"from,omitempty"`
	FromName            string        `json:"fromName,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"`
	ToName              string        `json:"toName,omitempty"`
	TransactionHash     base.Hash     `json:"transactionHash"`
	TransactionIndex    base.Txnum    `json:"transactionIndex"`
	Calcs               *ReceiptCalcs `json:"calcs,omitempty"`
}

func (*Receipt) CalcMap

func (s *Receipt) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*Receipt) EnsureCalcs

func (s *Receipt) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*Receipt) FinishUnmarshal

func (s *Receipt) FinishUnmarshal(fileVersion uint64)

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) RawMap

func (s *Receipt) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this Receipt.

func (Receipt) String

func (s Receipt) String() string

func (*Receipt) ToTranfers

func (s *Receipt) ToTranfers(holder base.Address, assetFilters []base.Address, appFilter *AppearanceFilter) ([]*Transfer, error)

------------------------------------------------------------------------------------------

func (*Receipt) UnmarshalCache

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

type ReceiptCalcs

type ReceiptCalcs struct {
	// EXISTING_CODE
	ContractAddress base.Address `json:"contractAddress,omitempty"`
	IsError         bool         `json:"isError,omitempty"`
}

ReceiptCalcs holds lazy-loaded calculated fields for Receipt

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(fileVersion uint64, reader io.Reader) (err error)

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"`
	Calcs      *ReportCheckCalcs `json:"calcs,omitempty"`
}

func (*ReportCheck) CalcMap

func (s *ReportCheck) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*ReportCheck) EnsureCalcs

func (s *ReportCheck) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*ReportCheck) FinishUnmarshal

func (s *ReportCheck) FinishUnmarshal(fileVersion uint64)

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) RawMap

func (s *ReportCheck) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this ReportCheck.

func (ReportCheck) String

func (s ReportCheck) String() string

type ReportCheckCalcs

type ReportCheckCalcs struct {
	// EXISTING_CODE
	FailedCnt  uint64   `json:"failedCnt,omitempty"`
	SkippedCnt uint64   `json:"skippedCnt,omitempty"`
	MsgStrings []string `json:"msgStrings,omitempty"`
}

ReportCheckCalcs holds lazy-loaded calculated fields for ReportCheck

type Result

type Result struct {
	Address          base.Address   `json:"address"`
	AddressName      string         `json:"addressName,omitempty"`
	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"`
	Calcs            *ResultCalcs   `json:"calcs,omitempty"`
	// EXISTING_CODE
	Values        map[string]string `json:"values"`
	ReturnedBytes string
}

func (*Result) CacheLocations

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

func (*Result) CalcMap

func (s *Result) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*Result) Date

func (s *Result) Date() string

func (*Result) EnsureCalcs

func (s *Result) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*Result) FinishUnmarshal

func (s *Result) FinishUnmarshal(fileVersion uint64)

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) RawMap

func (s *Result) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this Result.

func (Result) String

func (s Result) String() string

func (*Result) UnmarshalCache

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

type ResultCalcs

type ResultCalcs struct {
	// EXISTING_CODE
	Date       string      `json:"date,omitempty"`
	CallResult interface{} `json:"callResult"`
}

ResultCalcs holds lazy-loaded calculated fields for Result

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"`
	ContractAddressName string         `json:"contractAddressName,omitempty"`
	CumulativeGasUsed   string         `json:"cumulativeGasUsed"`
	From                base.Address   `json:"from"`
	FromName            string         `json:"fromName,omitempty"`
	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"`
	ToName              string         `json:"toName,omitempty"`
	TransactionIndex    base.Txnum     `json:"transactionIndex"`
	TxReceiptStatus     string         `json:"txReceiptStatus"`
	ValidatorIndex      base.Value     `json:"validatorIndex"`
	Value               base.Wei       `json:"value"`
	WithdrawalIndex     base.Value     `json:"withdrawalIndex"`
	Calcs               *SlurpCalcs    `json:"calcs,omitempty"`
	// EXISTING_CODE
	Amount base.Wei `json:"amount"`
}

func (*Slurp) CalcMap

func (s *Slurp) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*Slurp) Date

func (s *Slurp) Date() string

func (*Slurp) EnsureCalcs

func (s *Slurp) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*Slurp) FinishUnmarshal

func (s *Slurp) FinishUnmarshal(fileVersion uint64)

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) RawMap

func (s *Slurp) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this Slurp.

func (Slurp) String

func (s Slurp) String() string

func (*Slurp) UnmarshalCache

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

type SlurpCalcs

type SlurpCalcs struct {
	// EXISTING_CODE
	Date            string      `json:"date"`
	GasCost         base.Wei    `json:"gasCost,omitempty"`
	ContractAddress string      `json:"contractAddress,omitempty"`
	Input           string      `json:"input,omitempty"`
	ArticulatedTx   interface{} `json:"articulatedTx,omitempty"`
	HasToken        bool        `json:"hasToken,omitempty"`
	IsError         bool        `json:"isError,omitempty"`
}

SlurpCalcs holds lazy-loaded calculated fields for Slurp

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(fileVersion 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
)

func (SortOrder) String

func (o SortOrder) String() string

type State

type State struct {
	AccountType string         `json:"accountType"`
	Address     base.Address   `json:"address"`
	AddressName string         `json:"addressName,omitempty"`
	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"`
	ProxyName   string         `json:"proxyName,omitempty"`
	Timestamp   base.Timestamp `json:"timestamp"`
	Calcs       *StateCalcs    `json:"calcs,omitempty"`
}

func (*State) CacheLocations

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

func (*State) CalcMap

func (s *State) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*State) Date

func (s *State) Date() string

func (*State) EnsureCalcs

func (s *State) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*State) FinishUnmarshal

func (s *State) FinishUnmarshal(fileVersion uint64)

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) RawMap

func (s *State) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this State.

func (State) String

func (s State) String() string

func (*State) UnmarshalCache

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

type StateCalcs

type StateCalcs struct {
	// EXISTING_CODE
	Date string `json:"date,omitempty"`
}

StateCalcs holds lazy-loaded calculated fields for State

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, outFields []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"`
	AccountedForName    string          `json:"accountedForName,omitempty"`
	AmountIn            base.Wei        `json:"amountIn,omitempty"`
	AmountOut           base.Wei        `json:"amountOut,omitempty"`
	Asset               base.Address    `json:"asset"`
	AssetName           string          `json:"assetName,omitempty"`
	BegBal              base.Wei        `json:"begBal"`
	BlockNumber         base.Blknum     `json:"blockNumber"`
	CorrectAmountIn     base.Wei        `json:"correctAmountIn,omitempty"`
	CorrectAmountOut    base.Wei        `json:"correctAmountOut,omitempty"`
	CorrectBegBalIn     base.Wei        `json:"correctBegBalIn,omitempty"`
	CorrectBegBalOut    base.Wei        `json:"correctBegBalOut,omitempty"`
	CorrectEndBalIn     base.Wei        `json:"correctEndBalIn,omitempty"`
	CorrectEndBalOut    base.Wei        `json:"correctEndBalOut,omitempty"`
	CorrectingReasons   string          `json:"correctingReasons,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"`
	RecipientName       string          `json:"recipientName,omitempty"`
	SelfDestructIn      base.Wei        `json:"selfDestructIn,omitempty"`
	SelfDestructOut     base.Wei        `json:"selfDestructOut,omitempty"`
	Sender              base.Address    `json:"sender"`
	SenderName          string          `json:"senderName,omitempty"`
	SpotPrice           base.Float      `json:"spotPrice"`
	Symbol              string          `json:"symbol"`
	Timestamp           base.Timestamp  `json:"timestamp"`
	TransactionHash     base.Hash       `json:"transactionHash"`
	TransactionIndex    base.Txnum      `json:"transactionIndex"`
	Calcs               *StatementCalcs `json:"calcs,omitempty"`
	// EXISTING_CODE
	CorrectionId base.Value   `json:"correctionId"`
	Holder       base.Address `json:"holder"`
	StatementId  base.Value   `json:"statementId"`
	BegSentinel  bool         `json:"-"`
	EndSentinel  bool         `json:"-"`
	Transaction  *Transaction `json:"-"`
	Log          *Log         `json:"-"`
}

func (*Statement) AmountNet

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

func (*Statement) BegBalDiff

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

func (*Statement) CalcMap

func (s *Statement) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*Statement) CorrectBeginBalance

func (stmt *Statement) CorrectBeginBalance() bool

func (*Statement) CorrectEndBalance

func (stmt *Statement) CorrectEndBalance() bool

func (*Statement) CorrectForNullTransfer

func (s *Statement) CorrectForNullTransfer() bool

func (*Statement) Date

func (s *Statement) Date() string

func (*Statement) DateTime

func (s *Statement) DateTime() base.DateTime

func (*Statement) DebugStatement

func (s *Statement) DebugStatement(node *AppNode[Transaction])

func (*Statement) Encoding

func (s *Statement) Encoding() string

func (*Statement) EndBalCalc

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

func (*Statement) EndBalDiff

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

func (*Statement) EnsureCalcs

func (s *Statement) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*Statement) FinishUnmarshal

func (s *Statement) FinishUnmarshal(fileVersion uint64)

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) IsNullTransfer

func (s *Statement) IsNullTransfer(nLogs int, to base.Address) 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) RawMap

func (s *Statement) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this Statement.

func (*Statement) Reconciled

func (s *Statement) Reconciled() bool

func (*Statement) ReconciliationType

func (s *Statement) ReconciliationType() string

func (Statement) Report

func (s Statement) Report() string

func (*Statement) Signature

func (s *Statement) Signature() string

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) Type

func (s *Statement) Type() string

func (*Statement) UnmarshalCache

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

type StatementCalcs

type StatementCalcs struct {
	// EXISTING_CODE
	AmountNet              base.Wei `json:"amountNet"`
	BegBalDiff             base.Wei `json:"begBalDiff"`
	Date                   string   `json:"date"`
	EndBalCalc             base.Wei `json:"endBalCalc"`
	EndBalDiff             base.Wei `json:"endBalDiff"`
	Reconciled             bool     `json:"reconciled"`
	TotalIn                base.Wei `json:"totalIn"`
	TotalOut               base.Wei `json:"totalOut"`
	AmountInEth            string   `json:"amountInEth,omitempty"`
	AmountNetEth           string   `json:"amountNetEth,omitempty"`
	AmountOutEth           string   `json:"amountOutEth,omitempty"`
	BegBalDiffEth          string   `json:"begBalDiffEth,omitempty"`
	BegBalEth              string   `json:"begBalEth,omitempty"`
	CorrectAmountInEth     string   `json:"correctAmountInEth,omitempty"`
	CorrectAmountOutEth    string   `json:"correctAmountOutEth,omitempty"`
	CorrectBegBalInEth     string   `json:"correctBegBalInEth,omitempty"`
	CorrectBegBalOutEth    string   `json:"correctBegBalOutEth,omitempty"`
	CorrectEndBalInEth     string   `json:"correctEndBalInEth,omitempty"`
	CorrectEndBalOutEth    string   `json:"correctEndBalOutEth,omitempty"`
	EndBalCalcEth          string   `json:"endBalCalcEth,omitempty"`
	EndBalDiffEth          string   `json:"endBalDiffEth,omitempty"`
	EndBalEth              string   `json:"endBalEth,omitempty"`
	GasOutEth              string   `json:"gasOutEth,omitempty"`
	InternalInEth          string   `json:"internalInEth,omitempty"`
	InternalOutEth         string   `json:"internalOutEth,omitempty"`
	MinerBaseRewardInEth   string   `json:"minerBaseRewardInEth,omitempty"`
	MinerNephewRewardInEth string   `json:"minerNephewRewardInEth,omitempty"`
	MinerTxFeeInEth        string   `json:"minerTxFeeInEth,omitempty"`
	MinerUncleRewardInEth  string   `json:"minerUncleRewardInEth,omitempty"`
	PrefundInEth           string   `json:"prefundInEth,omitempty"`
	PrevBalEth             string   `json:"prevBalEth,omitempty"`
	SelfDestructInEth      string   `json:"selfDestructInEth,omitempty"`
	SelfDestructOutEth     string   `json:"selfDestructOutEth,omitempty"`
	TotalInEth             string   `json:"totalInEth,omitempty"`
	TotalOutEth            string   `json:"totalOutEth,omitempty"`
}

StatementCalcs holds lazy-loaded calculated fields for Statement

type StatementGroup

type StatementGroup struct {
	BlockNumber      base.Blknum
	TransactionIndex base.Txnum
	Holder           base.Address
	Asset            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(fileVersion 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"`
	Calcs         *StatusCalcs `json:"calcs,omitempty"`
	// EXISTING_CODE
	Meta  *MetaData `json:"meta,omitempty"`
	Diffs *MetaData `json:"diffs,omitempty"`
}

func (*Status) CalcMap

func (s *Status) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*Status) EnsureCalcs

func (s *Status) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*Status) FinishUnmarshal

func (s *Status) FinishUnmarshal(fileVersion uint64)

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

func (*Status) GetCaches

func (s *Status) GetCaches(chain string, testMode bool, modeTypes []walk.CacheType) []CacheItem

GetCaches returns a slice of CacheItem objects for the status

func (*Status) GetChains

func (s *Status) GetChains(testMode bool) []Chain

GetChains returns a slice of Chain objects for the status

func (*Status) Model

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

func (*Status) RawMap

func (s *Status) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this Status.

func (*Status) ShallowCopy

func (s *Status) ShallowCopy() Status

EXISTING_CODE

func (Status) String

func (s Status) String() string

type StatusCalcs

type StatusCalcs struct {
	// EXISTING_CODE
	Caches []CacheItem `json:"caches,omitempty"`
	Chains []Chain     `json:"chains,omitempty"`
}

StatusCalcs holds lazy-loaded calculated fields for Status

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"`
	Calcs       *TimestampCalcs `json:"calcs,omitempty"`
}

func (*Timestamp) CalcMap

func (s *Timestamp) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*Timestamp) Date

func (s *Timestamp) Date() string

func (*Timestamp) EnsureCalcs

func (s *Timestamp) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*Timestamp) FinishUnmarshal

func (s *Timestamp) FinishUnmarshal(fileVersion uint64)

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) RawMap

func (s *Timestamp) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this Timestamp.

func (Timestamp) String

func (s Timestamp) String() string

type TimestampCalcs

type TimestampCalcs struct {
	// EXISTING_CODE
	Date string `json:"date"`
}

TimestampCalcs holds lazy-loaded calculated fields for Timestamp

type Token

type Token struct {
	Address          base.Address   `json:"address"`
	AddressName      string         `json:"addressName,omitempty"`
	Balance          base.Wei       `json:"balance"`
	BlockNumber      base.Blknum    `json:"blockNumber"`
	Decimals         uint64         `json:"decimals"`
	Holder           base.Address   `json:"holder"`
	HolderName       string         `json:"holderName,omitempty"`
	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"`
	Calcs            *TokenCalcs    `json:"calcs,omitempty"`
}

func (*Token) CacheLocations added in v6.6.5

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

func (*Token) CalcMap

func (s *Token) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*Token) Date

func (s *Token) Date() string

func (*Token) EnsureCalcs

func (s *Token) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*Token) FinishUnmarshal

func (s *Token) FinishUnmarshal(fileVersion uint64)

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) MarshalCache added in v6.6.5

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

func (*Token) Model

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

func (*Token) RawMap

func (s *Token) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this Token.

func (Token) String

func (s Token) String() string

func (*Token) UnmarshalCache added in v6.6.5

func (s *Token) UnmarshalCache(fileVersion uint64, reader io.Reader) (err error)

type TokenCalcs

type TokenCalcs struct {
	// EXISTING_CODE
	BalanceDec  string `json:"balanceDec,omitempty"`
	Date        string `json:"date,omitempty"`
	Diff        string `json:"diff,omitempty"`
	TotalSupply string `json:"totalSupply,omitempty"`
}

TokenCalcs holds lazy-loaded calculated fields for Token

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

func (TokenType) MarshalCache added in v6.6.5

func (t TokenType) MarshalCache(writer io.Writer) error

MarshalCache writes the TokenType to cache as a uint8

func (*TokenType) UnmarshalCache added in v6.6.5

func (t *TokenType) UnmarshalCache(fileVersion uint64, reader io.Reader) error

UnmarshalCache reads the TokenType from cache as a uint8

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"`
	Calcs            *TraceCalcs    `json:"calcs,omitempty"`
	// EXISTING_CODE
	TraceIndex base.Tracenum `json:"-"`

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

func (*Trace) CalcMap

func (s *Trace) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*Trace) Date

func (s *Trace) Date() string

func (*Trace) EnsureCalcs

func (s *Trace) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*Trace) FinishUnmarshal

func (s *Trace) FinishUnmarshal(fileVersion uint64)

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) RawMap

func (s *Trace) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this Trace.

func (Trace) String

func (s Trace) String() string

func (*Trace) UnmarshalCache

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

type TraceAction

type TraceAction struct {
	Address            base.Address      `json:"address,omitempty"`
	AddressName        string            `json:"addressName,omitempty"`
	Author             base.Address      `json:"author,omitempty"`
	AuthorName         string            `json:"authorName,omitempty"`
	Balance            base.Wei          `json:"balance,omitempty"`
	CallType           string            `json:"callType"`
	From               base.Address      `json:"from"`
	FromName           string            `json:"fromName,omitempty"`
	Gas                base.Gas          `json:"gas"`
	Init               string            `json:"init,omitempty"`
	Input              string            `json:"input,omitempty"`
	RefundAddress      base.Address      `json:"refundAddress,omitempty"`
	RefundAddressName  string            `json:"refundAddressName,omitempty"`
	RewardType         string            `json:"rewardType,omitempty"`
	SelfDestructed     base.Address      `json:"selfDestructed,omitempty"`
	SelfDestructedName string            `json:"selfDestructedName,omitempty"`
	To                 base.Address      `json:"to"`
	ToName             string            `json:"toName,omitempty"`
	Value              base.Wei          `json:"value"`
	Calcs              *TraceActionCalcs `json:"calcs,omitempty"`
}

func (*TraceAction) CalcMap

func (s *TraceAction) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*TraceAction) EnsureCalcs

func (s *TraceAction) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*TraceAction) FinishUnmarshal

func (s *TraceAction) FinishUnmarshal(fileVersion uint64)

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) RawMap

func (s *TraceAction) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this TraceAction.

func (TraceAction) String

func (s TraceAction) String() string

func (*TraceAction) UnmarshalCache

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

type TraceActionCalcs

type TraceActionCalcs struct {
	// EXISTING_CODE
	Ether      string `json:"ether,omitempty"`
	BalanceEth string `json:"balanceEth,omitempty"`
}

TraceActionCalcs holds lazy-loaded calculated fields for TraceAction

type TraceCalcs

type TraceCalcs struct {
	// EXISTING_CODE
	Date             string                 `json:"date"`
	ArticulatedTrace map[string]interface{} `json:"articulatedTrace,omitempty"`
	ActionFrom       string                 `json:"action::from,omitempty"`
	ActionTo         string                 `json:"action::to,omitempty"`
	ActionValue      string                 `json:"action::value,omitempty"`
	ActionEther      string                 `json:"action::ether,omitempty"`
	ActionInput      string                 `json:"action::input,omitempty"`
	ActionCallType   string                 `json:"action::callType,omitempty"`
	CompressedTrace  string                 `json:"compressedTrace,omitempty"`
}

TraceCalcs holds lazy-loaded calculated fields for Trace

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"`
	Calcs            *TraceCountCalcs `json:"calcs,omitempty"`
}

func (*TraceCount) CalcMap

func (s *TraceCount) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*TraceCount) Date

func (s *TraceCount) Date() string

func (*TraceCount) EnsureCalcs

func (s *TraceCount) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*TraceCount) FinishUnmarshal

func (s *TraceCount) FinishUnmarshal(fileVersion uint64)

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) RawMap

func (s *TraceCount) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this TraceCount.

func (TraceCount) String

func (s TraceCount) String() string

type TraceCountCalcs

type TraceCountCalcs struct {
	// EXISTING_CODE
	Date string `json:"date"`
}

TraceCountCalcs holds lazy-loaded calculated fields for TraceCount

type TraceFilter

type TraceFilter struct {
	After           uint64            `json:"after,omitempty"`
	Count           uint64            `json:"count,omitempty"`
	FromAddress     base.Address      `json:"fromAddress,omitempty"`
	FromAddressName string            `json:"fromAddressName,omitempty"`
	FromBlock       base.Blknum       `json:"fromBlock,omitempty"`
	ToAddress       base.Address      `json:"toAddress,omitempty"`
	ToAddressName   string            `json:"toAddressName,omitempty"`
	ToBlock         base.Blknum       `json:"toBlock,omitempty"`
	Calcs           *TraceFilterCalcs `json:"calcs,omitempty"`
}

func (*TraceFilter) CalcMap

func (s *TraceFilter) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*TraceFilter) EnsureCalcs

func (s *TraceFilter) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*TraceFilter) FinishUnmarshal

func (s *TraceFilter) FinishUnmarshal(fileVersion uint64)

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 ranges.BlockRange)

func (*TraceFilter) PassesBasic

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

func (*TraceFilter) RawMap

func (s *TraceFilter) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this TraceFilter.

func (TraceFilter) String

func (s TraceFilter) String() string

type TraceFilterCalcs

type TraceFilterCalcs struct {
}

TraceFilterCalcs holds lazy-loaded calculated fields for TraceFilter

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(fileVersion uint64, reader io.Reader) (err error)

type TraceResult

type TraceResult struct {
	Address     base.Address      `json:"address,omitempty"`
	AddressName string            `json:"addressName,omitempty"`
	Code        string            `json:"code,omitempty"`
	GasUsed     base.Gas          `json:"gasUsed,omitempty"`
	Output      string            `json:"output,omitempty"`
	Calcs       *TraceResultCalcs `json:"calcs,omitempty"`
}

func (*TraceResult) CalcMap

func (s *TraceResult) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*TraceResult) EnsureCalcs

func (s *TraceResult) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*TraceResult) FinishUnmarshal

func (s *TraceResult) FinishUnmarshal(fileVersion uint64)

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) RawMap

func (s *TraceResult) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this TraceResult.

func (TraceResult) String

func (s TraceResult) String() string

func (*TraceResult) UnmarshalCache

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

type TraceResultCalcs

type TraceResultCalcs struct {
	// EXISTING_CODE
	Code    string `json:"code,omitempty"`
	Address string `json:"address,omitempty"`
}

TraceResultCalcs holds lazy-loaded calculated fields for TraceResult

type Transaction

type Transaction struct {
	ArticulatedTx        *Function         `json:"articulatedTx"`
	BlockHash            base.Hash         `json:"blockHash"`
	BlockNumber          base.Blknum       `json:"blockNumber"`
	From                 base.Address      `json:"from"`
	FromName             string            `json:"fromName,omitempty"`
	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"`
	ToName               string            `json:"toName,omitempty"`
	Traces               []Trace           `json:"traces"`
	TransactionIndex     base.Txnum        `json:"transactionIndex"`
	TransactionType      string            `json:"type"`
	Value                base.Wei          `json:"value"`
	Calcs                *TransactionCalcs `json:"calcs,omitempty"`
	// EXISTING_CODE
	Message    string       `json:"-"`
	Rewards    *Rewards     `json:"-"`
	Statements *[]Statement `json:"statements"`
}

func (*Transaction) CacheLocations

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

func (*Transaction) CalcMap

func (s *Transaction) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*Transaction) Date

func (s *Transaction) Date() string

func (*Transaction) EnsureCalcs

func (s *Transaction) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*Transaction) FinishUnmarshal

func (s *Transaction) FinishUnmarshal(fileVersion uint64)

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) RawMap

func (s *Transaction) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this Transaction.

func (Transaction) String

func (s Transaction) String() string

func (*Transaction) ToTransfer

func (trans *Transaction) ToTransfer(holder base.Address) (*Transfer, error)

------------------------------------------------------------------------------------------

func (*Transaction) TracesToTransfer

func (trans *Transaction) TracesToTransfer(traces []Trace, holder base.Address) (*Transfer, error)

------------------------------------------------------------------------------------------

func (*Transaction) UnmarshalCache

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

type TransactionCalcs

type TransactionCalcs struct {
	// EXISTING_CODE
	Date          string                 `json:"date"`
	GasCost       base.Wei               `json:"gasCost"`
	ArticulatedTx map[string]interface{} `json:"articulatedTx,omitempty"`
	Statements    []map[string]any       `json:"statements,omitempty"`
	Receipt       map[string]interface{} `json:"receipt,omitempty"`
	Traces        []map[string]any       `json:"traces,omitempty"`
	Message       string                 `json:"message,omitempty"`
	EthGasPrice   string                 `json:"ethGasPrice,omitempty"`
	Encoding      string                 `json:"encoding,omitempty"`
	CompressedTx  string                 `json:"compressedTx,omitempty"`
	NTraces       int                    `json:"nTraces,omitempty"`
	Ether         string                 `json:"ether"`
}

TransactionCalcs holds lazy-loaded calculated fields for Transaction

type TransactionField

type TransactionField string
const (
	TransactionBlockNumber      TransactionField = "blockNumber"
	TransactionDate             TransactionField = "date"
	TransactionFrom             TransactionField = "from"
	TransactionGas              TransactionField = "gas"
	TransactionGasPrice         TransactionField = "gasPrice"
	TransactionGasUsed          TransactionField = "gasUsed"
	TransactionHasToken         TransactionField = "hasToken"
	TransactionIsError          TransactionField = "isError"
	TransactionTimestamp        TransactionField = "timestamp"
	TransactionTo               TransactionField = "to"
	TransactionTransactionIndex TransactionField = "transactionIndex"
	TransactionType             TransactionField = "type"
	TransactionValue            TransactionField = "value"
)

Fields in the Transaction struct available for sorting.

type Transfer

type Transfer struct {
	AmountIn            base.Wei       `json:"amountIn,omitempty"`
	AmountOut           base.Wei       `json:"amountOut,omitempty"`
	Asset               base.Address   `json:"asset"`
	AssetName           string         `json:"assetName,omitempty"`
	BlockNumber         base.Blknum    `json:"blockNumber"`
	Decimals            uint64         `json:"decimals"`
	GasOut              base.Wei       `json:"gasOut,omitempty"`
	Holder              base.Address   `json:"holder"`
	HolderName          string         `json:"holderName,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"`
	Recipient           base.Address   `json:"recipient"`
	RecipientName       string         `json:"recipientName,omitempty"`
	SelfDestructIn      base.Wei       `json:"selfDestructIn,omitempty"`
	SelfDestructOut     base.Wei       `json:"selfDestructOut,omitempty"`
	Sender              base.Address   `json:"sender"`
	SenderName          string         `json:"senderName,omitempty"`
	TransactionIndex    base.Txnum     `json:"transactionIndex"`
	Calcs               *TransferCalcs `json:"calcs,omitempty"`
	// EXISTING_CODE
	Log         *Log         `json:"log,omitempty"`
	Transaction *Transaction `json:"transaction,omitempty"`
}

func (*Transfer) AmountNet

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

func (*Transfer) CalcMap

func (s *Transfer) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*Transfer) EnsureCalcs

func (s *Transfer) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*Transfer) FinishUnmarshal

func (s *Transfer) FinishUnmarshal(fileVersion uint64)

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

func (*Transfer) IsMaterial

func (s *Transfer) IsMaterial() bool

EXISTING_CODE

func (*Transfer) Model

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

func (*Transfer) RawMap

func (s *Transfer) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this Transfer.

func (Transfer) String

func (s Transfer) String() string

func (*Transfer) ToStatement

func (s *Transfer) ToStatement(trans *Transaction, asEther bool) *Statement

func (*Transfer) TotalIn

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

func (*Transfer) TotalOut

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

type TransferCalcs

type TransferCalcs struct {
	// EXISTING_CODE
	Amount    base.Wei `json:"amount"`
	AmountEth string   `json:"amountEth,omitempty"`
}

TransferCalcs holds lazy-loaded calculated fields for Transfer

type Withdrawal

type Withdrawal struct {
	Address        base.Address     `json:"address"`
	AddressName    string           `json:"addressName,omitempty"`
	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"`
	Calcs          *WithdrawalCalcs `json:"calcs,omitempty"`
}

func (*Withdrawal) CalcMap

func (s *Withdrawal) CalcMap(p *ModelProps) map[string]any

CalcMap returns a map containing the calculated/derived fields for this type.

func (*Withdrawal) Date

func (s *Withdrawal) Date() string

func (*Withdrawal) EnsureCalcs

func (s *Withdrawal) EnsureCalcs(p *ModelProps, fieldFilter []string) error

func (*Withdrawal) FinishUnmarshal

func (s *Withdrawal) FinishUnmarshal(fileVersion uint64)

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) RawMap

func (s *Withdrawal) RawMap(p *ModelProps, needed *[]Labeler) map[string]any

RawMap returns a map containing only the raw/base fields for this Withdrawal.

func (Withdrawal) String

func (s Withdrawal) String() string

func (*Withdrawal) UnmarshalCache

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

type WithdrawalCalcs

type WithdrawalCalcs struct {
	// EXISTING_CODE
	Date  string `json:"date"`
	Ether string `json:"ether,omitempty"`
}

WithdrawalCalcs holds lazy-loaded calculated fields for Withdrawal

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(fileVersion uint64, reader io.Reader) (err error)

Jump to

Keyboard shortcuts

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