config

package
Version: v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2019 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package config defines configuration used by Ethereum watcher.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Watcher *Watcher
	Logging *Logging
	Debug   *Debug
}

Config is the top level Ethereum watcher configuration.

func LoadBinary

func LoadBinary(b []byte) (*Config, error)

LoadBinary loads, parses and validates the provided buffer b (as a config) and returns the Config.

func LoadFile

func LoadFile(f string) (*Config, error)

LoadFile loads, parses and validates the provided file and returns the Config.

type Debug

type Debug struct {
	// NumConfirmations defines number blocks we should wait before considering Ethereum to be final.
	NumConfirmations int64
}

Debug is the Ethereum watcher debug configuration.

type Logging

type Logging struct {
	// Disable disables logging entirely.
	Disable bool

	// File specifies the log file, if omitted stdout will be used.
	File string

	// Level specifies the log level.
	Level string
}

Logging is the Ethereum watcher logging configuration.

type Watcher

type Watcher struct {
	// KeyFile defines path to file containing ECDSA private key of the watcher.
	KeyFile string
	// EthereumNodeAddress defines address of the Ethereum node that the watcher is monitoring.
	EthereumNodeAddress string
	// TendermintNodeAddress defines address of the Tendermint node to which the watcher is sending notifications.
	TendermintNodeAddress string
	// NymContract defined address of the ERC20 token Nym contract. It is expected to be provided in hex format.
	NymContract ethcommon.Address
	// PipeAccount defines address of Ethereum account that pipes Nym ERC20 into Nym Tendermint coins.
	// It is expected to be provided in hex format.
	PipeAccount ethcommon.Address
}

Watcher is the main Ethereum watcher configuration.

Source Files

Jump to

Keyboard shortcuts

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