evm

package
v0.2.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Overview

Package evm implements the deploy Target for EVM chains. All contract creation bytecode ships inside generated Go bindings, so deployment needs only an RPC endpoint.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver struct {
	// contains filtered or unexported fields
}

Driver implements deploy.Target for EVM chains.

func New

func New(ctx context.Context, opts Options) (*Driver, error)

New connects to the chain and validates its ID. Empty DeployerKeyHex builds a read-only driver: queries only, no provisioning or wiring.

func (*Driver) AppRegistered

func (d *Driver) AppRegistered(ctx context.Context, router, port string) (string, bool, error)

AppRegistered queries the router for the app at port.

func (*Driver) BesuHead

func (d *Driver) BesuHead(ctx context.Context, notAfter uint64) (*besu.ParsedHeader, error)

BesuHead is this driver's sealed head, or the header besu.HeightNotAfter picks when the head is later than notAfter.

func (*Driver) ClientRegistered

func (d *Driver) ClientRegistered(ctx context.Context, router, clientID string) (string, bool, error)

ClientRegistered queries the router for clientID.

func (*Driver) HasCode

func (d *Driver) HasCode(ctx context.Context, address string) (bool, error)

func (*Driver) Head

func (d *Driver) Head(ctx context.Context) (uint64, uint64, error)

Head returns the chain head height and timestamp in seconds.

func (*Driver) IFTBridge

func (d *Driver) IFTBridge(ctx context.Context, iftAddr, clientID string) (string, string, bool, error)

IFTBridge queries the token for a bridge registered under clientID, returning its counterparty address and send-call constructor.

func (*Driver) IFTRateLimit

func (d *Driver) IFTRateLimit(ctx context.Context, iftAddr string) (deploy.IFTRateLimit, error)

IFTRateLimit reads an IFT token's configured rate limit.

func (*Driver) ProvisionClient

func (d *Driver) ProvisionClient(ctx context.Context, router string, spec deploy.ClientSpec) (deploy.ClientRef, error)

ProvisionClient deploys a light client contract.

func (*Driver) ProvisionCore

func (d *Driver) ProvisionCore(ctx context.Context, _ deploy.CoreParams) (deploy.CoreRef, error)

ProvisionCore deploys AccessManager + ICS26Router (implementation behind an initialized ERC1967 proxy), then binds the relaying selectors to PUBLIC_ROLE so any relayer EOA can submit packets. The deployer key stays the AccessManager admin; role hardening is a follow-up.

func (*Driver) ProvisionGMP

func (d *Driver) ProvisionGMP(ctx context.Context, router, accessManager string) (deploy.GMPRef, error)

ProvisionGMP deploys the ICS27Account logic impl, the ICS27GMP impl, and an ERC1967 proxy initialized with the router, account logic, and AccessManager authority.

func (*Driver) ProvisionIFT

func (d *Driver) ProvisionIFT(ctx context.Context, gmp string, spec deploy.IFTSpec) (deploy.IFTRef, error)

ProvisionIFT deploys an IFT impl and an ERC1967 proxy initialized with the owner, name, symbol, and GMP address.

func (*Driver) ProvisionMulticall

func (d *Driver) ProvisionMulticall(ctx context.Context, accessManager string) (deploy.MulticallRef, error)

ProvisionMulticall deploys an initialized proxy and opens multicall to public relayers.

func (*Driver) ProvisionSendCallConstructor

func (d *Driver) ProvisionSendCallConstructor(ctx context.Context) (string, error)

ProvisionSendCallConstructor deploys the stateless EVM IFT send-call constructor.

func (*Driver) RegisterApp

func (d *Driver) RegisterApp(ctx context.Context, router, app, port string) error

RegisterApp registers app on the router under port via the restricted addIBCApp(portId, app) overload.

func (*Driver) RegisterClient

func (d *Driver) RegisterClient(
	ctx context.Context,
	router string,
	spec deploy.ClientSpec,
	ref deploy.ClientRef,
) (string, error)

RegisterClient calls ICS26Router.addClient with the custom client ID.

func (*Driver) RegisterIFTBridge

func (d *Driver) RegisterIFTBridge(ctx context.Context, iftAddr string, spec deploy.BridgeSpec) error

RegisterIFTBridge registers a bridge on an IFT token.

func (*Driver) SetIFTRateLimit

func (d *Driver) SetIFTRateLimit(ctx context.Context, iftAddr string, limit deploy.IFTRateLimit) error

SetIFTRateLimit sets an IFT token's rate limit.

func (*Driver) Verify

func (d *Driver) Verify(ctx context.Context, m *manifest.Manifest) (deploy.Report, error)

Verify checks the manifest against live chain state.

type Options

type Options struct {
	ChainID        string
	RPCURL         string
	DeployerKeyHex string
}

Options configures an EVM driver.

Jump to

Keyboard shortcuts

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