aavegotchi rarity farming leaderboard
import { leaderboard } from '@candoizo/aavegotchi-leaderboard';
there is also a cli:
npx @candoizo/aavegotchi-leaderboard --help
- setData(index) ⇒
Get set information by index in the list of sets.
- isSetItemsInEquippedWearables(setItems, equippedWearables) ⇒
boolean
Checks whether the setItems is a subset of the equippedWearables
- allSetsForItems(items) ⇒
Array.<number>
This function will return all of the sets that a player has equipped based on the items they have equipped
- allSetsForAavegotchi(aavegotchi) ⇒
Array.<number>
This function will return all of the sets that an Aavegotchi has equipped based on the items they have equipped and collateral
- bestSetOfSets(sets) ⇒
number
Takes an array of set indices and returns the index of the set with the best bonuses
- returnRarity(number) ⇒
number
This function returns the rarity bonus of a number given.
- rarityScoreBonus(traits) ⇒
number
Takes an array of trait values and returns the total rarity score bonus.
- kinshipMinusLastInteracted(kinship, lastInteracted) ⇒
number
Get the on-chain kinship using sui the current kinship and last interaction timestamp to calculate kinship, to get accurate value from subgraph Aavegotchis
- seasonRoundBlockSnapshots(season, round) ⇒
number
|undefined
Get the block snapshots for the given season and round.
- aavegotchis([blockNumber]) ⇒
Promise.<Object>
Fetch all Aavegotchi information from subgraph
- leaderboard(round, [season], [blockNumber], [exportRange]) ⇒
Promise.<Object>
Returns the leaderboard for a given round
Get set information by index in the list of sets.
Kind: global function
Returns: The current set data at the given index.
Param | Type | Description |
---|---|---|
index | number |
The index of the set in the list, starting at 0 |
Checks whether the setItems is a subset of the equippedWearables
Kind: global function
Returns: boolean
- True if the equippedWearables match the setItems
Param | Type | Description |
---|---|---|
setItems | Array.<number> |
Set to check the first array is a subset of the second array |
equippedWearables | Array.<number> |
Set to check the first array is a subset of the second array |
This function will return all of the sets that a player has equipped based on the items they have equipped
Kind: global function
Returns: Array.<number>
- An array of all the set by index that the player has equipped
Param | Type | Description |
---|---|---|
items | Array.<number> |
An array of all the item ids that the player has equipped |
This function will return all of the sets that an Aavegotchi has equipped based on the items they have equipped and collateral
Kind: global function
Returns: Array.<number>
- An array of all the set by index that the player has equipped
Param | Type | Description |
---|---|---|
aavegotchi | SubgraphResult |
Object representing an Aavegotchi subgraph result with equippedWearables and collateral properties |
Takes an array of set indices and returns the index of the set with the best bonuses
Kind: global function
Returns: number
- The index of the set with the best bonuses
Param | Type | Description |
---|---|---|
sets | Array.<number> |
An array of set indices |
This function returns the rarity bonus of a number given.
Kind: global function
Returns: number
- The rarity of the given number.
Param | Type | Description |
---|---|---|
number | number |
A number between 1 and 100. |
Takes an array of trait values and returns the total rarity score bonus.
Kind: global function
Returns: number
- The total rarity score bonus.
Param | Type | Description |
---|---|---|
traits | Array.<number> |
An array of trait values. |
Get the on-chain kinship using sui the current kinship and last interaction timestamp to calculate kinship, to get accurate value from subgraph Aavegotchis
Kind: global function
Returns: number
- A kinship score.
https://github.com/aavegotchi/aavegotchi-contracts/blob/847e437bf31a746b520c1b506adef7788716e797/contracts/Aavegotchi/libraries/LibAavegotchi.sol#L223
Param | Type | Description |
---|---|---|
kinship | number |
A kinship value. |
lastInteracted | number |
A timestamp of the last interaction. |
Get the block snapshots for the given season and round.
Kind: global function
Returns: number
| undefined
- A canonical snapshot block number for the given season and round. 0/undefined if not set.
Param | Type | Description |
---|---|---|
season | number |
The season number |
round | number |
The round number |
Fetch all Aavegotchi information from subgraph
Kind: global function
Returns: Promise.<Object>
- Returns data in a promise
Param | Type | Description |
---|---|---|
[blockNumber] | number |
The number of the block to query |
Returns the leaderboard for a given round
Kind: global function
Returns: Promise.<Object>
- An object containing the leaderboard results
Param | Type | Description |
---|---|---|
round | number |
The round for which to return the leaderboard |
[season] | number |
The season for which to return the leaderboard |
[blockNumber] | number |
The block number for which to return the leaderboard |
[exportRange] | number |
The amount of results to return |