optimismclient

package
v0.0.0-...-5bfb8ac Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: LGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EthContext

type EthContext struct {
	BlockNumber uint64 `json:"blockNumber"`
	Timestamp   uint64 `json:"timestamp"`
}

type OptimismClient

type OptimismClient struct {
	*evmclient.EVMClient
	// contains filtered or unexported fields
}

func NewOptimismClient

func NewOptimismClient(cfg *config.OptimismConfig) (*OptimismClient, error)

NewOptimismClient creates a client for the Optimism chain configured with specified config.

func NewOptimismClientFromParams

func NewOptimismClientFromParams(url string, privateKey *ecdsa.PrivateKey, verifyRollup bool, verifierEndpoint string) (*OptimismClient, error)

NewEVMClientFromParams creates a client for EVMChain with provided private key.

func (*OptimismClient) LatestBlock

func (c *OptimismClient) LatestBlock() (*big.Int, error)

LatestBlock returns latest verified block. The OptimismClient treats only the last verified index or before as a valid chain

type RollupContext

type RollupContext struct {
	Index         uint64 `json:"index"`
	QueueIndex    uint64 `json:"queueIndex"`
	VerifiedIndex uint64 `json:"verifiedIndex"`
}

RollupContext represents the height of the rollup. Index is the last processed CanonicalTransactionChain index QueueIndex is the last processed `enqueue` index VerifiedIndex is the last processed CTC index that was batched

Jump to

Keyboard shortcuts

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