teleportr

package module
v0.0.0-...-412688d Latest Latest
Warning

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

Go to latest
Published: May 4, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main(gitVersion string) func(ctx *cli.Context) error

func Migrate

func Migrate() func(ctx *cli.Context) error

Types

type Config

type Config struct {

	// BuildEnv identifies the environment this binary is intended for, i.e.
	// production, development, etc.
	BuildEnv string

	// EthNetworkName identifies the intended Ethereum network.
	EthNetworkName string

	// L1EthRpc is the HTTP provider URL for L1.
	L1EthRpc string

	// L2EthRpc is the HTTP provider URL for L1.
	L2EthRpc string

	// DepositAddress is the TeleportrDeposit contract adddress.
	DepositAddress string

	// DepositDeployBlockNumber is the deployment block number of the
	// TeleportrDeposit contract.
	DepositDeployBlockNumber uint64

	// FilterQueryMaxBlocks is the maximum range of a filter query in blocks.
	FilterQueryMaxBlocks uint64

	// DisburserAddress is the TeleportrDisburser contract address.
	DisburserAddress string

	// MaxL2TxSize is the maximum size in bytes of any L2 transactions generated
	// for teleportr disbursements.
	MaxL2TxSize uint64

	// NumDepositConfirmations is the number of confirmations required before a
	// deposit is considered confirmed.
	NumDepositConfirmations uint64

	// PollInterval is the delay between querying L2 for more transaction
	// and creating a new batch.
	PollInterval time.Duration

	// SafeAbortNonceTooLowCount is the number of ErrNonceTooLowObservations
	// required to give up on a tx at a particular nonce without receiving
	// confirmation.
	SafeAbortNonceTooLowCount uint64

	// ResubmissionTimeout is time we will wait before resubmitting a
	// transaction.
	ResubmissionTimeout time.Duration

	// PostgresHost is the host of the teleportr postgres instance.
	PostgresHost string

	// PostgresPort is the port of the teleportr postgres instance.
	PostgresPort uint16

	// PostgresUser is the username for the teleportr postgres instance.
	PostgresUser string

	// PostgresPassword is the password for the teleportr postgres instance.
	PostgresPassword string

	// PostgresDBName is the database name of the teleportr postgres instance.
	PostgresDBName string

	// PostgresEnableSSL determines whether or not to enable SSL on connections
	// to the teleportr postgres instance.
	PostgresEnableSSL bool

	// LogLevel is the lowest log level that will be output.
	LogLevel string

	// LogTerminal if true, prints to stdout in terminal format, otherwise
	// prints using JSON. If SentryEnable is true this flag is ignored, and logs
	// are printed using JSON.
	LogTerminal bool

	// DisburserPrivKey the private key of the wallet used to submit
	// transactions to the TeleportrDisburser contract.
	DisburserPrivKey string

	// Mnemonic is the HD seed used to derive the wallet private key for
	// submitting to the TeleportrDisburser. Must be used in conjunction with
	// DisburserHDPath.
	Mnemonic string

	// DisburserHDPath is the derivation path used to obtain the private key for
	// the disburser transactions.
	DisburserHDPath string

	// MetricsServerEnable if true, will create a metrics client and log to
	// Prometheus.
	MetricsServerEnable bool

	// MetricsHostname is the hostname at which the metrics server is running.
	MetricsHostname string

	// MetricsPort is the port at which the metrics server is running.
	MetricsPort uint64

	// DisableHTTP2 disables HTTP2 support.
	DisableHTTP2 bool
}

func NewConfig

func NewConfig(ctx *cli.Context) (Config, error)

Directories

Path Synopsis
bindings
cmd
drivers

Jump to

Keyboard shortcuts

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