genesis

package
v0.77.6 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigFilePath

func ConfigFilePath(nodeDir string) string

Types

type EthereumBridge added in v0.76.8

type EthereumBridge struct {
	// description: Ethereum smart contract addresses created by Vega. These can represent bridges or ERC20 tokens.
	Addresses map[string]SmartContract
	// description: Ethereum network ID.
	NetworkID string
	// description: Ethereum chain ID.
	ChainID string
}

description: |

Template context also includes functions:
- `.GetEthContractAddr "contract_name"` - returns contract address based on name.
- `.GetVegaContractID "contract_name"` - returns contract vega ID based on name.

func (EthereumBridge) GetEthContractAddr added in v0.76.8

func (gc EthereumBridge) GetEthContractAddr(contract string) string

func (EthereumBridge) GetVegaContractID added in v0.76.8

func (gc EthereumBridge) GetVegaContractID(contract string) string

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

func NewGenerator

func NewGenerator(conf *config.Config, templateRaw string) (*Generator, error)

func (*Generator) ExecuteTemplate

func (g *Generator) ExecuteTemplate() (*bytes.Buffer, error)

func (*Generator) Generate

func (g *Generator) Generate(validatorsSets []types.NodeSet, genValidators []tmtypes.GenesisValidator, chainID *string) (*bytes.Buffer, error)

func (*Generator) GenerateAndSave

func (g *Generator) GenerateAndSave(chainID *string, validatorsSets []types.NodeSet, nonValidatorsSets []types.NodeSet, genValidators []tmtypes.GenesisValidator) error

type SmartContract

type SmartContract struct {
	// description: Ethereum address.
	Ethereum string `json:"Ethereum"`
	// description:  Vega contract ID.
	Vega string `json:"Vega"`
}

type TemplateContext

type TemplateContext struct {
	PrimaryBridge   EthereumBridge
	SecondaryBridge EthereumBridge
}

func NewTemplateContext

func NewTemplateContext(cfg config.NetworkConfig) (*TemplateContext, error)

Jump to

Keyboard shortcuts

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