flopparser

package
v0.0.0-...-61bd5a7 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auction

type Auction struct {
	ID    uint64 `json:"id"`
	Phase string `json:"phase"`
	Lot   string `json:"lot"`
	Bid   string `json:"bid"`
	Guy   string `json:"guy"`
	Tic   uint64 `json:"tic"`
	End   uint64 `json:"end"`
}

Auction defines an auction

type BidEvent

type BidEvent struct {
	ID       uint64 `json:"id"`
	Lot      string `json:"lot"`
	Bid      string `json:"bid"`
	Usr      string `json:"usr"`
	BlockNum uint64 `json:"blockNum"`
	TxIndex  uint64 `json:"txIndex"`
}

BidEvent defines a bid event

type FlopParser

type FlopParser struct {
	// contains filtered or unexported fields
}

FlopParser defines a flop parser

func New

func New(
	startBlockNum *big.Int,
	contract contracts.FlopContract,
	stateChan chan State,
	kickChan chan KickEvent,
) *FlopParser

New creates a new flop parser instance

func (*FlopParser) Run

func (p *FlopParser) Run()

Run starts the main execution routine

type History

type History struct {
	ID  uint64 `json:"id"`
	Lot string `json:"lot"`
	Bid string `json:"bid"`
	Guy string `json:"guy"`
	End uint64 `json:"end"`
}

History defines an auction history

type KickEvent

type KickEvent struct {
	ID       uint64 `json:"id"`
	Lot      string `json:"lot"`
	Bid      string `json:"bid"`
	BlockNum uint64 `json:"blockNum"`
	TxIndex  uint64 `json:"txIndex"`
}

KickEvent defines a kick event

type State

type State struct {
	LastBlock uint64 `json:"lastBlock"`

	Auctions  map[uint64]Auction `json:"auctions"`
	Histories map[uint64]History `json:"histories"`

	KickEvents    map[uint64]KickEvent `json:"kickEvents"`
	LastBidEvents map[uint64]BidEvent  `json:"bidEvents"`

	TTLs []TTLEvent `json:"ttls"`
	TAUs []TAUEvent `json:"taus"`
}

State defines the state of the flop parser

type TAUEvent

type TAUEvent struct {
	TAU      string `json:"tau"`
	BlockNum uint64 `json:"blockNum"`
	TxIndex  uint64 `json:"txIndex"`
}

TAUEvent defines a tau change

type TTLEvent

type TTLEvent struct {
	TTL      string `json:"ttl"`
	BlockNum uint64 `json:"blockNum"`
	TxIndex  uint64 `json:"txIndex"`
}

TTLEvent defines a ttl change

Jump to

Keyboard shortcuts

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