blockchain

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultBesuPrivateKey1 = "8f2a55949038a9610f50fb23b5883af3b4ecb3c3bb792cbcefbd1542c692be63"
	DefaultBesuPrivateKey2 = "c87509a1c067bbde78beb793e6fa76530b6382a4c0241e5e4a9ec0a0f44dc0d3"
	DefaultBesuPrivateKey3 = "ae6ae8e5ccbfb04590405997ee2d52d2b330726137b875053c36d94e974d162f"
)
View Source
const (
	RootFundingAddr   = `0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266`
	RootFundingWallet = `` /* 491-byte string literal not displayed */
	GenesisClique     = `` /* 921-byte string literal not displayed */

	DefaultGethPrivateKey = `ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80`
)
View Source
const (
	DefaultAnvilPrivateKey = `ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80`
)

Variables

This section is empty.

Functions

func VerifyContract added in v0.3.1

func VerifyContract(out *Output, address, foundryDir, contractFile, contractName string) error

VerifyContract wraps the forge verify-contract command.

Types

type Input

type Input struct {
	Type                     string   `toml:"type" validate:"required,oneof=anvil geth besu" envconfig:"net_type"`
	Image                    string   `toml:"image"`
	PullImage                bool     `toml:"pull_image"`
	Port                     string   `toml:"port"`
	WSPort                   string   `toml:"port_ws"`
	ChainID                  string   `toml:"chain_id"`
	DockerCmdParamsOverrides []string `toml:"docker_cmd_params"`
	Out                      *Output  `toml:"out"`
}

Input is a blockchain network configuration params

type Node

type Node struct {
	HostWSUrl             string `toml:"ws_url"`
	HostHTTPUrl           string `toml:"http_url"`
	DockerInternalWSUrl   string `toml:"docker_internal_ws_url"`
	DockerInternalHTTPUrl string `toml:"docker_internal_http_url"`
}

Node represents blockchain node output, URLs required for connection locally and inside docker network

type Output

type Output struct {
	UseCache      bool    `toml:"use_cache"`
	Family        string  `toml:"family"`
	ContainerName string  `toml:"container_name"`
	ChainID       string  `toml:"chain_id"`
	Nodes         []*Node `toml:"nodes"`
}

Output is a blockchain network output, ChainID and one or more nodes that forms the network

func NewBlockchainNetwork

func NewBlockchainNetwork(in *Input) (*Output, error)

NewBlockchainNetwork this is an abstraction that can spin up various blockchain network simulators - Anvil - Geth

Jump to

Keyboard shortcuts

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