teleportevm

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2022 License: AGPL-3.0 Imports: 14 Imported by: 0

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.

func NewSigner

func NewSigner(signer ethereum.Signer, types []string) *Signer

NewSigner returns a new instance of the Signer struct.

func (*Signer) Sign

func (l *Signer) Sign(event *messages.Event) (bool, error)

Sign implements the Signer interface.

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

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.

func (*TeleportEventProvider) Start

func (tp *TeleportEventProvider) Start(ctx context.Context) error

Start 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.

Jump to

Keyboard shortcuts

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