Skip to content

Commit 9d1d654

Browse files
authored
Launchpad bundles-snipers-insiders (#49)
* rebuild * Filter out some networks
1 parent 2c3dd50 commit 9d1d654

File tree

9 files changed

+659
-128
lines changed

9 files changed

+659
-128
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@codex-data/sdk",
3-
"version": "1.0.36",
3+
"version": "1.0.37",
44
"engines": {
55
"node": ">=17.5.0"
66
},

src/resources/graphql.schema.json

Lines changed: 340 additions & 16 deletions
Large diffs are not rendered by default.

src/resources/graphql.ts

Lines changed: 69 additions & 14 deletions
Large diffs are not rendered by default.

src/resources/networkConfigs.json

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1581,6 +1581,37 @@
15811581
"baseTokenName": "Wrapped KAI",
15821582
"baseTokenDecimals": 18
15831583
},
1584+
{
1585+
"__typename": "EvmNetworkConfig",
1586+
"id": "747474",
1587+
"networkType": "EVM",
1588+
"networkId": 747474,
1589+
"name": "katana",
1590+
"enabled": true,
1591+
"newTokensEnabled": false,
1592+
"mainnet": true,
1593+
"wrappedBaseTokenSymbol": "vbETH",
1594+
"baseTokenSymbol": "ETH",
1595+
"baseTokenAddress": "0xee7d8bcfb72bc1880d0cf19822eb0a2e6577ab62",
1596+
"defaultPairAddress": "0xdfc0ba24be7f93bf1a9401635815ece4cc579282",
1597+
"defaultPairQuoteToken": "token0",
1598+
"stableCoinAddresses": [
1599+
"0x203a662b0bd271a6ed5a60edfbd04bfce608fd36",
1600+
"0x2dca96907fde857dd3d816880a0df407eeb2d2f2"
1601+
],
1602+
"networkIconUrl": "https://icons.defined.fi/networks/katana.png",
1603+
"color": "#0550DB",
1604+
"networkShortName": "katana",
1605+
"networkName": "Katana",
1606+
"explorer": {
1607+
"name": "KatanaScan",
1608+
"url": "https://katanascan.com/${type}/${input}",
1609+
"checksummed": true,
1610+
"icon": "https://icons.defined.fi/networks/katana.png"
1611+
},
1612+
"baseTokenName": "Vault Bridge ETH",
1613+
"baseTokenDecimals": 18
1614+
},
15841615
{
15851616
"__typename": "EvmNetworkConfig",
15861617
"id": "321",
@@ -1945,15 +1976,15 @@
19451976
"stableCoinAddresses": [
19461977
"0xf817257fed379853cde0fa4f97ab987181b1e5ea"
19471978
],
1948-
"networkIconUrl": "https://icons.defined.fi/networks/monad.png",
1979+
"networkIconUrl": "https://icons.defined.fi/networks/monad-testnet.png",
19491980
"color": "#836ef9",
19501981
"networkShortName": "mon-test",
19511982
"networkName": "Monad Testnet",
19521983
"explorer": {
19531984
"name": "Monad Explorer",
19541985
"url": "https://testnet.monadexplorer.com/${type}/${input}",
19551986
"checksummed": true,
1956-
"icon": "https://icons.defined.fi/networks/monad.png"
1987+
"icon": "https://icons.defined.fi/networks/monad-testnet.png"
19571988
},
19581989
"baseTokenName": "Wrapped Monad",
19591990
"baseTokenDecimals": 18

src/resources/schema.graphql

Lines changed: 72 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ type Query {
2929
"""limit: The maximum number of webhooks to return."""
3030
limit: Int
3131
): GetWebhooksResponse
32+
"""Returns a list of network configurations."""
3233
getNetworkConfigs(
3334
networkIds: [Int!]
3435
): [NetworkConfig!]!
@@ -792,8 +793,10 @@ type Subscription {
792793
onPairMetadataUpdated(
793794
"""The ID of the pair (`address`:`networkId`)."""
794795
id: String
795-
"""The token of interest within the pair. Can be `token0` or `token1`."""
796+
"""The token of interest within the pair. Can be `token0` or `token1`. If not specified, returns data for both tokens."""
796797
quoteToken: QuoteToken
798+
"""If true, automatically selects the non-liquidity token as the quoteToken. Ignored if quoteToken is explicitly specified."""
799+
useNonLiquidityTokenAsQuoteToken: Boolean
797800
): PairMetadata
798801
"""Live-streamed bucketed stats for a given token within a pair."""
799802
onDetailedStatsUpdated(
@@ -2355,6 +2358,8 @@ input GetPriceInput {
23552358
timestamp: Int
23562359
"""The address of the pool, when omitted the top pool is used."""
23572360
poolAddress: String
2361+
"""The block number for the price. It must be provided in addition to the timestamp to get a per block breakdown at a specific timestamp."""
2362+
blockNumber: Int
23582363
"""The maximum number of deviations from the token's Liquidity-Weighted Mean Price. This is used to mitigate low liquidity pairs producing prices that are not representative of reality. Default is `1`."""
23592364
maxDeviations: Float @deprecated(reason: "This isn't taken into account anymore.")
23602365
}
@@ -2685,7 +2690,7 @@ type LaunchpadTokenEventOutput {
26852690
launchpadName: String!
26862691
"""Metadata for the token."""
26872692
token: EnhancedToken!
2688-
"""The number of buys in the last 24 hours."""
2693+
"""The number of buys in the last hour."""
26892694
buyCount1: Int
26902695
"""The type of event."""
26912696
eventType: LaunchpadTokenEventType!
@@ -2695,14 +2700,28 @@ type LaunchpadTokenEventOutput {
26952700
marketCap: String
26962701
"""The price of the token."""
26972702
price: Float
2698-
"""The number of sells in the last 24 hours."""
2703+
"""The number of sells in the last hour."""
26992704
sellCount1: Int
2700-
"""The volume of the token in the last 24 hours."""
2705+
"""The volume of the token in the last hour."""
27012706
volume1: Int
2702-
"""The number of transactions in the last 24 hours."""
2707+
"""The number of transactions in the last hour."""
27032708
transactions1: Int
27042709
"""The liquidity of the token's top pair."""
27052710
liquidity: String
2711+
"""The number of snipers that bought the token"""
2712+
sniperCount: Float
2713+
"""The percentage of the token that is held by snipers"""
2714+
sniperHeldPercentage: Float
2715+
"""The number of bundlers that bought the token"""
2716+
bundlerCount: Float
2717+
"""The percentage of the token that is held by bundlers"""
2718+
bundlerHeldPercentage: Float
2719+
"""The number of insiders that bought the token"""
2720+
insiderCount: Float
2721+
"""The percentage of the token that is held by insiders"""
2722+
insiderHeldPercentage: Float
2723+
"""The percentage of the token that is held by developers"""
2724+
devHeldPercentage: Float
27062725
}
27072726

27082727
"""The type of event. Note that associated statistics such as `buyCount1`, `price`, etc. are only available for `Updated` events."""
@@ -2761,6 +2780,8 @@ enum LaunchpadTokenProtocol {
27612780
TokenMillV2
27622781
"""Protocol name for Clanker V4."""
27632782
ClankerV4
2783+
"""Protocol name for Printr (EVM only - Printr tokens on Solana should be queried with launchpadName as Printr uses MeteoraDBC on Solana)."""
2784+
Printr
27642785
}
27652786

27662787
scalar link__Import
@@ -5710,9 +5731,9 @@ input OnLaunchpadTokenEventBatchInput {
57105731
protocols: [LaunchpadTokenProtocol!]
57115732
"""The network ID that the token is deployed on."""
57125733
networkId: Int
5713-
"""The name of the launchpad. One of the following: Pump.fun, Bonk, Baseapp, Zora, Zora Creator, Four.meme, Believe, Moonshot, Jupiter Studio, boop, Heaven, TokenMill V2, Virtuals, Clanker, Clanker V4, ArenaTrade, Moonit, LaunchLab, MeteoraDBC, Vertigo, Cooking.City, time.fun, BAGS, Circus, Dealr, OhFuckFun, PrintFun, Trend, shout.fun, xApple, Sendshot, DubDub, cults."""
5734+
"""The name of the launchpad. One of the following: Pump.fun, Bonk, Baseapp, Zora, Zora Creator, Four.meme, Four.meme Fair, Believe, Moonshot, Jupiter Studio, boop, Heaven, TokenMill V2, Virtuals, Clanker, Clanker V4, ArenaTrade, Moonit, LaunchLab, MeteoraDBC, Vertigo, Cooking.City, time.fun, BAGS, Circus, Dealr, OhFuckFun, PrintFun, Trend, shout.fun, xApple, Sendshot, DubDub, cults, OpenGameProtocol, Printr."""
57145735
launchpadName: String
5715-
"""A list of launchpad names. Any of the following: Pump.fun, Bonk, Baseapp, Zora, Zora Creator, Four.meme, Believe, Moonshot, Jupiter Studio, boop, Heaven, TokenMill V2, Virtuals, Clanker, Clanker V4, ArenaTrade, Moonit, LaunchLab, MeteoraDBC, Vertigo, Cooking.City, time.fun, BAGS, Circus, Dealr, OhFuckFun, PrintFun, Trend, shout.fun, xApple, Sendshot, DubDub, cults."""
5736+
"""A list of launchpad names. Any of the following: Pump.fun, Bonk, Baseapp, Zora, Zora Creator, Four.meme, Four.meme Fair, Believe, Moonshot, Jupiter Studio, boop, Heaven, TokenMill V2, Virtuals, Clanker, Clanker V4, ArenaTrade, Moonit, LaunchLab, MeteoraDBC, Vertigo, Cooking.City, time.fun, BAGS, Circus, Dealr, OhFuckFun, PrintFun, Trend, shout.fun, xApple, Sendshot, DubDub, cults, OpenGameProtocol, Printr."""
57165737
launchpadNames: [String!]
57175738
"""The type of event."""
57185739
eventType: LaunchpadTokenEventType
@@ -5724,9 +5745,9 @@ input OnLaunchpadTokenEventInput {
57245745
protocol: LaunchpadTokenProtocol
57255746
"""A list of launchpad protocols."""
57265747
protocols: [LaunchpadTokenProtocol!]
5727-
"""The name of the launchpad. One of the following: Pump.fun, Bonk, Baseapp, Zora, Zora Creator, Four.meme, Believe, Moonshot, Jupiter Studio, boop, Heaven, TokenMill V2, Virtuals, Clanker, Clanker V4, ArenaTrade, Moonit, LaunchLab, MeteoraDBC, Vertigo, Cooking.City, time.fun, BAGS, Circus, Dealr, OhFuckFun, PrintFun, Trend, shout.fun, xApple, Sendshot, DubDub, cults."""
5748+
"""The name of the launchpad. One of the following: Pump.fun, Bonk, Baseapp, Zora, Zora Creator, Four.meme, Four.meme Fair, Believe, Moonshot, Jupiter Studio, boop, Heaven, TokenMill V2, Virtuals, Clanker, Clanker V4, ArenaTrade, Moonit, LaunchLab, MeteoraDBC, Vertigo, Cooking.City, time.fun, BAGS, Circus, Dealr, OhFuckFun, PrintFun, Trend, shout.fun, xApple, Sendshot, DubDub, cults, OpenGameProtocol, Printr."""
57285749
launchpadName: String
5729-
"""A list of launchpad names. Any of the following: Pump.fun, Bonk, Baseapp, Zora, Zora Creator, Four.meme, Believe, Moonshot, Jupiter Studio, boop, Heaven, TokenMill V2, Virtuals, Clanker, Clanker V4, ArenaTrade, Moonit, LaunchLab, MeteoraDBC, Vertigo, Cooking.City, time.fun, BAGS, Circus, Dealr, OhFuckFun, PrintFun, Trend, shout.fun, xApple, Sendshot, DubDub, cults."""
5750+
"""A list of launchpad names. Any of the following: Pump.fun, Bonk, Baseapp, Zora, Zora Creator, Four.meme, Four.meme Fair, Believe, Moonshot, Jupiter Studio, boop, Heaven, TokenMill V2, Virtuals, Clanker, Clanker V4, ArenaTrade, Moonit, LaunchLab, MeteoraDBC, Vertigo, Cooking.City, time.fun, BAGS, Circus, Dealr, OhFuckFun, PrintFun, Trend, shout.fun, xApple, Sendshot, DubDub, cults, OpenGameProtocol, Printr."""
57305751
launchpadNames: [String!]
57315752
"""The type of event."""
57325753
eventType: LaunchpadTokenEventType
@@ -6651,6 +6672,8 @@ type Price {
66516672
"""The unix timestamp for the price."""
66526673
timestamp: Int
66536674
"""The pool that emitted the swap generating this price"""
6675+
blockNumber: Int
6676+
"""The pool that emitted the swap generating this price"""
66546677
poolAddress: String @deprecated(reason: "Pricing no longer based on specific pools")
66556678
"""Ratio of how confident we are in the price"""
66566679
confidence: Float @deprecated(reason: "Pricing no longer based on specific pools")
@@ -7914,12 +7937,28 @@ type TokenFilterResult {
79147937
swapPct1dOldWallet: String
79157938
"""The percentage of wallets that are less than 7d old that have traded in the last 24h"""
79167939
swapPct7dOldWallet: String
7940+
"""The number of wallets that have sniped the token"""
7941+
sniperCount: Int
7942+
"""The percentage of tokens held by snipers"""
7943+
sniperHeldPercentage: Float
7944+
"""The number of wallets that have bundled the token"""
7945+
bundlerCount: Int
7946+
"""The percentage of tokens held by bundlers"""
7947+
bundlerHeldPercentage: Float
7948+
"""The number of wallets that have been an insider of the token"""
7949+
insiderCount: Int
7950+
"""The percentage of tokens held by insiders"""
7951+
insiderHeldPercentage: Float
7952+
"""The percentage of tokens held by the dev"""
7953+
devHeldPercentage: Float
79177954
}
79187955

79197956
"""Input type of `TokenFilters`."""
79207957
input TokenFilters {
79217958
"""The unix timestamp for the creation of the token's first pair."""
79227959
createdAt: NumberFilter
7960+
"""The unix timestamp for the creation of the token."""
7961+
tokenCreatedAt: NumberFilter
79237962
"""The unix timestamp for the token's last transaction."""
79247963
lastTransaction: NumberFilter
79257964
age: NumberFilter @deprecated(reason: "Age isn't supported - use createdAt instead")
@@ -8084,7 +8123,7 @@ input TokenFilters {
80848123
creatorAddress: String
80858124
"""A list of launchpad protocols."""
80868125
launchpadProtocol: [String!]
8087-
"""A list of launchpad names. Any of the following: Pump.fun, Bonk, Baseapp, Zora, Zora Creator, Four.meme, Believe, Moonshot, Jupiter Studio, boop, Heaven, TokenMill V2, Virtuals, Clanker, Clanker V4, ArenaTrade, Moonit, LaunchLab, MeteoraDBC, Vertigo, Cooking.City, time.fun, BAGS, Circus, Dealr, OhFuckFun, PrintFun, Trend, shout.fun, xApple, Sendshot, DubDub, cults."""
8126+
"""A list of launchpad names. Any of the following: Pump.fun, Bonk, Baseapp, Zora, Zora Creator, Four.meme, Four.meme Fair, Believe, Moonshot, Jupiter Studio, boop, Heaven, TokenMill V2, Virtuals, Clanker, Clanker V4, ArenaTrade, Moonit, LaunchLab, MeteoraDBC, Vertigo, Cooking.City, time.fun, BAGS, Circus, Dealr, OhFuckFun, PrintFun, Trend, shout.fun, xApple, Sendshot, DubDub, cults, OpenGameProtocol, Printr."""
80888127
launchpadName: [String!]
80898128
"""Indicates if the launchpad is completed."""
80908129
launchpadCompleted: Boolean
@@ -8108,6 +8147,20 @@ input TokenFilters {
81088147
swapPct1dOldWallet: NumberFilter
81098148
"""The percentage of wallets that are less than 7d old that have traded in the last 24h"""
81108149
swapPct7dOldWallet: NumberFilter
8150+
"""Filter by number of wallets that have sniped the token"""
8151+
sniperCount: NumberFilter
8152+
"""Filter by percentage of tokens held by snipers"""
8153+
sniperHeldPercentage: NumberFilter
8154+
"""Filter by number of wallets that have bundled the token"""
8155+
bundlerCount: NumberFilter
8156+
"""Filter by percentage of tokens held by bundlers"""
8157+
bundlerHeldPercentage: NumberFilter
8158+
"""Filter by number of wallets that have been an insider of the token"""
8159+
insiderCount: NumberFilter
8160+
"""Filter by percentage of tokens held by insiders"""
8161+
insiderHeldPercentage: NumberFilter
8162+
"""Filter by percentage of tokens held by the dev"""
8163+
devHeldPercentage: NumberFilter
81118164
}
81128165

81138166
"""Metadata for a token."""
@@ -8298,6 +8351,7 @@ input TokenRanking {
82988351
"""The attribute used to rank tokens."""
82998352
enum TokenRankingAttribute {
83008353
createdAt
8354+
tokenCreatedAt
83018355
lastTransaction
83028356
age @deprecated(reason: "Use createdAt instead")
83038357
buyCount5m
@@ -8588,13 +8642,13 @@ type TokenWalletFilterResult {
85888642
sells1y: Int!
85898643
"""Number of sells all in the past year"""
85908644
sellsAll1y: Int!
8591-
"""The purchased token balance"""
8592-
purchasedTokenBalance: String!
85938645
"""The token acquisition cost in USD"""
85948646
tokenAcquisitionCostUsd: String!
8595-
"""The token balance in the wallet. This value does not update with every transfer and can be slightly stale. Use tokenBalanceLive for live data."""
8647+
"""The total balance of tokens that the user has bought or sold. This value does not include tokens acquired through external transfers or unsupported methods."""
8648+
purchasedTokenBalance: String!
8649+
"""The total balance of tokens held by the user, reflecting the most recent update to the record. This balance includes all tokens, even those transferred in through unsupported methods or DEXs that are not tracked by our system. This value does not update with every transfer and can be slightly stale. Use tokenBalanceLive for live data."""
85968650
tokenBalance: String!
8597-
"""The current token balance in the wallet."""
8651+
"""The current token balance in the wallet. This value is updated with every transfer and is therefore more accurate than tokenBalance."""
85988652
tokenBalanceLive: String
85998653
"""The current USD value of the token balance."""
86008654
tokenBalanceLiveUsd: String
@@ -8813,6 +8867,8 @@ type UniswapV4Data {
88138867
uniswapV4HookAddress: String
88148868
"""Whether the token is the network token for the Uniswap V4 pool."""
88158869
isToken0NetworkToken: Boolean
8870+
"""Whether the pool uses a dynamic fee. A fee of 0x80000 is used by Uniswap V4 to indicate a dynamic pool -- in such cases, the fee percentage on the pair should be disregarded."""
8871+
isDynamicFee: Boolean
88168872
type: String!
88178873
}
88188874

@@ -9642,9 +9698,9 @@ enum WalletTokenRankingAttribute {
96429698
buys1y
96439699
"""Number of sells in the past year"""
96449700
sells1y
9645-
"""Token balance"""
9701+
"""The total balance of tokens held by the user, reflecting the most recent update to the record. This balance includes all tokens, even those transferred in through unsupported methods or DEXs that are not tracked by our system."""
96469702
tokenBalance
9647-
"""Purchased token balance"""
9703+
"""The total balance of tokens that the user has bought or sold. This value does not include tokens acquired through external transfers or unsupported methods."""
96489704
purchasedTokenBalance
96499705
"""Token acquisition cost in USD"""
96509706
tokenAcquisitionCostUsd

src/scripts/generateNetworkConfigs.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,21 @@ const getTokensQuery = gql`
167167
}
168168
`;
169169

170+
const EXCLUDED_NETWORK_IDS = [
171+
150607357, // FOGO
172+
6343, // megaeth
173+
143, // monad
174+
];
175+
170176
async function main() {
171177
// eslint-disable-next-line @typescript-eslint/ban-types, @typescript-eslint/no-explicit-any
172178
const data = await sdk.query<{ getNetworkConfigs: any }, {}>(
173179
getNetworkConfigsQuery,
174180
);
175-
const networkConfigs = data.getNetworkConfigs;
181+
const networkConfigs = data.getNetworkConfigs.filter(
182+
(config: { networkId: number }) =>
183+
!EXCLUDED_NETWORK_IDS.includes(config.networkId),
184+
);
176185

177186
// Get all base token addresses with their network IDs
178187
const tokenIds: string[] = networkConfigs.map(

0 commit comments

Comments
 (0)