dpos

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GovCmd = cli.Command{
		Name:  "gov",
		Usage: "use for gov func",
		Subcommands: []cli.Command{
			SubmitTextCmd,
			getProposalCmd,
			getTallyResultCmd,
			listProposalCmd,
			getActiveVersionCmd,
			getGovernParamValueCmd,
			getAccuVerifiersCountCmd,
			listGovernParamCmd,
		},
	}
	SubmitTextCmd = cli.Command{
		Name:   "submitText",
		Usage:  "2000,submit text",
		Before: netCheck,
		Action: submitText,
		Flags:  []cli.Flag{configPathFlag, keystoreFlag, govParamsFlag},
	}
)
View Source
var (
	StakingCmd = cli.Command{
		Name:  "staking",
		Usage: "use for staking",
		Subcommands: []cli.Command{
			CreateStakingCmd,
			GetVerifierListCmd,
			getValidatorListCmd,
			getCandidateListCmd,
			getRelatedListByDelAddrCmd,
			getDelegateInfoCmd,
			getCandidateInfoCmd,
			getPackageRewardCmd,
			getStakingRewardCmd,
			getAvgPackTimeCmd,
		},
	}
	CreateStakingCmd = cli.Command{
		Name:   "createStaking",
		Usage:  "1000,create Staking",
		Before: netCheck,
		Action: createStaking,
		Flags:  []cli.Flag{configPathFlag, keystoreFlag, blsKeyfileFlag, nodeKeyFlag, stakingParamsFlag},
	}
	GetVerifierListCmd = cli.Command{
		Name:   "getVerifierList",
		Usage:  "1100,query the validator queue of the current settlement epoch",
		Before: netCheck,
		Action: getVerifierList,
		Flags:  []cli.Flag{rpcUrlFlag, addressHRPFlag, jsonFlag},
	}
)
View Source
var (
	RestrictingCmd = cli.Command{
		Name:  "restricting",
		Usage: "use for restricting",
		Subcommands: []cli.Command{
			getRestrictingInfoCmd,
		},
	}
)
View Source
var (
	RewardCmd = cli.Command{
		Name:  "reward",
		Usage: "use for reward",
		Subcommands: []cli.Command{
			getDelegateRewardCmd,
		},
	}
)
View Source
var (
	SlashingCmd = cli.Command{
		Name:  "slashing",
		Usage: "use for slashing",
		Subcommands: []cli.Command{
			checkDuplicateSignCmd,
			zeroProduceNodeListCmd,
		},
	}
)

Functions

func BuildDPosContract

func BuildDPosContract(funcType uint16, params ...interface{}) ([]byte, error)

func CallDPosContract

func CallDPosContract(client *ethclient.Client, funcType uint16, params ...interface{}) ([]byte, error)

func CallDPosStakingContract

func CallDPosStakingContract(client *ethclient.Client, funcType uint16, params *Dpos_1000) ([]byte, error)

func EncodeDPOS

func EncodeDPOS(funcType uint16, params ...interface{}) ([]byte, common.Address)

func EncodeDPOSGov

func EncodeDPOSGov(funcType uint16, params *Dpos_2000) ([]byte, common.Address)

func EncodeDPOSStaking

func EncodeDPOSStaking(funcType uint16, params *Dpos_1000) ([]byte, common.Address)

func GetNodeKey

func GetNodeKey(file string) (string, error)

Types

type CallMsg

type CallMsg struct {
	To   *common.Address // the destination contract (nil for contract creation)
	Data hexutil.Bytes   // input data, usually an ABI-encoded contract method invocation
}

CallMsg contains parameters for contract calls.

type Dpos_1000

type Dpos_1000 struct {
	Typ                uint16
	BenefitAddress     common.Address
	NodeId             discover.NodeID
	ExternalId         string
	NodeName           string
	Website            string
	Details            string
	Amount             *big.Int
	RewardPer          uint64
	ProgramVersion     uint32
	ProgramVersionSign common.VersionSign
	BlsPubKey          bls.PublicKeyHex
	BlsProof           bls.SchnorrProofHex
}

createStaking

type Dpos_2000

type Dpos_2000 struct {
	Verifier discover.NodeID
	PIPID    string
}

submitText

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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