Documentation ¶
Index ¶
- Variables
- func Preprocess(cmd *cobra.Command, args []string) (err error)
- func PrintCampaignInformation(cmd *cobra.Command, info *CampaignRelatedInfo, currentBlock uint64)
- func PrintENV()
- func PrintStakeInformation(cmd *cobra.Command, info *StakeRelatedInfo)
- func PromptBRROption(prompter string) *big.Int
- type Campaign
- type CampaignRelatedInfo
- type KyberDAO
- func (self *KyberDAO) AllCampaignRelatedInfo(s string, camID *big.Int) (info *CampaignRelatedInfo, err error)
- func (self *KyberDAO) AllStakeRelatedInfo(s string, e uint64) (info *StakeRelatedInfo, err error)
- func (self *KyberDAO) AllTimeRelatedInfo() (*TimeRelatedInfo, error)
- func (self *KyberDAO) CurrentEpoch() (uint64, error)
- func (self *KyberDAO) GetCampaignDetail(id *big.Int) (result *Campaign, err error)
- func (self *KyberDAO) GetCampaignIDs(e uint64) ([]*big.Int, error)
- func (self *KyberDAO) GetDelegatedStake(s string, e uint64) (*big.Int, error)
- func (self *KyberDAO) GetPoolMaster(s string, e uint64) (common.Address, error)
- func (self *KyberDAO) GetRewardInfo(s string, e uint64) (reward *big.Int, totalReward *big.Int, share float64, isClaimed bool, ...)
- func (self *KyberDAO) GetStake(s string, e uint64) (*big.Int, error)
- func (self *KyberDAO) GetVotedOptionID(s string, camID *big.Int) (*big.Int, error)
- type StakeRelatedInfo
- type TimeRelatedInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var ( StakingContract string DaoContract string FeeHandler string KNCContract string CampaignCreator string EpochDuration uint64 StartDAOBlock uint64 MinCamDuration uint64 Epoch uint64 CampaignID uint64 )
View Source
var KyberDAOCmd = &cobra.Command{ Use: "kyber-dao", Short: "participate to Kyber DAO to get rewards", Long: ``, TraverseChildren: true, }
View Source
var MAX_ALLOWANCE = big.NewInt(0).Lsh(big.NewInt(1), 254)
View Source
var SAFE_ALLOWANCE = big.NewInt(0).Lsh(big.NewInt(1), 200)
Functions ¶
func PrintCampaignInformation ¶ added in v0.0.10
func PrintCampaignInformation(cmd *cobra.Command, info *CampaignRelatedInfo, currentBlock uint64)
func PrintStakeInformation ¶ added in v0.0.10
func PrintStakeInformation(cmd *cobra.Command, info *StakeRelatedInfo)
func PromptBRROption ¶ added in v0.0.10
Types ¶
type Campaign ¶
type Campaign struct { CampType uint8 StartBlock *big.Int EndBlock *big.Int TotalKNCSupply *big.Int MinPercentageInPrecision *big.Int CInPrecision *big.Int TInPrecision *big.Int Link []byte Options []*big.Int OptionPoints []*big.Int TotalPoints *big.Int WinningOption *big.Int ID *big.Int }
func NewEmptyCampaign ¶
func NewEmptyCampaign() *Campaign
func (*Campaign) HasWinningOption ¶ added in v0.0.10
type CampaignRelatedInfo ¶ added in v0.0.10
type KyberDAO ¶
type KyberDAO struct {
// contains filtered or unexported fields
}
func (*KyberDAO) AllCampaignRelatedInfo ¶ added in v0.0.10
func (*KyberDAO) AllStakeRelatedInfo ¶ added in v0.0.10
func (self *KyberDAO) AllStakeRelatedInfo(s string, e uint64) (info *StakeRelatedInfo, err error)
func (*KyberDAO) AllTimeRelatedInfo ¶ added in v0.0.10
func (self *KyberDAO) AllTimeRelatedInfo() (*TimeRelatedInfo, error)
func (*KyberDAO) CurrentEpoch ¶
func (*KyberDAO) GetCampaignDetail ¶
func (*KyberDAO) GetCampaignIDs ¶
func (*KyberDAO) GetDelegatedStake ¶
func (*KyberDAO) GetPoolMaster ¶
func (*KyberDAO) GetRewardInfo ¶
type StakeRelatedInfo ¶ added in v0.0.10
type TimeRelatedInfo ¶ added in v0.0.10
type TimeRelatedInfo struct { EpochDuration uint64 CurrentBlock *big.Int CurrentEpoch uint64 TimeUntilNextEpoch time.Duration NextEpoch uint64 NextEpochStartBlock *big.Int // the first block that the campaign is active NextEpochEndBlock *big.Int // the last block that the campaign is active, not the first block that the campaign is ended }
Click to show internal directories.
Click to hide internal directories.