subscriber

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: LGPL-3.0 Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EthereumSubscriber

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

func NewEthereumSubscriber

func NewEthereumSubscriber(chainId string, rpcUrl string, logger log.Logger, repo repository.Repository) (*EthereumSubscriber, error)

func (*EthereumSubscriber) GetBlockData

func (sub *EthereumSubscriber) GetBlockData() (oracletypes.BlockData, error)

GetBlockData returns the latest block data

func (*EthereumSubscriber) Id

func (sub *EthereumSubscriber) Id() uint64

func (*EthereumSubscriber) OwnerOf

func (sub *EthereumSubscriber) OwnerOf(ctx context.Context, nftAddressHex string, tokenIdHex string, blockHash string) (string, error)

func (*EthereumSubscriber) Start

func (sub *EthereumSubscriber) Start(ctx context.Context)

func (*EthereumSubscriber) Stop

func (sub *EthereumSubscriber) Stop()

type Subscriber

type Subscriber interface {
	Id() uint64
	Start(ctx context.Context)
	Stop()
	GetBlockData() (oracletypes.BlockData, error)
	OwnerOf(ctx context.Context, nftAddressHex string, tokenIdHex string, blockHash string) (string, error)
}

func InitSubscribers

func InitSubscribers(config *config.Config, logger log.Logger) (subscribers []Subscriber, err error)

func NewSubscriber

func NewSubscriber(config config.ChainConfig, logger log.Logger, repo repository.Repository) (Subscriber, error)

Jump to

Keyboard shortcuts

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