Documentation ¶
Index ¶
Constants ¶
View Source
const LoggerTag = "ETHEREUM_TELEPORT_LISTENER"
View Source
const SignatureKey = "ethereum"
View Source
const TeleportEventType = "teleport_evm"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶ added in v0.5.0
type Client interface { BlockNumber(ctx context.Context) (uint64, error) FilterLogs(ctx context.Context, q geth.FilterQuery) ([]types.Log, error) }
Client is a Ethereum compatible client.
type Signer ¶
type Signer struct {
// contains filtered or unexported fields
}
Signer signs Ethereum logger messages using Ethereum signature.
type TeleportListener ¶ added in v0.5.0
type TeleportListener struct {
// contains filtered or unexported fields
}
TeleportListener listens to TeleportGUID events on Ethereum compatible blockchains.
https://github.com/makerdao/dss-teleport
func NewTeleportListener ¶ added in v0.5.0
func NewTeleportListener(cfg TeleportListenerConfig) *TeleportListener
NewTeleportListener returns a new instance of the TeleportListener struct.
func (*TeleportListener) Events ¶ added in v0.5.0
func (tl *TeleportListener) Events() chan *messages.Event
Events implements the publisher.Listener interface.
type TeleportListenerConfig ¶ added in v0.5.0
type TeleportListenerConfig struct { // Client is an instance of Ethereum RPC client. Client Client // Addresses is a list of contracts from which logs will be fetched. Addresses []ethereum.Address // Interval specifies how often listener should check for new logs. Interval time.Duration // BlocksDelta is a list of distances between the latest block on the // blockchain and blocks from which logs are to be taken. The purpose of // this field is to ensure that older events are resent from time to time. // This is to allow other clients on the Oracle network to restore its // state and ensure that no events are missed in the event of an Oracle // failure. BlocksDelta []int // BlocksLimit specifies how from many blocks logs can be fetched at once. BlocksLimit int // Logger is a current logger interface used by the TeleportListener. // The Logger is used to monitor asynchronous processes. Logger log.Logger }
TeleportListenerConfig contains a configuration options for NewTeleportListener.
Click to show internal directories.
Click to hide internal directories.