Documentation ¶
Index ¶
- type BalanceOfNfts
- func (b *BalanceOfNfts) FetchBalance(balance *models.Balance, p *models.Proposal) (*models.Balance, error)
- func (b *BalanceOfNfts) GetVoteWeightForBalance(vote *models.VoteWithBalance, proposal *models.Proposal) (float64, error)
- func (b *BalanceOfNfts) GetVotes(votes []*models.VoteWithBalance, proposal *models.Proposal) ([]*models.VoteWithBalance, error)
- func (b *BalanceOfNfts) InitStrategy(f *shared.FlowAdapter, db *shared.Database)
- func (b *BalanceOfNfts) RequiresSnapshot() bool
- func (b *BalanceOfNfts) TallyVotes(votes []*models.VoteWithBalance, r *models.ProposalResults, ...) (models.ProposalResults, error)
- type CustomScript
- func (cs *CustomScript) FetchBalance(balance *models.Balance, p *models.Proposal) (*models.Balance, error)
- func (cs *CustomScript) GetVoteWeightForBalance(vote *models.VoteWithBalance, proposal *models.Proposal) (float64, error)
- func (cs *CustomScript) GetVotes(votes []*models.VoteWithBalance, proposal *models.Proposal) ([]*models.VoteWithBalance, error)
- func (cs *CustomScript) InitStrategy(f *shared.FlowAdapter, db *shared.Database)
- func (cs *CustomScript) RequiresSnapshot() bool
- func (cs *CustomScript) TallyVotes(votes []*models.VoteWithBalance, r *models.ProposalResults, ...) (models.ProposalResults, error)
- type FloatNFTs
- func (f *FloatNFTs) FetchBalance(balance *models.Balance, p *models.Proposal) (*models.Balance, error)
- func (f *FloatNFTs) GetVoteWeightForBalance(vote *models.VoteWithBalance, proposal *models.Proposal) (float64, error)
- func (f *FloatNFTs) GetVotes(votes []*models.VoteWithBalance, proposal *models.Proposal) ([]*models.VoteWithBalance, error)
- func (f *FloatNFTs) InitStrategy(fa *shared.FlowAdapter, db *shared.Database)
- func (f *FloatNFTs) RequiresSnapshot() bool
- func (f *FloatNFTs) TallyVotes(votes []*models.VoteWithBalance, r *models.ProposalResults, ...) (models.ProposalResults, error)
- type OneAddressOneVote
- func (s *OneAddressOneVote) FetchBalance(b *models.Balance, p *models.Proposal) (*models.Balance, error)
- func (s *OneAddressOneVote) GetVoteWeightForBalance(vote *models.VoteWithBalance, proposal *models.Proposal) (float64, error)
- func (s *OneAddressOneVote) GetVotes(votes []*models.VoteWithBalance, proposal *models.Proposal) ([]*models.VoteWithBalance, error)
- func (s *OneAddressOneVote) InitStrategy(f *shared.FlowAdapter, db *shared.Database)
- func (s *OneAddressOneVote) RequiresSnapshot() bool
- func (s *OneAddressOneVote) TallyVotes(votes []*models.VoteWithBalance, r *models.ProposalResults, ...) (models.ProposalResults, error)
- type StakedTokenWeightedDefault
- func (s *StakedTokenWeightedDefault) FetchBalance(b *models.Balance, p *models.Proposal) (*models.Balance, error)
- func (s *StakedTokenWeightedDefault) FetchBalanceFromSnapshot(strategy *models.Strategy, b *models.Balance) error
- func (s *StakedTokenWeightedDefault) GetVoteWeightForBalance(vote *models.VoteWithBalance, proposal *models.Proposal) (float64, error)
- func (s *StakedTokenWeightedDefault) GetVotes(votes []*models.VoteWithBalance, proposal *models.Proposal) ([]*models.VoteWithBalance, error)
- func (s *StakedTokenWeightedDefault) InitStrategy(f *shared.FlowAdapter, db *shared.Database)
- func (s *StakedTokenWeightedDefault) RequiresSnapshot() bool
- func (s *StakedTokenWeightedDefault) TallyVotes(votes []*models.VoteWithBalance, r *models.ProposalResults, p *models.Proposal) (models.ProposalResults, error)
- type TokenWeightedDefault
- func (s *TokenWeightedDefault) FetchBalance(b *models.Balance, p *models.Proposal) (*models.Balance, error)
- func (s *TokenWeightedDefault) FetchBalanceFromSnapshot(strategy *models.Strategy, b *models.Balance) error
- func (s *TokenWeightedDefault) GetVoteWeightForBalance(vote *models.VoteWithBalance, proposal *models.Proposal) (float64, error)
- func (s *TokenWeightedDefault) GetVotes(votes []*models.VoteWithBalance, proposal *models.Proposal) ([]*models.VoteWithBalance, error)
- func (s *TokenWeightedDefault) InitStrategy(f *shared.FlowAdapter, db *shared.Database)
- func (s *TokenWeightedDefault) RequiresSnapshot() bool
- func (s *TokenWeightedDefault) TallyVotes(votes []*models.VoteWithBalance, r *models.ProposalResults, p *models.Proposal) (models.ProposalResults, error)
- type TotalTokenWeightedDefault
- func (s *TotalTokenWeightedDefault) FetchBalance(b *models.Balance, p *models.Proposal) (*models.Balance, error)
- func (s *TotalTokenWeightedDefault) FetchBalanceFromSnapshot(strategy *models.Strategy, b *models.Balance) error
- func (s *TotalTokenWeightedDefault) GetVoteWeightForBalance(vote *models.VoteWithBalance, proposal *models.Proposal) (float64, error)
- func (s *TotalTokenWeightedDefault) GetVotes(votes []*models.VoteWithBalance, proposal *models.Proposal) ([]*models.VoteWithBalance, error)
- func (s *TotalTokenWeightedDefault) InitStrategy(f *shared.FlowAdapter, db *shared.Database)
- func (s *TotalTokenWeightedDefault) RequiresSnapshot() bool
- func (s *TotalTokenWeightedDefault) TallyVotes(votes []*models.VoteWithBalance, r *models.ProposalResults, p *models.Proposal) (models.ProposalResults, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BalanceOfNfts ¶
type BalanceOfNfts struct { shared.StrategyStruct DB *shared.Database }
func (*BalanceOfNfts) FetchBalance ¶
func (*BalanceOfNfts) GetVoteWeightForBalance ¶
func (b *BalanceOfNfts) GetVoteWeightForBalance(vote *models.VoteWithBalance, proposal *models.Proposal) (float64, error)
func (*BalanceOfNfts) GetVotes ¶
func (b *BalanceOfNfts) GetVotes( votes []*models.VoteWithBalance, proposal *models.Proposal, ) ([]*models.VoteWithBalance, error)
func (*BalanceOfNfts) InitStrategy ¶
func (b *BalanceOfNfts) InitStrategy( f *shared.FlowAdapter, db *shared.Database, )
func (*BalanceOfNfts) RequiresSnapshot ¶
func (b *BalanceOfNfts) RequiresSnapshot() bool
func (*BalanceOfNfts) TallyVotes ¶
func (b *BalanceOfNfts) TallyVotes( votes []*models.VoteWithBalance, r *models.ProposalResults, proposal *models.Proposal, ) (models.ProposalResults, error)
type CustomScript ¶
type CustomScript struct { shared.StrategyStruct DB *shared.Database }
func (*CustomScript) FetchBalance ¶
func (*CustomScript) GetVoteWeightForBalance ¶
func (cs *CustomScript) GetVoteWeightForBalance( vote *models.VoteWithBalance, proposal *models.Proposal, ) (float64, error)
func (*CustomScript) GetVotes ¶
func (cs *CustomScript) GetVotes( votes []*models.VoteWithBalance, proposal *models.Proposal, ) ([]*models.VoteWithBalance, error)
func (*CustomScript) InitStrategy ¶
func (cs *CustomScript) InitStrategy( f *shared.FlowAdapter, db *shared.Database, )
func (*CustomScript) RequiresSnapshot ¶
func (cs *CustomScript) RequiresSnapshot() bool
func (*CustomScript) TallyVotes ¶
func (cs *CustomScript) TallyVotes( votes []*models.VoteWithBalance, r *models.ProposalResults, proposal *models.Proposal, ) (models.ProposalResults, error)
type FloatNFTs ¶
type FloatNFTs struct { shared.StrategyStruct DB *shared.Database }
func (*FloatNFTs) FetchBalance ¶
func (*FloatNFTs) GetVoteWeightForBalance ¶
func (*FloatNFTs) GetVotes ¶
func (f *FloatNFTs) GetVotes( votes []*models.VoteWithBalance, proposal *models.Proposal, ) ([]*models.VoteWithBalance, error)
func (*FloatNFTs) InitStrategy ¶
func (f *FloatNFTs) InitStrategy( fa *shared.FlowAdapter, db *shared.Database, )
func (*FloatNFTs) RequiresSnapshot ¶
func (*FloatNFTs) TallyVotes ¶
func (f *FloatNFTs) TallyVotes( votes []*models.VoteWithBalance, r *models.ProposalResults, proposal *models.Proposal, ) (models.ProposalResults, error)
type OneAddressOneVote ¶
type OneAddressOneVote struct { s.StrategyStruct DB *s.Database }
func (*OneAddressOneVote) FetchBalance ¶
func (*OneAddressOneVote) GetVoteWeightForBalance ¶
func (s *OneAddressOneVote) GetVoteWeightForBalance( vote *models.VoteWithBalance, proposal *models.Proposal, ) (float64, error)
func (*OneAddressOneVote) GetVotes ¶
func (s *OneAddressOneVote) GetVotes( votes []*models.VoteWithBalance, proposal *models.Proposal, ) ([]*models.VoteWithBalance, error)
func (*OneAddressOneVote) InitStrategy ¶
func (s *OneAddressOneVote) InitStrategy( f *shared.FlowAdapter, db *shared.Database, )
func (*OneAddressOneVote) RequiresSnapshot ¶
func (s *OneAddressOneVote) RequiresSnapshot() bool
func (*OneAddressOneVote) TallyVotes ¶
func (s *OneAddressOneVote) TallyVotes( votes []*models.VoteWithBalance, r *models.ProposalResults, proposal *models.Proposal, ) (models.ProposalResults, error)
type StakedTokenWeightedDefault ¶
type StakedTokenWeightedDefault struct { s.StrategyStruct DB *s.Database }
func (*StakedTokenWeightedDefault) FetchBalance ¶
func (*StakedTokenWeightedDefault) FetchBalanceFromSnapshot ¶
func (*StakedTokenWeightedDefault) GetVoteWeightForBalance ¶
func (s *StakedTokenWeightedDefault) GetVoteWeightForBalance( vote *models.VoteWithBalance, proposal *models.Proposal, ) (float64, error)
func (*StakedTokenWeightedDefault) GetVotes ¶
func (s *StakedTokenWeightedDefault) GetVotes( votes []*models.VoteWithBalance, proposal *models.Proposal, ) ([]*models.VoteWithBalance, error)
func (*StakedTokenWeightedDefault) InitStrategy ¶
func (s *StakedTokenWeightedDefault) InitStrategy( f *shared.FlowAdapter, db *shared.Database, )
func (*StakedTokenWeightedDefault) RequiresSnapshot ¶
func (s *StakedTokenWeightedDefault) RequiresSnapshot() bool
func (*StakedTokenWeightedDefault) TallyVotes ¶
func (s *StakedTokenWeightedDefault) TallyVotes( votes []*models.VoteWithBalance, r *models.ProposalResults, p *models.Proposal, ) (models.ProposalResults, error)
type TokenWeightedDefault ¶
type TokenWeightedDefault struct { s.StrategyStruct DB *s.Database }
func (*TokenWeightedDefault) FetchBalance ¶
func (*TokenWeightedDefault) FetchBalanceFromSnapshot ¶
func (*TokenWeightedDefault) GetVoteWeightForBalance ¶
func (s *TokenWeightedDefault) GetVoteWeightForBalance( vote *models.VoteWithBalance, proposal *models.Proposal, ) (float64, error)
func (*TokenWeightedDefault) GetVotes ¶
func (s *TokenWeightedDefault) GetVotes( votes []*models.VoteWithBalance, proposal *models.Proposal, ) ([]*models.VoteWithBalance, error)
func (*TokenWeightedDefault) InitStrategy ¶
func (s *TokenWeightedDefault) InitStrategy( f *shared.FlowAdapter, db *shared.Database, )
func (*TokenWeightedDefault) RequiresSnapshot ¶
func (s *TokenWeightedDefault) RequiresSnapshot() bool
func (*TokenWeightedDefault) TallyVotes ¶
func (s *TokenWeightedDefault) TallyVotes( votes []*models.VoteWithBalance, r *models.ProposalResults, p *models.Proposal, ) (models.ProposalResults, error)
type TotalTokenWeightedDefault ¶
type TotalTokenWeightedDefault struct { s.StrategyStruct DB *s.Database }
func (*TotalTokenWeightedDefault) FetchBalance ¶
func (*TotalTokenWeightedDefault) FetchBalanceFromSnapshot ¶
func (*TotalTokenWeightedDefault) GetVoteWeightForBalance ¶
func (s *TotalTokenWeightedDefault) GetVoteWeightForBalance( vote *models.VoteWithBalance, proposal *models.Proposal, ) (float64, error)
func (*TotalTokenWeightedDefault) GetVotes ¶
func (s *TotalTokenWeightedDefault) GetVotes( votes []*models.VoteWithBalance, proposal *models.Proposal, ) ([]*models.VoteWithBalance, error)
func (*TotalTokenWeightedDefault) InitStrategy ¶
func (s *TotalTokenWeightedDefault) InitStrategy( f *shared.FlowAdapter, db *shared.Database, )
func (*TotalTokenWeightedDefault) RequiresSnapshot ¶
func (s *TotalTokenWeightedDefault) RequiresSnapshot() bool
func (*TotalTokenWeightedDefault) TallyVotes ¶
func (s *TotalTokenWeightedDefault) TallyVotes( votes []*models.VoteWithBalance, r *models.ProposalResults, p *models.Proposal, ) (models.ProposalResults, error)
Click to show internal directories.
Click to hide internal directories.