From 0b6c8e0c06c9a8662aadeec18e356e2c3fb0736a Mon Sep 17 00:00:00 2001 From: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 19 Mar 2025 18:03:04 +0000 Subject: [PATCH 01/19] Bumping drift-common to 9bf959130557e057557f689cb8ba7511553233ee --- drift-common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drift-common b/drift-common index fedca73..9bf9591 160000 --- a/drift-common +++ b/drift-common @@ -1 +1 @@ -Subproject commit fedca73a67d061df392f2829c8214935659cf61e +Subproject commit 9bf959130557e057557f689cb8ba7511553233ee From 62a8fbbda6d53f1f7f3d7ae83d86ca8e90d83057 Mon Sep 17 00:00:00 2001 From: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 20 Mar 2025 14:42:16 +0000 Subject: [PATCH 02/19] Bumping drift-common to e1df3746ced59bff48ed1f17ffa426d69500bc56 --- drift-common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drift-common b/drift-common index 9bf9591..e1df374 160000 --- a/drift-common +++ b/drift-common @@ -1 +1 @@ -Subproject commit 9bf959130557e057557f689cb8ba7511553233ee +Subproject commit e1df3746ced59bff48ed1f17ffa426d69500bc56 From 2602b0f759109b790e93eb9f6de98c5b945e8c2b Mon Sep 17 00:00:00 2001 From: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 20 Mar 2025 21:08:14 +0000 Subject: [PATCH 03/19] Bumping drift-common to 690448bfed57f867778a36ea23be20e25cd8a3d5 --- drift-common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drift-common b/drift-common index e1df374..690448b 160000 --- a/drift-common +++ b/drift-common @@ -1 +1 @@ -Subproject commit e1df3746ced59bff48ed1f17ffa426d69500bc56 +Subproject commit 690448bfed57f867778a36ea23be20e25cd8a3d5 From 8807085e3defa3dca8146e2e13d98665eac9c9af Mon Sep 17 00:00:00 2001 From: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 21 Mar 2025 00:04:43 +0000 Subject: [PATCH 04/19] Bumping drift-common to 41d053d5f17f97d4c22d4aae3246a056a33d2124 --- drift-common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drift-common b/drift-common index 690448b..41d053d 160000 --- a/drift-common +++ b/drift-common @@ -1 +1 @@ -Subproject commit 690448bfed57f867778a36ea23be20e25cd8a3d5 +Subproject commit 41d053d5f17f97d4c22d4aae3246a056a33d2124 From 6b042ab1945d55476f5ba153ad4588bfd50ad193 Mon Sep 17 00:00:00 2001 From: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 21 Mar 2025 23:30:32 +0000 Subject: [PATCH 05/19] Bumping drift-common to 715c167a6bef769618afe03af1885accb57cc789 --- drift-common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drift-common b/drift-common index 41d053d..715c167 160000 --- a/drift-common +++ b/drift-common @@ -1 +1 @@ -Subproject commit 41d053d5f17f97d4c22d4aae3246a056a33d2124 +Subproject commit 715c167a6bef769618afe03af1885accb57cc789 From 319a07e0ce63872f6e29176168108e7caa6d521c Mon Sep 17 00:00:00 2001 From: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 24 Mar 2025 18:47:52 +0000 Subject: [PATCH 06/19] Bumping drift-common to 86769f3423a814be45022136c91167d857882d6f --- drift-common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drift-common b/drift-common index 715c167..86769f3 160000 --- a/drift-common +++ b/drift-common @@ -1 +1 @@ -Subproject commit 715c167a6bef769618afe03af1885accb57cc789 +Subproject commit 86769f3423a814be45022136c91167d857882d6f From 725b445e3cbf90dd2a6098b2a6cb9be2501dd769 Mon Sep 17 00:00:00 2001 From: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 25 Mar 2025 18:27:43 +0000 Subject: [PATCH 07/19] Bumping drift-common to 119189554847738f086ee81506ba13e991e1b1d7 --- drift-common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drift-common b/drift-common index 86769f3..1191895 160000 --- a/drift-common +++ b/drift-common @@ -1 +1 @@ -Subproject commit 86769f3423a814be45022136c91167d857882d6f +Subproject commit 119189554847738f086ee81506ba13e991e1b1d7 From 7d9b43d93bc182d41b8fdd9f144e91d15ad70ac8 Mon Sep 17 00:00:00 2001 From: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 26 Mar 2025 05:48:27 +0000 Subject: [PATCH 08/19] Bumping drift-common to 23e588566194f3a8d215b6729274f3cfddaa580c --- drift-common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drift-common b/drift-common index 1191895..23e5885 160000 --- a/drift-common +++ b/drift-common @@ -1 +1 @@ -Subproject commit 119189554847738f086ee81506ba13e991e1b1d7 +Subproject commit 23e588566194f3a8d215b6729274f3cfddaa580c From 5ed35f06901e1b83756442b99bbf00b4bf8e7559 Mon Sep 17 00:00:00 2001 From: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 26 Mar 2025 05:50:45 +0000 Subject: [PATCH 09/19] Bumping drift-common to 82007002f05f2d7f623d5be710cfb220d29cbfe1 --- drift-common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drift-common b/drift-common index 23e5885..8200700 160000 --- a/drift-common +++ b/drift-common @@ -1 +1 @@ -Subproject commit 23e588566194f3a8d215b6729274f3cfddaa580c +Subproject commit 82007002f05f2d7f623d5be710cfb220d29cbfe1 From a7b27cdac238b34dc6ee95cfff4186083d060c6b Mon Sep 17 00:00:00 2001 From: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 26 Mar 2025 11:56:51 +0000 Subject: [PATCH 10/19] Bumping drift-common to 9cfcc6639c5736682377263b7a93f02a6187d88f --- drift-common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drift-common b/drift-common index 8200700..9cfcc66 160000 --- a/drift-common +++ b/drift-common @@ -1 +1 @@ -Subproject commit 82007002f05f2d7f623d5be710cfb220d29cbfe1 +Subproject commit 9cfcc6639c5736682377263b7a93f02a6187d88f From a44c35cc7bd526df0be6799b2d2de8ba4a2dafeb Mon Sep 17 00:00:00 2001 From: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 26 Mar 2025 12:03:39 +0000 Subject: [PATCH 11/19] Bumping drift-common to ac8d68d4b4d95f6db0ec3a436473669a20b3939b --- drift-common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drift-common b/drift-common index 9cfcc66..ac8d68d 160000 --- a/drift-common +++ b/drift-common @@ -1 +1 @@ -Subproject commit 9cfcc6639c5736682377263b7a93f02a6187d88f +Subproject commit ac8d68d4b4d95f6db0ec3a436473669a20b3939b From fc02ad710da2cab3355740b80676b700687ef308 Mon Sep 17 00:00:00 2001 From: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 26 Mar 2025 12:06:31 +0000 Subject: [PATCH 12/19] Bumping drift-common to 5e633221240771fc0e93f1f9bb8f9a9bed5342b4 --- drift-common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drift-common b/drift-common index ac8d68d..5e63322 160000 --- a/drift-common +++ b/drift-common @@ -1 +1 @@ -Subproject commit ac8d68d4b4d95f6db0ec3a436473669a20b3939b +Subproject commit 5e633221240771fc0e93f1f9bb8f9a9bed5342b4 From 5f1a057b0180919c2cc9b229210e4caec85656af Mon Sep 17 00:00:00 2001 From: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 26 Mar 2025 13:18:08 +0000 Subject: [PATCH 13/19] Bumping drift-common to bc3a4e633a7fa5f918f33e952b084583c6ad7d36 --- drift-common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drift-common b/drift-common index 5e63322..bc3a4e6 160000 --- a/drift-common +++ b/drift-common @@ -1 +1 @@ -Subproject commit 5e633221240771fc0e93f1f9bb8f9a9bed5342b4 +Subproject commit bc3a4e633a7fa5f918f33e952b084583c6ad7d36 From f8c0165e4619de75d1e7e05d094e4acca84229d0 Mon Sep 17 00:00:00 2001 From: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 26 Mar 2025 14:49:16 +0000 Subject: [PATCH 14/19] Bumping drift-common to 3dde75cae3ec5335385fba19d652b4de7323ff0a --- drift-common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drift-common b/drift-common index bc3a4e6..3dde75c 160000 --- a/drift-common +++ b/drift-common @@ -1 +1 @@ -Subproject commit bc3a4e633a7fa5f918f33e952b084583c6ad7d36 +Subproject commit 3dde75cae3ec5335385fba19d652b4de7323ff0a From 6475c5f9674fbf56a9fc5f11ccdad04e0b645736 Mon Sep 17 00:00:00 2001 From: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 26 Mar 2025 15:00:18 +0000 Subject: [PATCH 15/19] Bumping drift-common to 929516c9481bc11fdca8975427f27c760b20ba56 --- drift-common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drift-common b/drift-common index 3dde75c..929516c 160000 --- a/drift-common +++ b/drift-common @@ -1 +1 @@ -Subproject commit 3dde75cae3ec5335385fba19d652b4de7323ff0a +Subproject commit 929516c9481bc11fdca8975427f27c760b20ba56 From 1d92c47a8d98bdb9d9431a41fe24b289267420f4 Mon Sep 17 00:00:00 2001 From: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 27 Mar 2025 15:14:13 +0000 Subject: [PATCH 16/19] Bumping drift-common to df5696943ef79a2f4da4976352dd081b26645ac5 --- drift-common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drift-common b/drift-common index 929516c..df56969 160000 --- a/drift-common +++ b/drift-common @@ -1 +1 @@ -Subproject commit 929516c9481bc11fdca8975427f27c760b20ba56 +Subproject commit df5696943ef79a2f4da4976352dd081b26645ac5 From 8a9225d0c3983daca7c89441b34d40500c176ba4 Mon Sep 17 00:00:00 2001 From: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 27 Mar 2025 15:45:45 +0000 Subject: [PATCH 17/19] Bumping drift-common to b1fb140165a16a34651618dec745e11a52a6d3d9 --- drift-common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drift-common b/drift-common index df56969..b1fb140 160000 --- a/drift-common +++ b/drift-common @@ -1 +1 @@ -Subproject commit df5696943ef79a2f4da4976352dd081b26645ac5 +Subproject commit b1fb140165a16a34651618dec745e11a52a6d3d9 From f0bcb14aa0e53d6782b2b7cfa6a0ef8ca1e665bc Mon Sep 17 00:00:00 2001 From: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 27 Mar 2025 16:08:07 +0000 Subject: [PATCH 18/19] Bumping drift-common to fa3ecbecb1d40d6d56b7c0e5b5ae784c1e951fac --- drift-common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drift-common b/drift-common index b1fb140..fa3ecbe 160000 --- a/drift-common +++ b/drift-common @@ -1 +1 @@ -Subproject commit b1fb140165a16a34651618dec745e11a52a6d3d9 +Subproject commit fa3ecbecb1d40d6d56b7c0e5b5ae784c1e951fac From 0690be72bd63e6d97f60c4aad535f51661cd9234 Mon Sep 17 00:00:00 2001 From: lowkeynicc <85139158+lowkeynicc@users.noreply.github.com> Date: Thu, 27 Mar 2025 12:22:54 -0400 Subject: [PATCH 19/19] Nick/fix topmakers error (#362) * add fallback account fetch to topMakers * remove accidental inclusion --- src/index.ts | 3 ++- src/utils/utils.ts | 16 +++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 9b8a137..37f3acb 100644 --- a/src/index.ts +++ b/src/index.ts @@ -410,7 +410,8 @@ const main = async (): Promise => { if (accountFlag) { const topAccounts = await getRawAccountFromId( userMapClient, - topMakers + topMakers, + driftClient.connection ); res.end(JSON.stringify(topAccounts)); return; diff --git a/src/utils/utils.ts b/src/utils/utils.ts index 7aa2ab8..329a95c 100644 --- a/src/utils/utils.ts +++ b/src/utils/utils.ts @@ -18,6 +18,7 @@ import { RedisClient } from '@drift/common/clients'; import { logger } from './logger'; import { NextFunction, Request, Response } from 'express'; import FEATURE_FLAGS from './featureFlags'; +import { Connection } from '@solana/web3.js'; export const l2WithBNToStrings = (l2: L2OrderBook): any => { for (const key of Object.keys(l2)) { @@ -380,7 +381,8 @@ export const getAccountFromId = async ( export const getRawAccountFromId = async ( userMapClient: RedisClient, - topMakers: string[] + topMakers: string[], + connection: Connection ): Promise< { userAccountPubKey: string; @@ -395,7 +397,19 @@ export const getRawAccountFromId = async ( userAccountPubKey, accountBase64: userAccountEncoded.split('::')[1], }; + } else { + // user is not in the userMap, try to fetch from the connection + const account = await connection.getAccountInfo( + new PublicKey(userAccountPubKey) + ); + if (account) { + return { + userAccountPubKey, + accountBase64: account.data.toString('base64'), + }; + } } + return { userAccountPubKey, accountBase64: null,