ethoscli

package
v0.0.0-...-aac2cf8 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2022 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const EthosFile = "ethos.yaml"

Variables

Functions

func Build

func Build(ctx context.Context) error

func Chain

func Chain(ctx context.Context) error

func Clean

func Clean(ctx context.Context) error

func CreateWallet

func CreateWallet(ctx context.Context, err error) (
	common.Address,
	*ecdsa.PrivateKey,
	*ecdsa.PublicKey,
	error,
)

func DeployContract

func DeployContract(
	ctx context.Context,
	rpc *ethclient.Client,
	privateKey *ecdsa.PrivateKey,
	publicKey *ecdsa.PublicKey,
) (*common.Address, error)

func GetBalancePeriodically

func GetBalancePeriodically(
	ctx context.Context,
	address common.Address,
	client *ethclient.Client,
	privateKey *ecdsa.PrivateKey,
	publicKey *ecdsa.PublicKey,
)

func GetBlockHeaderOrError

func GetBlockHeaderOrError(ctx context.Context, client *ethclient.Client) *types.Header

func GetBlockOrError

func GetBlockOrError(ctx context.Context, client *ethclient.Client,
	header *types.Header) *types.Block

func GetBlocksPeriodically

func GetBlocksPeriodically(ctx context.Context, client *ethclient.Client)

func Init

func Init(ctx context.Context) error

func ListenForContractEvents

func ListenForContractEvents(
	ctx context.Context,
	client *ethclient.Client,
	contactAddr string,
) error

func LogBlock

func LogBlock(block *types.Block)

func Test

func Test(ctx context.Context) error

Types

type EthosConfig

type EthosConfig struct {
	Compiler             string `yaml:"compiler"`
	ContractsDir         string `yaml:"contracts_dir"`
	ContractBindingsDir  string `yaml:"contracts_bindings_dir"`
	ContractsBindingsPkg string `yaml:"contracts_bindings_pkg"`
	BuildDir             string `yaml:"build_dir"`
	ChainID              int64  `yaml:"chain_id"`
	EndpointJsonRPC      string `yaml:"endpoint_json_rpc"`
	EndpointWebSocket    string `yaml:"endpoint_web_socket"`
}

func DefaultEthosConfig

func DefaultEthosConfig() *EthosConfig

Jump to

Keyboard shortcuts

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