config

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: GPL-3.0, GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Flags needed by abigen
	KeyFlag = cli.StringFlag{
		Name:  "key",
		Usage: "Private key file path",
		Value: "",
	}
	KeyStoreFlag = cli.StringFlag{
		Name:  "keystore",
		Usage: "Keystore file path",
	}

	NameFlag = cli.StringFlag{
		Name:  "name",
		Usage: "name of account",
	}
	URLFlag = cli.StringFlag{
		Name:  "url",
		Usage: "metadata url of account",
	}
	CommissionFlag = cli.Uint64Flag{
		Name:  "commission",
		Usage: "register validator param",
	}
	RelayerfFlag = cli.StringFlag{
		Name:  "relayerf",
		Usage: "register validator param",
	}
	VoteNumFlag = cli.Int64Flag{
		Name:  "voteNum",
		Usage: "The amount of gold to use to vote",
	}
	TopNumFlag = cli.Int64Flag{
		Name:  "topNum",
		Usage: "topNum of validator",
	}
	LockedNumFlag = cli.Int64Flag{
		Name:  "lockedNum",
		Usage: "The amount of map to lock 、unlock、relock、withdraw ",
	}
	MAPValueFlag = cli.Int64Flag{
		Name:  "mapValue",
		Usage: "validator address",
	}
	WithdrawIndexFlag = cli.Int64Flag{
		Name:  "withdrawIndex",
		Usage: "use for withdraw",
	}
	RelockIndexFlag = cli.Int64Flag{
		Name:  "relockIndex",
		Usage: "use for relock",
	}

	VerbosityFlag = cli.Int64Flag{
		Name:  "Verbosity",
		Usage: "Verbosity of log level",
	}

	RPCListenAddrFlag = cli.StringFlag{
		Name:  "rpcaddr",
		Usage: "HTTP-RPC server listening interface",
		Value: "localhost",
	}
	ValueFlag = cli.Uint64Flag{
		Name:  "value",
		Usage: "value units one eth",
		Value: 0,
	}
	AmountFlag = cli.StringFlag{
		Name:  "amount",
		Usage: "transfer amount, unit (wei)",
		Value: "0",
	}
	DurationFlag = cli.Int64Flag{
		Name:  "duration",
		Usage: "duration The time (in seconds) that these requirements persist for.",
		Value: 0,
	}
	TargetAddressFlag = cli.StringFlag{
		Name:  "target",
		Usage: "Target query address",
		Value: "",
	}

	ValidatorAddressFlag = cli.StringFlag{
		Name:  "validator",
		Usage: "validator address",
		Value: "",
	}
	SignerPrivFlag = cli.StringFlag{
		Name:  "signerPriv",
		Usage: "signer private",
		Value: "",
	}
	SignerFlag = cli.StringFlag{
		Name:  "signer",
		Usage: "signer address",
		Value: "",
	}
	SignatureFlag = cli.StringFlag{
		Name:  "signature",
		Usage: "ECDSA Signature",
		Value: "",
	}
	ProofFlag = cli.StringFlag{
		Name:  "proof",
		Usage: "signer proof",
		Value: "",
	}
	AccountAddressFlag = cli.StringFlag{
		Name:  "accountAddress",
		Usage: "account address",
		Value: "",
	}
	ContractAddressFlag = cli.StringFlag{
		Name:  "contractAddress",
		Usage: "set contract Address",
		Value: "",
	}
	ImplementationAddressFlag = cli.StringFlag{
		Name:  "implementationAddress",
		Usage: "set implementation Address",
		Value: "",
	}
	GasLimitFlag = cli.Int64Flag{
		Name:  "gasLimit",
		Usage: "use for sendContractTransaction gasLimit",
		Value: 0,
	}
)

Functions

func GetPassword

func GetPassword(msg string) []byte

Types

type AccountsParameters

type AccountsParameters struct {
	AccountsABI     *abi.ABI
	AccountsAddress common.Address
}

type Config

type Config struct {
	From       common.Address
	PublicKey  []byte
	PrivateKey *ecdsa.PrivateKey
	BlsPub     blscrypto.SerializedPublicKey
	BlsG1Pub   blscrypto.SerializedG1PublicKey
	BLSProof   []byte
	Value      uint64
	Amount     string
	Duration   int64
	Commission uint64
	Fixed      string

	VoteNum       *big.Int
	TopNum        *big.Int
	LockedNum     *big.Int
	WithdrawIndex *big.Int
	RelockIndex   *big.Int

	TargetAddress         common.Address
	ContractAddress       common.Address
	SignerPriv            string
	AccountAddress        common.Address // validator
	SignerAddress         common.Address
	Signature             string
	Proof                 string
	ImplementationAddress common.Address
	RPCAddr               string
	GasLimit              int64
	Verbosity             string
	Name                  string
	MetadataURL           string
	LockedGoldParameters  LockedGoldParameters
	AccountsParameters    AccountsParameters
	ValidatorParameters   ValidatorParameters
	EpochRewardParameters EpochRewardsParameters
	TestPoc2Parameters    TestPoc2
	ElectionParameters    ElectionParameters
	GoldTokenParameters   GoldTokenParameters
}

func AssemblyConfig

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

type ElectionParameters

type ElectionParameters struct {
	ElectionABI     *abi.ABI
	ElectionAddress common.Address
}

type EpochRewardsParameters

type EpochRewardsParameters struct {
	EpochRewardsABI     *abi.ABI
	EpochRewardsAddress common.Address
}

type GoldTokenParameters

type GoldTokenParameters struct {
	GoldTokenABI     *abi.ABI
	GoldTokenAddress common.Address
}

type LockedGoldParameters

type LockedGoldParameters struct {
	LockedGoldABI     *abi.ABI
	LockedGoldAddress common.Address
}

type TestPoc2

type TestPoc2 struct {
	ABI     *abi.ABI
	Address common.Address
}

type ValidatorParameters

type ValidatorParameters struct {
	ValidatorABI     *abi.ABI
	ValidatorAddress common.Address
}

Jump to

Keyboard shortcuts

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