This is a demo project showcasing factory indexing pattern. Note that it does not scale well: once you have more than ~10k indexes you'll face issues with constant lags, also initial launch time would be pretty long. The alternatives are:
- Using more sophisticated datasources that allow to filter by class hash rather than contract address (e.g. https://github.com/dipdup-io/starknet-indexer)
- Subscribing to events by topic (which is sn_keccak of event name) and filter out unsuitable events afterwards
- Index entire blocks
The more token transfers and the more recent they are - the better.
query TopMemesByActivity {
memecoin(limit: 3, order_by: {activityMetric: desc}) {
createdAt
name
symbol
numHolders
numTransfers
updatedAt
}
}
query TopMemesByNumberOfHolders {
memecoin(limit: 3, order_by: {numHolders: desc}) {
createdAt
name
symbol
numHolders
numTransfers
updatedAt
}
}
query TopHoldersWithMaxNumberOfMemes {
holder(order_by: {numMemes: desc}, limit: 3) {
contractAddress
numMemes
createdAt
updatedAt
}
}
The more transfers and the more recent they are - the better.
query TopHoldersWithMaxNumberOfMemes {
holder(order_by: {numMemes: desc}, limit: 3) {
contractAddress
numMemes
createdAt
updatedAt
numTransfers
}
}
TODO: filter out liquidity pools and Unrug contracts.
List of meme addresses provided (in this example it's Real
).
query TopHoldersOfSpecifiedMemes {
position(limit: 3, order_by: {balance: desc}, where: {memeId: {_in: [3019945096687648353897341156076824465806717891370049345070820623605306751174]}}) {
balance
holder {
contractAddress
createdAt
updatedAt
numTransfers
numSells
numMemes
}
meme {
name
}
}
}
List of meme addresses provided (in this example it's Real
).
query EarlyMemeHodlers {
position(limit: 3, order_by: {createdAt: asc}, where: {memeId: {_in: [3019945096687648353897341156076824465806717891370049345070820623605306751174]}, numSells: {_eq: "0"}}) {
balance
holder {
contractAddress
numMemes
}
meme {
name
symbol
}
numTransfers
}
}
query AbsoluteOGs {
holder(order_by: {createdAt: asc, numMemes: desc}, where: {numSells: {_eq: "0"}}, limit: 3) {
numMemes
contractAddress
createdAt
}
}
query RecentMemes {
memecoin(limit: 3, order_by: {createdAt: desc}) {
createdAt
name
symbol
numTransfers
numHolders
updatedAt
}
}
query RecentlyActiveMemes {
memecoin(limit: 3, order_by: {updatedAt: desc}) {
updatedAt
name
symbol
numTransfers
numHolders
}
}
query RecentlyActiveHolders {
holder(order_by: {activityMetric: desc}, limit: 5) {
numMemes
numTransfers
numSells
contractAddress
createdAt
updatedAt
}
}