evm

package
v0.53.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: MIT Imports: 10 Imported by: 40

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddressToBytes added in v0.44.0

func AddressToBytes(address string) ([]byte, error)

AddressToBytes converts an EVM address string to bytes. EVM addresses are hex strings (with or without 0x prefix) representing 20 bytes.

Types

type AddressConverter added in v0.44.0

type AddressConverter struct{}

AddressConverter implements address conversion for EVM-compatible chains. This struct implements the AddressConverter strategy interface.

func (AddressConverter) ConvertToBytes added in v0.44.0

func (e AddressConverter) ConvertToBytes(address string) ([]byte, error)

ConvertToBytes converts an EVM address string to bytes.

func (AddressConverter) Supports added in v0.44.0

func (e AddressConverter) Supports(family string) bool

Supports returns true if this converter supports the given chain family.

type Chain

type Chain struct {
	Selector uint64

	Client OnchainClient
	// Note the Sign function can be abstract supporting a variety of key storage mechanisms (e.g. KMS etc).
	DeployerKey *bind.TransactOpts
	Confirm     ConfirmFunc
	// Users are a set of keys that can be used to interact with the chain.
	// These are distinct from the deployer key.
	Users []*bind.TransactOpts

	// SignHash allows signing of arbitrary hashes using the deployer key's signing mechanism.
	// This function signature matches the expected format: func([]byte) ([]byte, error)
	SignHash func([]byte) ([]byte, error)

	// ZK deployment specifics
	IsZkSyncVM          bool
	ClientZkSyncVM      *clients.Client
	DeployerKeyZkSyncVM *accounts.Wallet
}

Chain represents an EVM chain.

func (Chain) ChainSelector

func (c Chain) ChainSelector() uint64

ChainSelector returns the chain selector of the chain

func (Chain) Family added in v0.5.1

func (c Chain) Family() string

Family returns the family of the chain

func (Chain) Name

func (c Chain) Name() string

Name returns the name of the chain

func (Chain) String

func (c Chain) String() string

String returns chain name and selector "<name> (<selector>)"

type ConfirmFunc added in v0.14.0

type ConfirmFunc func(tx *types.Transaction) (uint64, error)

ConfirmFunc is a function that takes a transaction, waits for the transaction to be confirmed, and returns the block number and an error.

type OnchainClient

type OnchainClient interface {
	bind.ContractBackend
	bind.DeployBackend

	BalanceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (*big.Int, error)
	NonceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (uint64, error)
}

OnchainClient is an EVM chain client. For EVM specifically we can use existing geth interface to abstract chain clients.

Directories

Path Synopsis
Package provider contains EVM chain providers for the Chainlink Deployments Framework.
Package provider contains EVM chain providers for the Chainlink Deployments Framework.

Jump to

Keyboard shortcuts

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