Documentation ¶
Index ¶
- type BlockCache
- type BlockData
- type EthereumSubscriber
- func (sub *EthereumSubscriber) GetOldestBlock(timestamp uint64) (oracletypes.BlockData, error)
- func (sub *EthereumSubscriber) Id() string
- func (sub *EthereumSubscriber) OwnerOf(_ context.Context, nftAddressHex string, tokenIdHex string, blockHash string) (string, error)
- func (sub *EthereumSubscriber) Start(ctx context.Context)
- func (sub *EthereumSubscriber) Stop()
- type Subscriber
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockCache ¶ added in v0.3.0
type BlockCache struct {
// contains filtered or unexported fields
}
func NewBlockCache ¶ added in v0.3.0
func NewBlockCache(size int) *BlockCache
func (BlockCache) GetOldestBlock ¶ added in v0.3.0
func (c BlockCache) GetOldestBlock(timetsamp uint64) (string, int64)
func (BlockCache) PutBlockData ¶ added in v0.3.0
func (c BlockCache) PutBlockData(hash string, number int64, timestamp uint64)
type EthereumSubscriber ¶
type EthereumSubscriber struct {
// contains filtered or unexported fields
}
func NewEthereumSubscriber ¶
func (*EthereumSubscriber) GetOldestBlock ¶ added in v0.0.6
func (sub *EthereumSubscriber) GetOldestBlock(timestamp uint64) (oracletypes.BlockData, error)
GetOldestBlock returns the latest block data
func (*EthereumSubscriber) Id ¶
func (sub *EthereumSubscriber) Id() string
func (*EthereumSubscriber) OwnerOf ¶
func (sub *EthereumSubscriber) OwnerOf(_ context.Context, nftAddressHex string, tokenIdHex string, blockHash string) (string, error)
OwnerOf returns the owner of the given NFT
func (*EthereumSubscriber) Start ¶
func (sub *EthereumSubscriber) Start(ctx context.Context)
func (*EthereumSubscriber) Stop ¶
func (sub *EthereumSubscriber) Stop()
type Subscriber ¶
type Subscriber interface { Id() string Start(ctx context.Context) Stop() GetOldestBlock(timestamp uint64) (oracletypes.BlockData, error) OwnerOf(ctx context.Context, nftAddressHex string, tokenIdHex string, blockHash string) (string, error) }
func InitSubscribers ¶
func NewSubscriber ¶
func NewSubscriber(config config.ChainConfig, logger log.Logger) (Subscriber, error)
Click to show internal directories.
Click to hide internal directories.