Documentation
¶
Index ¶
- Constants
- func EnsureDockerHost(inputUrl string) string
- func FileExistsInRoot(filename string) bool
- func FundWalletsDevnet(cfg *devkitcommon.ConfigWithContextConfig, rpcURL string) error
- func GetDevnetBlockTimeOrDefault(cfg *common.ConfigWithContextConfig, chainName string) (int, error)
- func GetDevnetChainArgsOrDefault(cfg *common.ConfigWithContextConfig) string
- func GetDevnetChainIdOrDefault(cfg *common.ConfigWithContextConfig, chainName string) (int, error)
- func GetDevnetChainImageOrDefault(cfg *common.ConfigWithContextConfig) string
- func GetDevnetForkUrlDefault(cfg *common.ConfigWithContextConfig, chainName string) (string, error)
- func GetDockerHost() string
- func GetDockerPsDevnetArgs() []string
- func GetEigenLayerAddresses(cfg *common.ConfigWithContextConfig) (allocationManager, delegationManager string)
- func GetRPCURL(port int) string
- func IsPortAvailable(port int) bool
- func StopAndRemoveContainer(ctx *cli.Context, containerName string)
- func WriteEmbeddedArtifacts() (composePath string)
Constants ¶
const ( Blue = "\033[34m" Cyan = "\033[36m" Green = "\033[32m" Yellow = "\033[33m" Reset = "\033[0m" )
const ALLOCATION_MANAGER_ADDRESS = "0x948a420b8CC1d6BFd0B6087C2E7c344a2CD0bc39"
These are fallback EigenLayer deployment addresses when not specified in context
const CHAIN_ARGS = "--gas-limit 140000000 --base-fee 9400000"
const CONTEXT = "devnet"
const DELEGATION_MANAGER_ADDRESS = "0x39053D51B77DC0d36036Fc1fCc8Cb819df8Ef37A"
const FOUNDRY_IMAGE = "ghcr.io/foundry-rs/foundry:stable"
Foundry Image Date : 21 April 2025
const FUND_VALUE = "10000000000000000000"
const L1 = "l1"
Variables ¶
This section is empty.
Functions ¶
func EnsureDockerHost ¶
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 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 ¶
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 ¶
IsPortAvailable checks if a TCP port is not already bound by another service.
func StopAndRemoveContainer ¶
/ 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.