app

package
v0.0.0-...-da22cf9 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2019 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// default home directories for expected binaries
	DefaultCLIHome  = os.ExpandEnv("$HOME/.plasmacli")
	DefaultNodeHome = os.ExpandEnv("$HOME/.plasmad")
)

Functions

func MakeCodec

func MakeCodec() *amino.Codec

func PlasmaAppGenStateJSON

func PlasmaAppGenStateJSON(cdc *codec.Codec, genDoc tmtypes.GenesisDoc, appGenTxs []json.RawMessage) (appState json.RawMessage, err error)

PlasmaAppGenState but with JSON

func PlasmaAppGenTx

func PlasmaAppGenTx(cdc *codec.Codec, pk crypto.PubKey) (
	appGenTx, cliPrint json.RawMessage, validator tmtypes.GenesisValidator, err error)

Generate a gaia genesis transaction with flags

func PlasmaAppGenTxNF

func PlasmaAppGenTxNF(cdc *codec.Codec, pk crypto.PubKey, addr string, overwrite bool) (
	appGenTx, cliPrint json.RawMessage, validator tmtypes.GenesisValidator, err error)

Generate a gaia genesis transaction without flags

func PlasmaAppInit

func PlasmaAppInit() server.AppInit

get app init parameters for server init command

func SetEthConfig

func SetEthConfig(isValidator bool, privkeyFile, rootchainAddr, nodeURL, finality string) func(*ChildChain)

func ToUTXO

func ToUTXO(gutxo GenesisUTXO) utxo.UTXO

Types

type ChildChain

type ChildChain struct {
	*bam.BaseApp
	// contains filtered or unexported fields
}

Extended ABCI application

func NewChildChain

func NewChildChain(logger log.Logger, db dbm.DB, traceStore io.Writer, options ...func(*ChildChain)) *ChildChain

func (*ChildChain) ExportAppStateJSON

func (app *ChildChain) ExportAppStateJSON() (appState json.RawMessage, validators []tmtypes.GenesisValidator, err error)

type GenesisState

type GenesisState struct {
	Validator GenesisValidator `json:"genvalidator"`
	UTXOs     []GenesisUTXO    `json:"UTXOs"`
}

State to Unmarshal

func NewDefaultGenesisState

func NewDefaultGenesisState(pubkey crypto.PubKey) GenesisState

func PlasmaAppGenState

func PlasmaAppGenState(cdc *codec.Codec, genDoc tmtypes.GenesisDoc, appGenTxs []json.RawMessage) (genesisState GenesisState, err error)

Create the core parameters for genesis initialization for gaia note that the pubkey input is this machines pubkey

type GenesisUTXO

type GenesisUTXO struct {
	Address  string
	Denom    string
	Position [4]string
}

func NewGenesisUTXO

func NewGenesisUTXO(addr string, amount string, position [4]string) GenesisUTXO

type GenesisValidator

type GenesisValidator struct {
	ConsPubKey crypto.PubKey `json:"validator_pubkey"`
	Address    string        `json:"fee_address"`
}

type PlasmaGenTx

type PlasmaGenTx struct {
	// currently takes address as string because unmarshaling Ether address fails
	Address string `json:"address"`
}

simple genesis tx

Jump to

Keyboard shortcuts

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