config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 6, 2022 License: GPL-3.0 Imports: 5 Imported by: 3

Documentation

Index

Constants

View Source
const (
	ChainId        = "chainId"
	Denom          = "denom"
	GasPrice       = "gasPrice"
	EraBlockNumber = "eraBlockNumber"
)
View Source
const (
	RTokenSeriesModuleId     = "RTokenSeries"
	LiquidityBondEventId     = "LiquidityBond"
	NominationUpdatedEventId = "NominationUpdated"
	ValidatorUpdatedEventId  = "ValidatorUpdated"
	StorageBondRecords       = "BondRecords"
	StorageBondStates        = "BondStates"
	MethodExecuteBondRecord  = "RTokenSeries.execute_bond_record"
	StorageNominated         = "Nominated"

	RtokenVoteModuleId         = "RTokenVotes"
	StorageVotes               = "Votes"
	MethodRacknowledgeProposal = "RTokenVotes.acknowledge_proposal"

	RTokenLedgerModuleId       = "RTokenLedger"
	EraPoolUpdatedEventId      = "EraPoolUpdated"
	StorageChainEras           = "ChainEras"
	StorageCurrentEraSnapShots = "CurrentEraSnapShots"
	StorageEraSnapShots        = "EraSnapShots"
	StorageLeastBond           = "LeastBond"
	MethodSetChainEra          = "RTokenLedger.set_chain_era"
	MethodBondReport           = "RTokenLedger.bond_report"
	MethodNewBondReport        = "RTokenLedger.new_bond_report"
	MethodActiveReport         = "RTokenLedger.active_report"
	MethodNewActiveReport      = "RTokenLedger.new_active_report"
	MethodBondAndReportActive  = "RTokenLedger.bond_and_report_active"
	MethodWithdrawReport       = "RTokenLedger.withdraw_report"
	MethodTransferReport       = "RTokenLedger.transfer_report"
	BondReportedEventId        = "BondReported"
	ActiveReportedEventId      = "ActiveReported"
	WithdrawReportedEventId    = "WithdrawReported"
	TransferReportedEventId    = "TransferReported"
	StorageSubAccounts         = "SubAccounts"
	StorageMultiThresholds     = "MultiThresholds"
	StorageBondedPools         = "BondedPools"
	StorageSnapshots           = "Snapshots"
	StoragePoolUnbonds         = "PoolUnbonds"
	SignaturesEnoughEventId    = "SignaturesEnough"
	StorageSignatures          = "Signatures"
	SubmitSignatures           = "RTokenSeries.submit_signatures"
)
View Source
const (
	BalancesModuleId        = "Balances"
	TransferKeepAlive       = "transfer_keep_alive"
	Transfer                = "transfer"
	MethodTransferKeepAlive = "Balances.transfer_keep_alive"
	ConstExistentialDeposit = "ExistentialDeposit"

	StakingModuleId           = "Staking"
	StorageActiveEra          = "ActiveEra"
	StorageNominators         = "Nominators"
	StorageErasRewardPoints   = "ErasRewardPoints"
	StorageErasStakersClipped = "ErasStakersClipped"
	StorageEraNominated       = "EraNominated"
	StorageBonded             = "Bonded"
	StorageLedger             = "Ledger"
	MethodPayoutStakers       = "Staking.payout_stakers"
	MethodUnbond              = "Staking.unbond"
	MethodBondExtra           = "Staking.bond_extra"
	MethodWithdrawUnbonded    = "Staking.withdraw_unbonded"
	MethodNominate            = "Staking.nominate"

	MultisigModuleId        = "Multisig"
	NewMultisigEventId      = "NewMultisig"
	MultisigExecutedEventId = "MultisigExecuted"
	StorageMultisigs        = "Multisigs"
	MethodAsMulti           = "Multisig.as_multi"

	SystemModuleId = "System"
	StorageAccount = "Account"

	MethodBatch = "Utility.batch"

	ParamDest     = "dest"
	ParamDestType = "Address"

	ParamValue     = "value"
	ParamValueType = "Compact<Balance>"
)

Variables

View Source
var (
	ChainTypeStafiHub  = "stafiHub"
	ChainTypeSubstrate = "substrate"
	ChainTypeCosmosHub = "cosmosHub"
	ChainTypeSolana    = "solana"
	ChainTypeEthereum  = "ethereum"
	ChainTypeBinance   = "binance"

	ChainTypeSupport = map[string]bool{
		ChainTypeSubstrate: true,
		ChainTypeCosmosHub: true,
		ChainTypeSolana:    true,
		ChainTypeEthereum:  true,
		ChainTypeBinance:   true,
	}
)
View Source
var (
	ConfigFileFlag = &cli.StringFlag{
		Name:  "config",
		Usage: "json configuration file",
		Value: defaultConfigPath,
	}

	VerbosityFlag = &cli.StringFlag{
		Name:  "verbosity",
		Usage: "supports levels error to trace",
	}

	KeystorePathFlag = &cli.StringFlag{
		Name:  "keystore",
		Usage: "path to keystore directory",
		Value: defaultKeystorePath,
	}

	BncNetwork = &cli.StringFlag{
		Name:  "bncnetwork",
		Usage: "specify network for bc chain, set test for TestNetwork, others will be ProdNetwork",
		Value: "",
	}

	NetworkFlag = &cli.StringFlag{
		Name:  "network",
		Usage: "specify network for subkey like [stafi polkadot kusama ...]",
		Value: "stafi",
	}
)

Functions

This section is empty.

Types

type Config

type Config struct {
	BlockstorePath string         `json:"blockstorePath"`
	LogFilePath    string         `json:"logFilePath"`
	NativeChain    RawChainConfig `json:"nativeChain"`
	ExternalChain  RawChainConfig `json:"externalChain"`
}

func GetConfig

func GetConfig(ctx *cli.Context) (*Config, error)

type RawChainConfig

type RawChainConfig struct {
	Name         string      `json:"name"`
	Rsymbol      string      `json:"rsymbol"`
	Endpoint     string      `json:"endpoint"` // url for rpc endpoint
	KeystorePath string      `json:"keystorePath"`
	Opts         interface{} `json:"opts"`
}

RawChainConfig is parsed directly from the config file and should be using to construct the core.ChainConfig

Jump to

Keyboard shortcuts

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