genesis

package
v0.74.1 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 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 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 {
	// 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 NewTemplateContext

func NewTemplateContext(chainID, networkID string, addressesJSON []byte) (*TemplateContext, error)

func (TemplateContext) GetEthContractAddr

func (gc TemplateContext) GetEthContractAddr(contract string) string

func (TemplateContext) GetVegaContractID

func (gc TemplateContext) GetVegaContractID(contract string) string

Jump to

Keyboard shortcuts

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