Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PluginFilePath = "$GOPATH/src/github.com/makerdao/vulcanizedb/plugins" MissingPathErr = errors.New("transformer config is missing `path` value") MissingRepositoryErr = errors.New("transformer config is missing `repository` value") MissingMigrationsErr = errors.New("transformer config is missing `migrations` value") MissingRankErr = errors.New("transformer config is missing `rank` value") RankParsingErr = errors.New("migration `rank` can't be converted to an unsigned integer") MissingTypeErr = errors.New("transformer config is missing `type` value") UnknownTransformerTypeErr = errors.New(`unknown transformer type in exporter config accepted types are "eth_event", "eth_storage"`) )
Functions ¶
func DbConnectionString ¶
Types ¶
type ContractConfig ¶
type ContractConfig struct { // Name for the transformer Name string // Ethereum network name; default "" is mainnet Network string // List of contract addresses (map to ensure no duplicates) Addresses map[string]bool // Map of contract address to abi // If an address has no associated abi the parser will attempt to fetch one from etherscan Abis map[string]string // Map of contract address to slice of events // Used to set which addresses to watch // If any events are listed in the slice only those will be watched // Otherwise all events in the contract ABI are watched Events map[string][]string // Map of contract address to slice of event arguments to filter for // If arguments are provided then only events which emit those arguments are watched // Otherwise arguments are not filtered on events EventArgs map[string][]string // Map of contract address to their starting block StartingBlocks map[string]int64 }
Config struct for generic contract transformer
func (*ContractConfig) PrepConfig ¶
func (contractConfig *ContractConfig) PrepConfig()
type Plugin ¶
type Plugin struct { Transformers map[string]Transformer FilePath string FileName string Save bool Home string Schema string }
func PreparePluginConfig ¶ added in v0.1.1
func (*Plugin) GetMigrationsPaths ¶
Removes duplicate migration paths and returns them in ranked order
func (*Plugin) GetPluginPaths ¶
func (*Plugin) GetRepoPaths ¶
Removes duplicate repo paths before returning them
type Transformer ¶
type Transformer struct { Path string Type TransformerType MigrationPath string MigrationRank uint64 RepositoryPath string }
type TransformerType ¶
type TransformerType int
const ( UnknownTransformerType TransformerType = iota EthEvent EthStorage EthContract )
func GetTransformerType ¶
func GetTransformerType(str string) TransformerType
func (TransformerType) String ¶
func (transformerType TransformerType) String() string
Click to show internal directories.
Click to hide internal directories.