util

package
v0.0.0-...-eb934a0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// EIP1976ImplementationSlot
	EIP1967ImplementationSlot = common.HexToHash("0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc")
	// EIP1967AdminSlot
	EIP1967AdminSlot = common.HexToHash("0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103")
)
View Source
var AddressesFlags = []cli.Flag{
	&cli.StringFlag{
		Name:    "address-manager-address",
		Usage:   "AddressManager address",
		EnvVars: []string{"ADDRESS_MANAGER_ADDRESS"},
	},
	&cli.StringFlag{
		Name:    "slice-portal-address",
		Usage:   "SlicePortal address",
		EnvVars: []string{"SLICE_PORTAL_ADDRESS"},
	},
	&cli.StringFlag{
		Name:    "l1-standard-bridge-address",
		Usage:   "L1StandardBridge address",
		EnvVars: []string{"L1_STANDARD_BRIDGE_ADDRESS"},
	},
	&cli.StringFlag{
		Name:    "l1-crossdomain-messenger-address",
		Usage:   "L1CrossDomainMessenger address",
		EnvVars: []string{"L1_CROSSDOMAIN_MESSENGER_ADDRESS"},
	},
	&cli.StringFlag{
		Name:    "canonical-transaction-chain-address",
		Usage:   "CanonicalTransactionChain address",
		EnvVars: []string{"CANONICAL_TRANSACTION_CHAIN_ADDRESS"},
	},
	&cli.StringFlag{
		Name:    "state-commitment-chain-address",
		Usage:   "StateCommitmentChain address",
		EnvVars: []string{"STATE_COMMITMENT_CHAIN_ADDRESS"},
	},
}

AddressesFlags represent the flags associated with address parsing.

View Source
var ClientsFlags = []cli.Flag{
	&cli.StringFlag{
		Name:     "l1-rpc-url",
		Required: true,
		Usage:    "L1 RPC URL",
		EnvVars:  []string{"L1_RPC_URL"},
	},
	&cli.StringFlag{
		Name:     "l2-rpc-url",
		Required: true,
		Usage:    "L2 RPC URL",
		EnvVars:  []string{"L2_RPC_URL"},
	},
}

ClientsFlags represent the flags associated with creating RPC clients.

Functions

This section is empty.

Types

type Addresses

type Addresses struct {
	AddressManager            common.Address
	SlicePortal               common.Address
	L1StandardBridge          common.Address
	L1CrossDomainMessenger    common.Address
	CanonicalTransactionChain common.Address
	StateCommitmentChain      common.Address
}

Addresses represents the address values of various contracts. The values can be easily populated via a cli.Context.

func NewAddresses

func NewAddresses(ctx *cli.Context) (*Addresses, error)

NewAddresses populates an Addresses struct given a cli.Context. This is useful for writing scripts that interact with smart contracts.

type Clients

type Clients struct {
	L1Client     *ethclient.Client
	L2Client     *ethclient.Client
	L1RpcClient  *rpc.Client
	L2RpcClient  *rpc.Client
	L1GethClient *gethclient.Client
	L2GethClient *gethclient.Client
}

clients represents a set of initialized RPC clients

func NewClients

func NewClients(ctx *cli.Context) (*Clients, error)

NewClients will create new RPC clients from a CLI context

Jump to

Keyboard shortcuts

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