Documentation ¶
Index ¶
- type ChainNode
- func (p ChainNode) GetCollectionMetadata(contractAddress common.Address) *CollectionMetadata
- func (p ChainNode) GetCollectionName(contractAddress common.Address) string
- func (p ChainNode) GetTokenImageURI(contractAddress common.Address, tokenID uint64) (string, error)
- func (p ChainNode) GetTokenMetadata(tokenURI string) (*MetadataERC721, error)
- func (p ChainNode) GetTokenURI(contractAddress common.Address, tokenID *big.Int) (string, error)
- func (p ChainNode) SubscribeToContract(ctx context.Context, queueLogs chan types.Log, contractAddress common.Address) (ethereum.Subscription, error)
- func (p ChainNode) SubscribeToOrdersMatched(ctx context.Context, queueLogs chan types.Log) (ethereum.Subscription, error)
- func (p ChainNode) SubscribeToSingleTransfers(ctx context.Context, queueLogs chan types.Log) (ethereum.Subscription, error)
- func (p ChainNode) SubscribeToSingleTransfersFor(ctx context.Context, queueLogs chan types.Log, ...) (ethereum.Subscription, error)
- func (p ChainNode) SubscribeToTransfers(ctx context.Context, queueLogs chan types.Log) (ethereum.Subscription, error)
- func (p ChainNode) SubscribeToTransfersFor(ctx context.Context, queueLogs chan types.Log, ...) (ethereum.Subscription, error)
- type CollectionMetadata
- type MetadataERC721
- type NodeCollection
- type Topic
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChainNode ¶
type ChainNode struct { Name string `mapstructure:"name"` Client *ethclient.Client WebsocketsEndpoint string `mapstructure:"url"` }
ChainNode represents a w3 provider configuration.
func (ChainNode) GetCollectionMetadata ¶
func (p ChainNode) GetCollectionMetadata(contractAddress common.Address) *CollectionMetadata
func (ChainNode) GetCollectionName ¶
func (ChainNode) GetTokenImageURI ¶
func (ChainNode) GetTokenMetadata ¶
func (p ChainNode) GetTokenMetadata(tokenURI string) (*MetadataERC721, error)
func (ChainNode) GetTokenURI ¶
func (ChainNode) SubscribeToContract ¶
func (ChainNode) SubscribeToOrdersMatched ¶
func (ChainNode) SubscribeToSingleTransfers ¶
func (ChainNode) SubscribeToSingleTransfersFor ¶
func (ChainNode) SubscribeToTransfers ¶
type CollectionMetadata ¶
type MetadataERC721 ¶
type MetadataERC721 struct {
Image string `json:"image"`
}
type NodeCollection ¶
type NodeCollection []*ChainNode
func GetNodesFromConfig ¶
func GetNodesFromConfig(endpoints []string) *NodeCollection
GetNodesFromConfig reads the websockets endpoints slice from config, connects to them and returns a list with successfully connected nodes.
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(ctx context.Context, queueLogs chan types.Log)
type Topic ¶
type Topic string
const ( OrdersMatched Topic = "0xc4109843e0b7d514e4c093114b863f8e7d8d9a458c372cd51bfe526b588006c9" Transfer Topic = "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef" TransferSingle Topic = "0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62" ApprovalForAll Topic = "0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31" )
Click to show internal directories.
Click to hide internal directories.