Documentation ¶
Index ¶
Constants ¶
View Source
const LoggerTag = "ETHEREUM_TELEPORT"
View Source
const SignatureKey = "ethereum"
View Source
const TeleportEventType = "teleport_evm"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
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 TeleportEventProvider ¶
type TeleportEventProvider struct {
// contains filtered or unexported fields
}
TeleportEventProvider listens to TeleportGUID events on Ethereum compatible blockchains.
https://github.com/makerdao/dss-teleport
func New ¶
func New(cfg TeleportEventProviderConfig) *TeleportEventProvider
New returns a new instance of the TeleportEventProvider struct.
func (*TeleportEventProvider) Events ¶
func (tp *TeleportEventProvider) Events() chan *messages.Event
Events implements the publisher.Listener interface.
type TeleportEventProviderConfig ¶
type TeleportEventProviderConfig 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 provider 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. 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 TeleportEventProvider. // The Logger is used to monitor asynchronous processes. Logger log.Logger }
TeleportEventProviderConfig contains a configuration options for New.
Click to show internal directories.
Click to hide internal directories.