context

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: May 2, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	ctx.Context
	Cfg        *config.Cfg
	Config     *config.Config
	DisableTUI bool

	KeystoreExists bool
	SetNewSecret   bool
	EditSecret     bool
	NewSecret      *Secret

	Unlocked         bool
	LastUnlockedTime time.Time
	UnlockerMsg      string

	Network *database.Network

	LatencyResultChan chan LatencyResult
	LatencyResultDone chan struct{}
	BestLatency       int
	Endpoint          *database.Endpoint
	Client            *chain.Client

	TokenContract string
	Token0        *database.Token
	Token1        *database.Token

	Dex       *database.Dex
	TradeType *database.TradeType

	Price *chain.Price

	RawBuyTargets  []*database.RawTarget
	BuyTargets     database.Targets
	RawSellTargets []*database.RawTarget
	SellTargets    database.Targets

	Trade *database.Trade
}

func New

func New(config *config.Config, cfg *config.Cfg) *Context

New context.

func Wrap

func Wrap(ctx ctx.Context, config *config.Config, cfg *config.Cfg) *Context

Wrap wraps an existing context.

type LatencyResult

type LatencyResult struct {
	URL     string
	Latency int
}

type Secret

type Secret struct {
	Secret     string
	Index      int
	IsMnmeonic bool
}

Jump to

Keyboard shortcuts

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