Documentation
¶
Index ¶
- type Adapter
- type AdapterListener
- type ChangeEtherLog
- type DB
- type DoInit
- type Ethers
- type FlushEthersToDB
- type FlushNFTToDB
- type FlushToDB
- type Harvester
- type NFTCell
- type NFTs
- type NewBlock
- type QueueInit
- type RemoveNFTFromDB
- type SubscribeQueue
- type TokenCell
- type Tokens
- type TransferERC20Log
- type TransferNFTLog
- type UpdateCell
- type UpdateNFTEvent
- type UpsertEtherToDB
- type UpsertNFTToDB
- type UpsertTokenToDB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter interface { GetLastBlockNumber() (uint64, error) GetTokenBalance(contract *common.Address, wallet *common.Address, blockNumber uint64) (*big.Int, uint64, error) GetNFTBalance(nftContract *common.Address, wallet *common.Address, block uint64) ([]common.Hash, error) GetEtherBalance(wallet *common.Address, block uint64) (*big.Int, error) GetTokenLogs(fromBlock, toBlock uint64, addresses []common.Address) ([]any, error) GetNFTLogs(fromBlock, toBlock uint64, contracts []common.Address) ([]any, error) GetEtherLogs(fromBlock, toBlock uint64, wallets map[common.Address]bool) ([]ChangeEtherLog, error) RegisterNewBlockListener(f AdapterListener) Run() GetInfo() (umid umid.UMID, name string, rpcURL string) }
type AdapterListener ¶
type AdapterListener func(blockNumber uint64)
type ChangeEtherLog ¶ added in v0.5.6
type DB ¶ added in v0.5.6
type DB struct {
// contains filtered or unexported fields
}
type Ethers ¶ added in v0.5.6
type Ethers struct { SubscribeQueue *SubscribeQueue DB *DB DefaultContract common.Address // contains filtered or unexported fields }
func NewEthers ¶ added in v0.5.6
func NewEthers(db *pgxpool.Pool, adapter Adapter, logger *zap.SugaredLogger, output chan<- UpdateCell) *Ethers
type FlushEthersToDB ¶ added in v0.5.6
type FlushEthersToDB struct {
// contains filtered or unexported fields
}
type FlushNFTToDB ¶ added in v0.5.6
type FlushNFTToDB struct {
// contains filtered or unexported fields
}
type FlushToDB ¶ added in v0.5.6
type FlushToDB struct {
// contains filtered or unexported fields
}
type Harvester ¶
type Harvester struct {
// contains filtered or unexported fields
}
func NewHarvester ¶
func NewHarvester(updateCells chan UpdateCell, pool *pgxpool.Pool, adapter Adapter, logger *zap.SugaredLogger) *Harvester
func (*Harvester) AddNFTContract ¶ added in v0.5.6
func (*Harvester) AddTokenContract ¶ added in v0.5.6
type NFTs ¶ added in v0.5.6
type NFTs struct { SubscribeQueue *SubscribeQueue DB *DB // contains filtered or unexported fields }
func NewNFTs ¶ added in v0.5.6
func NewNFTs(db *pgxpool.Pool, adapter Adapter, logger *zap.SugaredLogger, output chan<- UpdateCell) *NFTs
func (*NFTs) AddContract ¶ added in v0.5.6
type QueueInit ¶ added in v0.5.6
type QueueInit struct {
// contains filtered or unexported fields
}
type RemoveNFTFromDB ¶ added in v0.5.6
type RemoveNFTFromDB struct {
// contains filtered or unexported fields
}
type SubscribeQueue ¶ added in v0.5.6
type SubscribeQueue struct {
// contains filtered or unexported fields
}
func NewSubscribeQueue ¶ added in v0.5.6
func NewSubscribeQueue(updates chan any) *SubscribeQueue
func (*SubscribeQueue) AddContract ¶ added in v0.5.6
func (q *SubscribeQueue) AddContract(contract common.Address) error
func (*SubscribeQueue) AddWallet ¶ added in v0.5.6
func (q *SubscribeQueue) AddWallet(wallet common.Address) error
func (*SubscribeQueue) MarkAsLoadedFromDB ¶ added in v0.5.6
func (q *SubscribeQueue) MarkAsLoadedFromDB(contract, wallet common.Address)
type Tokens ¶ added in v0.5.6
type Tokens struct { SubscribeQueue *SubscribeQueue DB *DB // contains filtered or unexported fields }
func NewTokens ¶ added in v0.5.6
func NewTokens(db *pgxpool.Pool, adapter Adapter, logger *zap.SugaredLogger, output chan<- UpdateCell) *Tokens
func (*Tokens) AddContract ¶ added in v0.5.6
type TransferERC20Log ¶
type TransferNFTLog ¶
type UpdateCell ¶ added in v0.5.6
type UpdateNFTEvent ¶ added in v0.5.6
type UpsertEtherToDB ¶ added in v0.5.6
type UpsertEtherToDB struct {
// contains filtered or unexported fields
}
type UpsertNFTToDB ¶ added in v0.5.6
type UpsertNFTToDB struct {
// contains filtered or unexported fields
}
type UpsertTokenToDB ¶ added in v0.5.6
type UpsertTokenToDB struct {
// contains filtered or unexported fields
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.