distribute

package
v0.0.0-...-188077f Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2020 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// HermesABI defines the ABI of Hermes contract
	HermesABI = `` /* 9509-byte string literal not displayed */

	// MultisendABI defines the ABI of multisend contract
	MultisendABI = `` /* 3570-byte string literal not displayed */

	// AutoDepositABI defines the ABI of auto deposit contract
	AutoDepositABI = `` /* 4761-byte string literal not displayed */

)

Variables

View Source
var DistributeCmd = &cobra.Command{
	Use:   "distribute DELEGATE",
	Short: "Distribute rewards for delegate",
	Args:  cobra.MinimumNArgs(1),
	RunE: func(cmd *cobra.Command, args []string) error {
		cmd.SilenceUsage = true
		return Reward()
	},
}

DistributeCmd is the distribute command

Functions

func AddDeposit

func AddDeposit(
	c iotex.AuthedClient,
	bucketID uint64,
	amount *big.Int,
) (hash.Hash256, error)

AddDeposit add deposit to bucket

func GetBucketID

func GetBucketID(c iotex.AuthedClient, voter common.Address) (int64, error)

GetBucketID query bucketID from contract

func GetLastEndEpoch

func GetLastEndEpoch(c iotex.AuthedClient) (uint64, error)

GetLastEndEpoch get last end epoch from hermes contract

func Reward

func Reward() error

Reward distribute reward to voter group by delegate

Types

type DistributionInfo

type DistributionInfo struct {
	DelegateName  string
	RecipientList []common.Address
	AmountList    []*big.Int
}

DistributionInfo defines the distribution information

type Sender

type Sender struct {
	Accounts []account.Account
}

Sender send drop record

func NewSender

func NewSender() (*Sender, error)

NewSender new sender instance

func (*Sender) Send

func (s *Sender) Send()

Send send records

Jump to

Keyboard shortcuts

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