Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EventSyncer = &globalListenerManager{ listeners: make(map[string]*listenerInfo), }
EventSyncer is the singleton that is responsible for syncing events from Ethereum.
View Source
var StatePoller = &statePoller{}
StatePoller is the global instance of the state poller extension, which allows polling for state on Ethereum. Unlike normal listeners (which are registered in init), StatePoller allows registration to be performed on-demand as part of the consensus process. It also provides access to an EVM client for the target chain, accessed via the local node's configuration.
Functions ¶
This section is empty.
Types ¶
type EVMEventListenerConfig ¶
type EVMEventListenerConfig struct {
// UniqueName is a unique name for the listener.
// It MUST be unique from all other listeners.
UniqueName string
// ContractAddresses is a list of contract addresses to listen to events from.
ContractAddresses []string
// EventSignatures is a list of event signatures to listen to.
// All events from any contract configured matching any of these signatures will be emitted.
// It is optional and defaults to all events.
EventSignatures []string
// Chain is the chain that the listener is listening to.
Chain chains.Chain
// Resolve is the function that will be called the Kwil network
// has confirmed events from Ethereum.
Resolve ResolveFunc
}
EVMEventListenerConfig is the configuration for an EVM event listener.
type EVMPollFunc ¶
type PollConfig ¶
type PollConfig struct {
// Chain is the chain to poll
Chain chains.Chain
// PollFunc is the function to call to poll the chain
PollFunc EVMPollFunc
// ResolveFunc is the function to call to resolve the state
ResolveFunc resolutions.ResolveFunc
// UniqueName is a unique name for the poller
UniqueName string
}
Click to show internal directories.
Click to hide internal directories.