devnet

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Blue   = "\033[34m"
	Cyan   = "\033[36m"
	Green  = "\033[32m"
	Yellow = "\033[33m"
	Reset  = "\033[0m"
)
View Source
const ALLOCATION_MANAGER_ADDRESS = "0x948a420b8CC1d6BFd0B6087C2E7c344a2CD0bc39"

These are fallback EigenLayer deployment addresses when not specified in context

View Source
const CHAIN_ARGS = "--gas-limit 140000000 --base-fee 9400000"
View Source
const CONTEXT = "devnet"
View Source
const DELEGATION_MANAGER_ADDRESS = "0x39053D51B77DC0d36036Fc1fCc8Cb819df8Ef37A"
View Source
const FOUNDRY_IMAGE = "ghcr.io/foundry-rs/foundry:stable"

Foundry Image Date : 21 April 2025

View Source
const FUND_VALUE = "10000000000000000000"
View Source
const L1 = "l1"

Variables

This section is empty.

Functions

func EnsureDockerHost

func EnsureDockerHost(inputUrl string) string

EnsureDockerHost replaces localhost/127.0.0.1 in URLs with the appropriate Docker host. Only replaces when localhost/127.0.0.1 are the actual hostname, not substrings. This ensures URLs work correctly when passed to Docker containers across platforms.

func FileExistsInRoot

func FileExistsInRoot(filename string) bool

func FundWalletsDevnet

func FundWalletsDevnet(cfg *devkitcommon.ConfigWithContextConfig, rpcURL string) error

FundWallets sends ETH to a list of addresses using `cast send` Only funds wallets with balance < 10 ether.

func GetDevnetBlockTimeOrDefault

func GetDevnetBlockTimeOrDefault(cfg *common.ConfigWithContextConfig, chainName string) (int, error)

func GetDevnetChainArgsOrDefault

func GetDevnetChainArgsOrDefault(cfg *common.ConfigWithContextConfig) string

GetDevnetChainArgsOrDefault extracts and formats the chain arguments for devnet. Falls back to CHAIN_ARGS constant if value is empty.

func GetDevnetChainIdOrDefault

func GetDevnetChainIdOrDefault(cfg *common.ConfigWithContextConfig, chainName string) (int, error)

func GetDevnetChainImageOrDefault

func GetDevnetChainImageOrDefault(cfg *common.ConfigWithContextConfig) string

GetDevnetChainImageOrDefault returns the devnet chain image, falling back to FOUNDRY_IMAGE if not provided.

func GetDevnetForkUrlDefault

func GetDevnetForkUrlDefault(cfg *common.ConfigWithContextConfig, chainName string) (string, error)

func GetDockerHost

func GetDockerHost() string

GetDockerHost returns the appropriate Docker host based on environment and platform. Uses DOCKERS_HOST environment variable if set, otherwise detects OS: - Linux: defaults to 172.17.0.1 (Docker containers can access host via localhost) - macOS/Windows: defaults to host.docker.internal (required for Docker Desktop)

func GetDockerPsDevnetArgs

func GetDockerPsDevnetArgs() []string

GetDockerPsDevnetArgs returns the arguments needed to list all running devkit devnet Docker containers along with their exposed ports. It filters containers by name prefix ("devkit-devnet") and formats the output to show container name and port mappings in a readable form.

func GetEigenLayerAddresses

func GetEigenLayerAddresses(cfg *common.ConfigWithContextConfig) (allocationManager, delegationManager string)

GetEigenLayerAddresses returns EigenLayer addresses from the context config Falls back to constants if not found in context

func GetRPCURL

func GetRPCURL(port int) string

GetRPCURL returns the RPC URL for accessing the devnet container from the host. This should always use localhost since it's for host→container communication

func IsPortAvailable

func IsPortAvailable(port int) bool

IsPortAvailable checks if a TCP port is not already bound by another service.

func StopAndRemoveContainer

func StopAndRemoveContainer(ctx *cli.Context, containerName string)

/ Stops the container and removes it

func WriteEmbeddedArtifacts

func WriteEmbeddedArtifacts() (composePath string)

WriteEmbeddedArtifacts writes the embedded docker-compose.yaml. Returns the paths to the written files.

Types

This section is empty.

Jump to

Keyboard shortcuts

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