types

package
v0.0.0-...-2e881e2 Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BaseHostPortOverride

func BaseHostPortOverride() map[string]string

func MnemonicToAddress

func MnemonicToAddress(mnemonic, prefix string, coinType uint32) string

Types

type AppStartConfig

type AppStartConfig struct {
	Address string
	Port    uint16
	Cfg     *Config
	Relayer Relayer
	AuthKey string // optional password for API interaction
}

type Chain

type Chain struct {
	Name                string                `json:"name" yaml:"name" validate:"min=1"`
	ChainID             string                `json:"chain_id" yaml:"chain_id" validate:"min=3"`
	DockerImage         ibc.DockerImage       `json:"docker_image" yaml:"docker_image" validate:"url"`
	GasPrices           string                `json:"gas_prices" yaml:"gas_prices"`
	GasAdjustment       float64               `json:"gas_adjustment" yaml:"gas_adjustment"`
	Genesis             Genesis               `json:"genesis,omitempty" yaml:"genesis,omitempty"`
	ConfigFileOverrides []ConfigFileOverrides `json:"config_file_overrides,omitempty" yaml:"config_file_overrides,omitempty"`
	IBCPaths            []string              `json:"ibc_paths,omitempty" yaml:"ibc_paths,omitempty"`
	NumberVals          int                   `json:"number_vals" yaml:"number_vals" validate:"gte=1"`
	NumberNode          int                   `json:"number_node" yaml:"number_node"`
	ChainType           string                `json:"chain_type" yaml:"chain_type" validate:"min=1"`
	CoinType            int                   `json:"coin_type" yaml:"coin_type" validate:"gt=0"`
	Binary              string                `json:"binary" yaml:"binary" validate:"min=1"`
	Bech32Prefix        string                `json:"bech32_prefix" yaml:"bech32_prefix" validate:"min=1"`
	Denom               string                `json:"denom" yaml:"denom" validate:"min=1"`
	TrustingPeriod      string                `json:"trusting_period" yaml:"trusting_period"`
	Debugging           bool                  `json:"debugging" yaml:"debugging"`
	BlockTime           string                `json:"block_time,omitempty" yaml:"block_time,omitempty"`
	HostPortOverride    map[string]string     `json:"host_port_override,omitempty" yaml:"host_port_override,omitempty"`
	ICSConsumerLink     string                `json:"ics_consumer_link,omitempty" yaml:"ics_consumer_link,omitempty"`
	ICSVersionOverride  ibc.ICSConfig         `json:"ics_version_override,omitempty" yaml:"ics_version_override,omitempty"`
}

func ChainCosmosHub

func ChainCosmosHub(chainID string) *Chain

func ChainEthereum

func ChainEthereum() *Chain

func ChainJuno

func ChainJuno(chainID string) *Chain

func ChainOsmosis

func ChainOsmosis() *Chain

func ChainStargaze

func ChainStargaze() *Chain

func NewChainBuilder

func NewChainBuilder(name, chainID, binary, denom, bech32 string) *Chain

NewChainBuilder creates a new Chain.

func (*Chain) SaveJSON

func (c *Chain) SaveJSON(filePath string) error

func (*Chain) SaveYAML

func (c *Chain) SaveYAML(filePath string) error
func (c *Chain) SetAppendedIBCPathLink(counterParty *Chain) *Chain

SetChainsIBCLink appends the new IBC path to both chains

func (*Chain) SetBech32Prefix

func (c *Chain) SetBech32Prefix(bech32Prefix string) *Chain

func (*Chain) SetBlockTime

func (c *Chain) SetBlockTime(blockTime string) *Chain

func (*Chain) SetChainDefaults

func (chain *Chain) SetChainDefaults()

func (*Chain) SetChainType

func (c *Chain) SetChainType(chainType string) *Chain

func (*Chain) SetCoinType

func (c *Chain) SetCoinType(num int) *Chain

func (*Chain) SetConfigFileOverrides

func (c *Chain) SetConfigFileOverrides(configFileOverrides []ConfigFileOverrides) *Chain

func (*Chain) SetDebugging

func (c *Chain) SetDebugging(debugging bool) *Chain

func (*Chain) SetDefaultSDKv47Genesis

func (c *Chain) SetDefaultSDKv47Genesis(numRandAcc int) *Chain

func (*Chain) SetDenom

func (c *Chain) SetDenom(denom string) *Chain

func (*Chain) SetDockerImage

func (c *Chain) SetDockerImage(dockerImage ibc.DockerImage) *Chain

func (*Chain) SetGasAdjustment

func (c *Chain) SetGasAdjustment(gasAdjustment float64) *Chain

func (*Chain) SetGasPrices

func (c *Chain) SetGasPrices(gasPrices string) *Chain

func (*Chain) SetGenesis

func (c *Chain) SetGenesis(genesis Genesis) *Chain

func (*Chain) SetHostPortOverride

func (c *Chain) SetHostPortOverride(hostPortOverride map[string]string) *Chain

func (*Chain) SetIBCPaths

func (c *Chain) SetIBCPaths(ibcPaths []string) *Chain

SetIBCPaths hardcodes the set IBC paths array for the chain.

func (c *Chain) SetICSConsumerLink(icsConsumerLink string) *Chain

func (*Chain) SetNodes

func (c *Chain) SetNodes(numberNode int) *Chain

func (*Chain) SetRandomAccounts

func (c *Chain) SetRandomAccounts(num int) *Chain

func (*Chain) SetStartupCommands

func (c *Chain) SetStartupCommands(cmds ...string) *Chain

func (*Chain) SetTrustingPeriod

func (c *Chain) SetTrustingPeriod(trustingPeriod string) *Chain

func (*Chain) SetValidators

func (c *Chain) SetValidators(numberVals int) *Chain

func (*Chain) Validate

func (chain *Chain) Validate() error

type ChainsConfig

type ChainsConfig struct {
	Chains []Chain `json:"chains" yaml:"chains"`
}

ChainsConfig is the chain configuration for the file.

func NewChainsConfig

func NewChainsConfig(chains ...*Chain) ChainsConfig

func (ChainsConfig) SaveJSON

func (cfg ChainsConfig) SaveJSON(file string) error

SaveJSON saves the chains config to a file.

func (ChainsConfig) SaveYAML

func (cfg ChainsConfig) SaveYAML(file string) error

SaveYAML saves the chains config to a file.

type Config

type Config struct {
	Chains  []Chain    `json:"chains" yaml:"chains"`
	Relayer Relayer    `json:"relayer" yaml:"relayer"`
	Server  RestServer `json:"server" yaml:"server"`
}

type ConfigFileOverrides

type ConfigFileOverrides struct {
	File  string        `json:"file,omitempty" yaml:"file,omitempty"`
	Paths testutil.Toml `json:"paths" yaml:"paths"`
}

ConfigFileOverrides overrides app toml configuration files.

type Genesis

type Genesis struct {
	// Only apart of my fork for now.
	Modify []cosmos.GenesisKV `json:"modify,omitempty" yaml:"modify,omitempty"` // 'key' & 'val' in the config.

	Accounts []GenesisAccount `json:"accounts,omitempty" yaml:"accounts,omitempty"`

	// A list of commands which run after chains are good to go.
	StartupCommands []string `json:"startup_commands,omitempty" yaml:"startup_commands,omitempty"`
}

type GenesisAccount

type GenesisAccount struct {
	Name     string `json:"name"`
	Amount   string `json:"amount"`
	Address  string `json:"address"`
	Mnemonic string `json:"mnemonic"`
}

func GenerateRandomAccounts

func GenerateRandomAccounts(num int, prefix string, coinType int) []GenesisAccount

func NewGenesisAccount

func NewGenesisAccount(name, bech32, coins string, coinType int, mnemonic string) GenesisAccount

type IBCChannel

type IBCChannel struct {
	ChainID string             `json:"chain_id" yaml:"chain_id"`
	Channel *ibc.ChannelOutput `json:"channel" yaml:"channel"`
}

type LogOutput

type LogOutput struct {
	ChainID     string   `json:"chain_id" yaml:"chain_id"`
	ChainName   string   `json:"chain_name" yaml:"chain_name"`
	RPCAddress  string   `json:"rpc_address" yaml:"rpc_address"`
	RESTAddress string   `json:"rest_address" yaml:"rest_address"`
	GRPCAddress string   `json:"grpc_address" yaml:"grpc_address"`
	P2PAddress  string   `json:"p2p_address" yaml:"p2p_address"`
	IBCPath     []string `json:"ibc_paths" yaml:"ibc_paths"`
}

LogOutput is a subsection of the chains information for the parent logs.

type MainLogs

type MainLogs struct {
	StartTime uint64       `json:"start_time" yaml:"start_time"`
	Chains    []LogOutput  `json:"chains" yaml:"chains"`
	Channels  []IBCChannel `json:"ibc_channels" yaml:"ibc_channels"`
}

MainLogs is the main runtime log file of the application.

type Relayer

type Relayer struct {
	DockerImage  ibc.DockerImage `json:"docker_image" yaml:"docker_image"`
	StartupFlags []string        `json:"startup_flags" yaml:"startup_flags"`
}

type RestServer

type RestServer struct {
	Host string `json:"host" yaml:"host"`
	Port string `json:"port" yaml:"port"`
}

Jump to

Keyboard shortcuts

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