portal

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	XMsgMinGasLimit       = 21_000
	XMsgMaxGasLimit       = 5_000_000
	XMsgMaxDataSize       = 20_000
	XReceiptMaxErrorBytes = 256
	XSubValsetCutoff      = 10

	GenesisCChainXMsgOffset   = 1
	GenesisCChainXBlockOffset = 1
)

Variables

This section is empty.

Functions

func AddrForNetwork added in v0.1.2

func AddrForNetwork(network netconf.ID) (common.Address, bool)

func Deploy

func Deploy(ctx context.Context, network netconf.ID, backend *ethbackend.Backend, feeOracle common.Address, valSetID uint64, validators []bindings.Validator,
) (common.Address, *ethtypes.Receipt, error)

Deploy deploys a new Portal contract and returns the address and receipt. It only allows deployments to explicitly supported chains.

func IsDeployed

func IsDeployed(ctx context.Context, network netconf.ID, backend *ethbackend.Backend) (bool, common.Address, error)

IsDeployed checks if the Portal contract is deployed to the provided backend to its expected network address.

Types

type DeploymentConfig added in v0.1.2

type DeploymentConfig struct {
	Create3Factory        common.Address
	Create3Salt           string
	ProxyAdminOwner       common.Address
	Deployer              common.Address
	Owner                 common.Address
	OmniChainID           uint64
	OmniCChainID          uint64
	XMsgMinGasLimit       uint64
	XMsgMaxGasLimit       uint64
	XMsgMaxDataSize       uint16
	XReceiptMaxErrorBytes uint16
	XSubValsetCutoff      uint8
	CChainXMsgOffset      uint64
	CChainXBlockOffset    uint64
	ExpectedAddr          common.Address
}

func (DeploymentConfig) Validate added in v0.1.2

func (cfg DeploymentConfig) Validate() error

Jump to

Keyboard shortcuts

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