Documentation ¶
Index ¶
- func GetEcdsaKeyAddress(privateKey string) (*ecdsa.PrivateKey, string, error)
- func GetEthereumAccountNonce(endpoint string, address string) (int64, error)
- type ChainConfig
- type ContractBackendWrapper
- type Ethereum
- func (e *Ethereum) Broadcast(ctx context.Context, logger log.Logger, msgs []*types.MessageState, ...) error
- func (e *Ethereum) CloseClients() error
- func (e *Ethereum) Domain() types.Domain
- func (e *Ethereum) InitializeBroadcaster(ctx context.Context, logger log.Logger, sequenceMap *types.SequenceMap) error
- func (e *Ethereum) InitializeClients(ctx context.Context, logger log.Logger) error
- func (e *Ethereum) IsDestinationCaller(destinationCaller []byte) (isCaller bool, readableAddress string)
- func (e *Ethereum) LastFlushedBlock() uint64
- func (e *Ethereum) LatestBlock() uint64
- func (e *Ethereum) Name() string
- func (e *Ethereum) SetLatestBlock(block uint64)
- func (e *Ethereum) StartListener(ctx context.Context, logger log.Logger, processingQueue chan *types.TxState, ...)
- func (e *Ethereum) TrackLatestBlockHeight(ctx context.Context, logger log.Logger, m *relayer.PromMetrics)
- func (e *Ethereum) WalletBalanceMetric(ctx context.Context, logger log.Logger, m *relayer.PromMetrics)
- type JSONError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEcdsaKeyAddress ¶
func GetEcdsaKeyAddress(privateKey string) (*ecdsa.PrivateKey, string, error)
GetEcdsaKeyAddress returns the public ecdsa key and address given the private key
Types ¶
type ChainConfig ¶
type ChainConfig struct { RPC string `yaml:"rpc"` WS string `yaml:"ws"` Domain types.Domain ChainID int64 `yaml:"chain-id"` MessageTransmitter string `yaml:"message-transmitter"` StartBlock uint64 `yaml:"start-block"` LookbackPeriod uint64 `yaml:"lookback-period"` BroadcastRetries int `yaml:"broadcast-retries"` BroadcastRetryInterval int `yaml:"broadcast-retry-interval"` MinMintAmount uint64 `yaml:"min-mint-amount"` MetricsDenom string `yaml:"metrics-denom"` MetricsExponent int `yaml:"metrics-exponent"` MinterPrivateKey string `yaml:"minter-private-key"` }
type ContractBackendWrapper ¶
func NewContractBackendWrapper ¶
func NewContractBackendWrapper(client *ethclient.Client) *ContractBackendWrapper
func (*ContractBackendWrapper) SendTransaction ¶
func (c *ContractBackendWrapper) SendTransaction(ctx context.Context, tx *types.Transaction) error
type Ethereum ¶
type Ethereum struct { MetricsDenom string MetricsExponent int // contains filtered or unexported fields }
func NewChain ¶
func NewChain( name string, domain types.Domain, chainID int64, rpcURL string, wsURL string, messageTransmitterAddress string, startBlock uint64, lookbackPeriod uint64, privateKey string, maxRetries int, retryIntervalSeconds int, minAmount uint64, metricsDenom string, metricsExponent int, ) (*Ethereum, error)
func (*Ethereum) Broadcast ¶
func (e *Ethereum) Broadcast( ctx context.Context, logger log.Logger, msgs []*types.MessageState, sequenceMap *types.SequenceMap, m *relayer.PromMetrics, ) error
func (*Ethereum) CloseClients ¶ added in v0.1.2
func (*Ethereum) InitializeBroadcaster ¶
func (*Ethereum) InitializeClients ¶ added in v0.1.2
func (*Ethereum) IsDestinationCaller ¶
func (*Ethereum) LastFlushedBlock ¶ added in v0.1.2
func (*Ethereum) LatestBlock ¶ added in v0.1.2
func (*Ethereum) SetLatestBlock ¶ added in v0.1.2
func (*Ethereum) StartListener ¶
func (e *Ethereum) StartListener( ctx context.Context, logger log.Logger, processingQueue chan *types.TxState, flushInterval time.Duration, )
StartListener starts the ethereum websocket subscription, queries history pertaining to the lookback period, and starts the reoccurring flush
If an error occurs in websocket stream, this function will handle relevant sub routines and then re-run itself.
func (*Ethereum) TrackLatestBlockHeight ¶ added in v0.1.2
func (*Ethereum) WalletBalanceMetric ¶ added in v0.1.2
Source Files ¶
Click to show internal directories.
Click to hide internal directories.