utils

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultDialTimeout is default duration the service will wait on
	// startup to make a connection to either the L1 or L2 backends.
	DefaultDialTimeout = 5 * time.Second
)

Variables

This section is empty.

Functions

func DialEthClientWithTimeout

func DialEthClientWithTimeout(ctx context.Context, url string) (*ethclient.Client, error)

DialEthClientWithTimeout attempts to dial the L1 provider using the provided URL. If the dial doesn't complete within defaultDialTimeout seconds, this method will return an error.

func DialRollupClientWithTimeout

func DialRollupClientWithTimeout(ctx context.Context, url string) (*sources.RollupClient, error)

DialRollupClientWithTimeout attempts to dial the RPC provider using the provided URL. If the dial doesn't complete within defaultDialTimeout seconds, this method will return an error.

func NewCallOptsWithSender

func NewCallOptsWithSender(ctx context.Context, sender common.Address) *bind.CallOpts

func NewSimpleCallOpts

func NewSimpleCallOpts(ctx context.Context) *bind.CallOpts

func NewSimpleTxOpts

func NewSimpleTxOpts(ctx context.Context, from common.Address, signerFn crypto.SignerFn) *bind.TransactOpts

func NewSimpleWatchOpts added in v0.3.0

func NewSimpleWatchOpts(ctx context.Context) *bind.WatchOpts

func ParseAddress

func ParseAddress(address string) (common.Address, error)

ParseAddress parses an ETH address from a hex string. This method will fail if the address is not a valid hexadecimal address.

Types

type InterruptChan

type InterruptChan chan os.Signal

func WaitInterrupt

func WaitInterrupt() InterruptChan

Directories

Path Synopsis
chain-ops
clock
Package clock provides an abstraction for time to enable testing of functionality that uses time as an input.
Package clock provides an abstraction for time to enable testing of functionality that uses time as an input.
log
rpc
tls
This file contains CLI and env TLS configurations that can be used by clients or servers
This file contains CLI and env TLS configurations that can be used by clients or servers
tls/certman
Package certman provides live reloading of the certificate and key files used by the standard library http.Server.
Package certman provides live reloading of the certificate and key files used by the standard library http.Server.
signer

Jump to

Keyboard shortcuts

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