mirror of
https://github.com/GMGNAI/gmgn-skills.git
synced 2026-07-29 01:37:43 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b18d7deb32 | |||
| ddbfafdac5 | |||
| 316840d84d | |||
| f6e3bc4ef7 |
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "gmgn-cli",
|
||||
"version": "1.5.1",
|
||||
"version": "1.5.2",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "gmgn-cli",
|
||||
"version": "1.5.1",
|
||||
"version": "1.5.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"commander": "^12.1.0",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "gmgn-cli",
|
||||
"version": "1.5.1",
|
||||
"version": "1.5.2",
|
||||
"description": "GMGN OpenAPI CLI — call GMGN market, token, portfolio and swap APIs from the command line",
|
||||
"type": "module",
|
||||
"bin": {
|
||||
|
||||
@@ -842,6 +842,10 @@ const TRENCHES_PLATFORMS: Record<string, string[]> = {
|
||||
"trench", "clanker", "klik", "livo", "stroid",
|
||||
"pool_uniswap_v2", "pool_uniswap_v3", "printr",
|
||||
],
|
||||
robinhood: [
|
||||
"noxa", "virtuals_v2", "bankr", "dyorswap",
|
||||
"pool_uniswap_v2", "pool_uniswap_v3", "pool_uniswap_v4",
|
||||
],
|
||||
};
|
||||
|
||||
const TRENCHES_QUOTE_ADDRESS_TYPES: Record<string, number[]> = {
|
||||
@@ -849,6 +853,7 @@ const TRENCHES_QUOTE_ADDRESS_TYPES: Record<string, number[]> = {
|
||||
bsc: [6, 7, 1, 16, 8, 3, 9, 10, 2, 17, 18, 0],
|
||||
base: [11, 3, 12, 13, 0],
|
||||
eth: [20, 11, 8, 3, 12, 1, 0],
|
||||
robinhood: [11, 20, 24, 12, 0],
|
||||
};
|
||||
|
||||
function buildTrenchesBody(chain: string, types?: string[], platforms?: string[], limit?: number, filters?: Record<string, number | string>): Record<string, unknown> {
|
||||
@@ -858,12 +863,17 @@ function buildTrenchesBody(chain: string, types?: string[], platforms?: string[]
|
||||
const actualLimit = limit ?? 80;
|
||||
const section: Record<string, unknown> = {
|
||||
filters: ["offchain", "onchain"],
|
||||
launchpad_platform,
|
||||
quote_address_type,
|
||||
launchpad_platform_v2: true,
|
||||
limit: actualLimit,
|
||||
...filters,
|
||||
};
|
||||
// launchpad_platform / quote_address_type act as allow-list filters: sending an
|
||||
// empty array filters out every result. Configured chains (see the maps above)
|
||||
// supply real values; for any chain missing config we omit the field so the API
|
||||
// applies its own defaults rather than returning an all-empty response. This is a
|
||||
// safety net — new chains should still be added to both maps above.
|
||||
if (launchpad_platform.length) section.launchpad_platform = launchpad_platform;
|
||||
if (quote_address_type.length) section.quote_address_type = quote_address_type;
|
||||
const body: Record<string, unknown> = { version: "v2" };
|
||||
for (const type of selectedTypes) {
|
||||
body[type] = { ...section };
|
||||
|
||||
Reference in New Issue
Block a user