gloomberg

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: MIT Imports: 43 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrWalletBalance = fmt.Errorf("error fetching wallet balance")

ErrWalletBalance given for issues while fetching wallet balances.

Functions

func CheckEIP6551TokenAccount added in v0.11.0

func CheckEIP6551TokenAccount(gb *Gloomberg, tokenContract *common.Address, tokenID *big.Int) (bool, *common.Address, error)

func FirstTxsWorker added in v0.11.0

func FirstTxsWorker()

func GasTicker added in v0.9.1

func GasTicker(gb *Gloomberg, gasTicker *time.Ticker, providerPool *provider.Pool, queueOutput chan string)

func GetFirstTxsForContract added in v0.11.0

func GetFirstTxsForContract(collectionName string, contractAddress common.Address)

GetFirstTxsForContract fetches the first 1337 txs for a contract from etherscan and saves them to a json file.

func GetServerTLSConfig added in v0.11.0

func GetServerTLSConfig() (*tls.Config, error)

func GetTLSClientCredentials added in v0.11.0

func GetTLSClientCredentials() credentials.TransportCredentials

func GetTLSCredentialsWithoutClientAuth added in v0.11.0

func GetTLSCredentialsWithoutClientAuth() (credentials.TransportCredentials, error)

func JobCheckEIP6551TokenAccount added in v0.11.0

func JobCheckEIP6551TokenAccount(params ...any)

func JobFirstTxsForContract added in v0.11.0

func JobFirstTxsForContract(params ...any)

Types

type FirstTxsTask added in v0.11.0

type FirstTxsTask struct {
	CollectionName  string
	ContractAddress common.Address
}

type Gloomberg

type Gloomberg struct {
	// Nodes        *nodes.Nodes
	ProviderPool *provider.Pool
	Watcher      *watch.Watcher

	CollectionDB *collections.CollectionDB
	OwnWallets   *wallet.Wallets
	Stats        *Stats

	RecentOwnEvents mapset.Set[*degendb.ParsedEvent]

	Ranks map[common.Address]map[int64]degendb.TokenRank

	Rdb    rueidis.Client
	Rueidi *rueidica.Rueidica

	QueueSlugs chan common.Address

	CurrentGasPriceGwei   uint64
	CurrentOnlineWebUsers uint64

	// GloomHub *gloomhub
	Jobs *jobs.Runner
	*degendb.DegenDB

	// misc / maybe find better solutions...
	PrintConfigurations map[string]*printConfig
	// contains filtered or unexported fields
}

func New added in v0.7.1

func New() *Gloomberg

func (*Gloomberg) Pr added in v0.7.5

func (gb *Gloomberg) Pr(message string)

Pr prints messages from gloomberg to the terminal.

func (*Gloomberg) PrDMod added in v0.8.2

func (gb *Gloomberg) PrDMod(mod string, message string)

PrDMod prints messages from gloomberg to the terminal if debug mode is enabled.

func (*Gloomberg) PrDModf added in v0.8.2

func (gb *Gloomberg) PrDModf(mod string, format string, a ...any)

PrDModf formats and prints messages from gloomberg to the terminal if debug mode is enabled.

func (*Gloomberg) PrMod added in v0.7.5

func (gb *Gloomberg) PrMod(mod string, message string)

func (*Gloomberg) PrModf added in v0.8.2

func (gb *Gloomberg) PrModf(mod string, format string, a ...any)

PrModf formats and prints messages from gloomberg to the terminal.

func (*Gloomberg) PrVMod added in v0.8.2

func (gb *Gloomberg) PrVMod(mod string, message string)

PrVMod prints messages from gloomberg to the terminal if verbose mode is enabled.

func (*Gloomberg) PrVModf added in v0.8.2

func (gb *Gloomberg) PrVModf(mod string, format string, a ...any)

PrVModf formats and prints messages from gloomberg to the terminal if verbose mode is enabled.

func (*Gloomberg) PrWarn added in v0.7.5

func (gb *Gloomberg) PrWarn(message string)

func (*Gloomberg) PrWithKeywordAndIcon added in v0.7.5

func (gb *Gloomberg) PrWithKeywordAndIcon(icon string, keyword string, message string)

func (*Gloomberg) Prf added in v0.7.6

func (gb *Gloomberg) Prf(format string, a ...any)

Prf formats and prints messages from gloomberg to the terminal.

func (*Gloomberg) SendSlugsToServer

func (gb *Gloomberg) SendSlugsToServer()

func (*Gloomberg) String added in v0.11.0

func (gb *Gloomberg) String()

func (Gloomberg) SubscribNewBlocks added in v0.7.3

func (eh Gloomberg) SubscribNewBlocks() chan uint64

func (Gloomberg) SubscribeCollectionOffer added in v0.7.3

func (eh Gloomberg) SubscribeCollectionOffer() chan *models.CollectionOffer

func (Gloomberg) SubscribeItemListed added in v0.7.1

func (eh Gloomberg) SubscribeItemListed() chan *models.ItemListed

func (Gloomberg) SubscribeItemMetadataUpdated added in v0.11.0

func (eh Gloomberg) SubscribeItemMetadataUpdated() chan *models.ItemMetadataUpdated

func (Gloomberg) SubscribeItemReceivedBid added in v0.7.3

func (eh Gloomberg) SubscribeItemReceivedBid() chan *models.ItemReceivedBid

func (Gloomberg) SubscribeParsedEvents added in v0.10.0

func (eh Gloomberg) SubscribeParsedEvents() chan *degendb.ParsedEvent

func (Gloomberg) SubscribePrintToTerminal added in v0.7.1

func (eh Gloomberg) SubscribePrintToTerminal() chan string

func (Gloomberg) SubscribeRecentOwnEvents added in v0.11.0

func (eh Gloomberg) SubscribeRecentOwnEvents() chan []*degendb.ParsedEvent

func (Gloomberg) SubscribeSeawatcherMgmt added in v0.8.0

func (eh Gloomberg) SubscribeSeawatcherMgmt() chan *models.MgmtEvent

func (Gloomberg) SubscribeTokenTransactions added in v0.7.3

func (eh Gloomberg) SubscribeTokenTransactions() chan *totra.TokenTransaction

func (Gloomberg) SubscribeTxWithLogs added in v0.7.1

func (eh Gloomberg) SubscribeTxWithLogs() chan *chawagoModels.TxWithLogs

type Stats added in v0.9.1

type Stats struct {
	RecentEvents mapset.Set[*degendb.RecentEvent]

	NewLogs        uint64
	NewListings    uint64
	EventsToFormat uint64
	OutputLines    uint64
	// contains filtered or unexported fields
}

func NewStats added in v0.9.1

func NewStats(gb *Gloomberg, gasTicker *time.Ticker, wallets *wallet.Wallets, providerPool *provider.Pool, rdb rueidis.Client) *Stats

func (*Stats) AddEvent added in v0.9.1

func (s *Stats) AddEvent(eventType degendb.EventType, amountTokens int64, value *big.Int)

func (*Stats) Print added in v0.9.1

func (s *Stats) Print(queueOutput chan string)

func (*Stats) StartTicker added in v0.9.1

func (s *Stats) StartTicker(intervalPrintStats time.Duration, queueOutput chan string)

func (*Stats) UpdateBalances added in v0.9.1

func (s *Stats) UpdateBalances() (*wallet.Wallets, error)

Jump to

Keyboard shortcuts

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