Documentation ¶
Index ¶
- func SortMapByValue(m map[string]int64, reverse bool) []string
- func WriteDataToFile(data interface{}, filePath string)
- func ZstdCompress(in io.Reader, out io.Writer) error
- type Accounts
- type Collection
- type Degen
- type DegenDB
- type EventType
- type MetadataAttribute
- type OpenSeaMetadata
- type OpenSeaRanks
- type Rank
- type RecentEvent
- type SaLiRa
- type SaLiRas
- type Score
- type Slugs
- type Tag
- type Token
- type TokenMetadata
- type TokenRank
- type Wallet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SortMapByValue ¶ added in v0.8.0
func WriteDataToFile ¶ added in v0.8.0
func WriteDataToFile(data interface{}, filePath string)
Types ¶
type Accounts ¶
type Accounts struct { // Twitter is the Twitter username for this degen Twitter string `bson:"twitter,omitempty" json:"twitter"` // Telegram is the Telegram username for this degen Telegram string `bson:"telegram,omitempty" json:"telegram"` // ChatID is the Telegram chat ID for this degen TelegramChatID int64 `bson:"telegram_chat_id,omitempty" json:"telegram_chat_id"` }
type Collection ¶
type Collection struct { // ID is the unique identifier for this collection ID primitive.ObjectID `bson:"_id,omitempty" json:"id,omitempty"` // Address is the address of the contract Address common.Address `bson:"address,omitempty" json:"address,omitempty"` // Name is the name of the collection Name string `bson:"name,omitempty" json:"name,omitempty"` // Slugs are the collection slugs of the collection Slugs Slugs `bson:"slugs,omitempty" json:"slugs,omitempty"` // Description is the description of the collection Description string `bson:"description,omitempty" json:"description,omitempty"` // TotalSupply is the total supply of the collection TotalSupply int `bson:"total_supply,omitempty" json:"total_supply,omitempty"` // ImageURL is the URL of the image of the collection ImageURL string `bson:"image_url,omitempty" json:"image_url,omitempty"` // ExternalURL is the URL of the collection ExternalURL string `bson:"external_url,omitempty" json:"external_url,omitempty"` // CreatedAt is the time this collection was created CreatedAt time.Time `bson:"created_at,omitempty" json:"created_at,omitempty"` // UpdatedAt is the time this collection was last updated UpdatedAt time.Time `bson:"updated_at,omitempty" json:"updated_at,omitempty"` }
type Degen ¶
type Degen struct { // ID is the unique identifier for this degen ID primitive.ObjectID `bson:"_id,omitempty" json:"id"` // Name is the name of the degen Name string `bson:"name,omitempty" json:"name"` // Accounts contains other accounts of this degen Accounts Accounts `bson:"accounts,omitempty" json:"accounts"` // Wallets is a list of wallet addresses associated with this degen Wallets []Wallet `bson:"wallets,omitempty" json:"wallets"` // Tags is a list of tags associated with this degen Tags []Tag `bson:"tags,omitempty" json:"tags"` // CreatedAt is the time this degen was created CreatedAt time.Time `bson:"created_at,omitempty" json:"created_at"` // UpdatedAt is the time this degen was last updated UpdatedAt time.Time `bson:"updated_at,omitempty" json:"updated_at"` }
type DegenDB ¶
type DegenDB struct {
// contains filtered or unexported fields
}
func NewDegenDB ¶
func NewDegenDB() *DegenDB
func (*DegenDB) AddCollectionToken ¶
func (ddb *DegenDB) AddCollectionToken(collections interface{}, tokens interface{})
type MetadataAttribute ¶ added in v0.8.0
type OpenSeaMetadata ¶ added in v0.8.0
type OpenSeaRanks ¶ added in v0.8.0
type RecentEvent ¶ added in v0.9.0
type RecentEvent struct { Timestamp time.Time `bson:"timestamp,omitempty" json:"timestamp,omitempty"` // Event Type Type EventType `bson:"type,omitempty" json:"type,omitempty"` // Event Volume AmountWei *big.Int `bson:"amount_wei,omitempty" json:"amount_wei,omitempty"` AmountTokens uint64 `bson:"amount_tokens,omitempty" json:"amount_tokens,omitempty"` }
type SaLiRa ¶ added in v0.9.0
type SaLiRa struct { ewma.MovingAverage Timeframe time.Duration Previous float64 }
single SaLiRa instance.
type SaLiRas ¶ added in v0.9.0
type SaLiRas []*SaLiRa
SaLiRas is a group of saLiRa instances for different timeframes type SaLiRas map[time.Duration]*saLiRa.
func NewSaLiRas ¶ added in v0.9.0
NewSaLiRas creates a new SaLiRas instance.
type Token ¶
type Token struct { // ID is the unique identifier for this token ID primitive.ObjectID `bson:"_id,omitempty" json:"id"` // Collection is the collection this token belongs to Collection Collection `bson:"collection,omitempty" json:"collection"` // CollectionSlugs are the collection slugs of the collection this token belongs to CollectionSlugs Slugs `bson:"collection_slugs,omitempty" json:"collection_slugs"` // ContractAddress is the address of the contract this token belongs to ContractAddress string `bson:"contract_address,omitempty" json:"contract_address"` // Token ID used as in the collection TokenID int64 `bson:"token_id,omitempty" json:"token_id"` // Name is the name of the token Name string `bson:"name,omitempty" json:"name"` // Ranks are the ranks of the token Rank Rank `bson:"ranks,omitempty" json:"ranks"` // Score is the score of the token calculated via the open-rarity algorithm Score float64 `bson:"score,omitempty" json:"score"` // Metadata is the metadata of the token Metadata []MetadataAttribute `bson:"metadata,omitempty" json:"metadata"` // CreatedAt is the time this token was created CreatedAt time.Time `bson:"created_at,omitempty" json:"created_at"` // UpdatedAt is the time this token was last updated UpdatedAt time.Time `bson:"updated_at,omitempty" json:"updated_at"` }
type TokenMetadata ¶ added in v0.8.0
type Wallet ¶
type Wallet struct { // ID is the unique identifier for this wallet ID primitive.ObjectID `bson:"_id,omitempty" json:"id"` // Address is the wallet address Address common.Address `bson:"address" json:"address"` // Tags is a list of tags associated with this wallet Tags []Tag `bson:"tags,omitempty" json:"tags"` // LastSeen is the time this wallet was last seen LastSeen int64 `bson:"last_seen,omitempty" json:"last_seen"` // CreatedAt is the time this wallet was created CreatedAt int64 `bson:"created_at,omitempty" json:"created_at"` // UpdatedAt is the time this wallet was last updated UpdatedAt int64 `bson:"updated_at,omitempty" json:"updated_at"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.