gbnode

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2022 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainNode

type ChainNode struct {
	NodeID             int    `mapstructure:"id"`
	Name               string `mapstructure:"name"`
	Marker             string `mapstructure:"marker"`
	Client             *ethclient.Client
	WebsocketsEndpoint string     `mapstructure:"endpoint"`
	ReceivedMessages   uint64     `mapstructure:"received_messages"`
	KillTimer          time.Timer `mapstructure:"kill_timer"`
	Error              error      `mapstructure:"error"`
	NumLogsReceived    uint64
	LastLogReceived    int64
	LocalNode          bool
}

ChainNode represents a w3 provider configuration.

func (ChainNode) GetCollectionMetadata

func (p ChainNode) GetCollectionMetadata(contractAddress common.Address) *models.CollectionMetadata

func (ChainNode) GetCollectionName

func (p ChainNode) GetCollectionName(contractAddress common.Address) (string, error)

func (ChainNode) GetTokenImageURI

func (p ChainNode) GetTokenImageURI(contractAddress common.Address, tokenID uint64) (string, error)

func (ChainNode) GetTokenMetadata

func (p ChainNode) GetTokenMetadata(tokenURI string) (*models.MetadataERC721, error)

func (ChainNode) GetTokenURI

func (p ChainNode) GetTokenURI(contractAddress common.Address, tokenID *big.Int) (string, error)

func (ChainNode) SubscribeToContract

func (p ChainNode) SubscribeToContract(queueLogs chan types.Log, contractAddress common.Address) (ethereum.Subscription, error)

func (ChainNode) SubscribeToOrdersMatched

func (p ChainNode) SubscribeToOrdersMatched(queueLogs chan types.Log) (ethereum.Subscription, error)

func (ChainNode) SubscribeToSingleTransfers

func (p ChainNode) SubscribeToSingleTransfers(queueLogs chan types.Log) (ethereum.Subscription, error)

func (ChainNode) SubscribeToSingleTransfersFor

func (p ChainNode) SubscribeToSingleTransfersFor(queueLogs chan types.Log, contractAddresses []common.Address) (ethereum.Subscription, error)

func (ChainNode) SubscribeToTransfers

func (p ChainNode) SubscribeToTransfers(queueLogs chan types.Log) (ethereum.Subscription, error)

func (ChainNode) SubscribeToTransfersFor

func (p ChainNode) SubscribeToTransfersFor(queueLogs chan types.Log, contractAddresses []common.Address) (ethereum.Subscription, error)

type NodeCollection

type NodeCollection []*ChainNode

func (*NodeCollection) GetNodeByID added in v0.0.16

func (nc *NodeCollection) GetNodeByID(nodeID int) *ChainNode

GetNodeByID GetNodes returns all nodes as slice.

func (*NodeCollection) GetNodes

func (nc *NodeCollection) GetNodes() []*ChainNode

GetNodes returns all nodes as slice.

func (*NodeCollection) GetRandomNode

func (nc *NodeCollection) GetRandomNode() *ChainNode

GetRandomNode returns a random available ethereum node.

func (*NodeCollection) SubscribeToAllTransfers

func (nc *NodeCollection) SubscribeToAllTransfers(queueLogs chan types.Log)

type Topic

type Topic string
const (
	OrdersMatched  Topic = "0xc4109843e0b7d514e4c093114b863f8e7d8d9a458c372cd51bfe526b588006c9"
	Transfer       Topic = "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
	TransferSingle Topic = "0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62"
	ApprovalForAll Topic = "0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31"
)

func (Topic) String

func (t Topic) String() string

Jump to

Keyboard shortcuts

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