eof

package
v0.10.14 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: MIT Imports: 15 Imported by: 0

README

eof-crawler

Simple CLI tool to scan all accounts in a geth LevelDB for contracts that begin with the EOF prefix.

Usage

  1. Pass the directory of the Geth DB into the tool
go run ./cmd/eof-crawler/main.go --db-path <db_path> [--out <out_file>]
  1. Once the indexing has completed, an array of all EOF-prefixed contracts will be written to eof_contracts.json or the designated output file.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IndexEOFContracts

func IndexEOFContracts(dbPath string, out string) error

IndexEOFContracts indexes all the EOF contracts in the state trie of the head block for the given db and writes them to a JSON file.

Types

type Account

type Account struct {
	Balance   string         `json:"balance"`
	Nonce     uint64         `json:"nonce"`
	Root      hexutil.Bytes  `json:"root"`
	CodeHash  hexutil.Bytes  `json:"codeHash"`
	Code      hexutil.Bytes  `json:"code,omitempty"`
	Address   common.Address `json:"address,omitempty"`
	SecureKey hexutil.Bytes  `json:"key,omitempty"`
}

Account represents an account in the state.

Jump to

Keyboard shortcuts

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