Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SourceAdapters ¶
type SourceAdapters struct {
// contains filtered or unexported fields
}
SourceAdapters is a collection of source adapters.
func NewSourceAdapters ¶
func NewSourceAdapters( swapKeeper types.SwapKeeper, earnKeeper types.EarnKeeper, ) SourceAdapters
NewSourceAdapters returns a new SourceAdapters instance with all available source adapters.
func (SourceAdapters) OwnerSharesBySource ¶
func (a SourceAdapters) OwnerSharesBySource( ctx sdk.Context, claimType types.ClaimType, owner sdk.AccAddress, sourceIDs []string, ) []SourceShare
OwnerSharesBySource returns a slice of SourceShares for each sourceID from a specified owner. The slice is sorted by sourceID.
func (SourceAdapters) TotalSharesBySource ¶
func (a SourceAdapters) TotalSharesBySource( ctx sdk.Context, claimType types.ClaimType, sourceID string, ) sdk.Dec
TotalSharesBySource returns the total shares of a given claimType and sourceID.
type SourceShare ¶
type SourceShare struct {}
SourceShare is a single share from a source with it's corresponding ID.
Click to show internal directories.
Click to hide internal directories.