From 092ec07704e11b86e21bbc2fa251e1ceb2305a8c Mon Sep 17 00:00:00 2001 From: Layne Haber Date: Mon, 22 Apr 2024 14:57:29 -0600 Subject: [PATCH] fix: remove modified --- adapters/connext/output.csv | 86 +++++++++---------- adapters/connext/src/index.ts | 1 - .../connext/src/utils/getUserTvlByBlock.ts | 5 +- 3 files changed, 45 insertions(+), 47 deletions(-) diff --git a/adapters/connext/output.csv b/adapters/connext/output.csv index a73a78a8..687045c2 100644 --- a/adapters/connext/output.csv +++ b/adapters/connext/output.csv @@ -1,43 +1,43 @@ -timestamp,block_number,modified,user_address,token_address,token_balance,token_symbol,usd_price -1710677449,2954869,1710677449,0x04329901a291484bc461b3b61629389cd0a020df,0x331152ca43b50b39f3a9f203685b98dbb9b42342,443207340,,0 -1710677449,2954869,1710677449,0x04329901a291484bc461b3b61629389cd0a020df,0x176211869ca2b568f2a7d4ee941e073a821ee1ff,814754994,,0 -1709531117,2668299,1709531117,0x2ad41b63cf636c794c37293fb8b7613331774e1d,0x331152ca43b50b39f3a9f203685b98dbb9b42342,20276494,,0 -1709531117,2668299,1709531117,0x2ad41b63cf636c794c37293fb8b7613331774e1d,0x176211869ca2b568f2a7d4ee941e073a821ee1ff,37274596,,0 -1701338640,1022900,1701338640,0x2ba4b2effba90779ca446f2e60e7eef4a707d925,0x0573ad07ca4f74757e5b2417bf225bebebcf66d9,6412707606984819068,,0 -1701338640,1022900,1701338640,0x2ba4b2effba90779ca446f2e60e7eef4a707d925,0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f,7903490806226496263,,0 -1708984899,2531745,1708984899,0x2e47bbd27cf07be8b3c3e46a4f406fc60bb59335,0x331152ca43b50b39f3a9f203685b98dbb9b42342,180367480,,0 -1708984899,2531745,1708984899,0x2e47bbd27cf07be8b3c3e46a4f406fc60bb59335,0x176211869ca2b568f2a7d4ee941e073a821ee1ff,331572363,,0 -1710525538,2916886,1710525538,0x4df23313d32b33223d18e1f7437f269d92ed3dd6,0x331152ca43b50b39f3a9f203685b98dbb9b42342,0,,0 -1710525538,2916886,1710525538,0x4df23313d32b33223d18e1f7437f269d92ed3dd6,0x176211869ca2b568f2a7d4ee941e073a821ee1ff,0,,0 -1701459356,1037985,1701459356,0x5d527765252003acee6545416f6a9c8d15ae8402,0x331152ca43b50b39f3a9f203685b98dbb9b42342,14630271351,,0 -1701459356,1037985,1701459356,0x5d527765252003acee6545416f6a9c8d15ae8402,0x176211869ca2b568f2a7d4ee941e073a821ee1ff,26895056895,,0 -1710673621,2953912,1710673621,0x7231fef69df4648448805c28a79945dd30576372,0x331152ca43b50b39f3a9f203685b98dbb9b42342,362013023,,0 -1710673621,2953912,1710673621,0x7231fef69df4648448805c28a79945dd30576372,0x176211869ca2b568f2a7d4ee941e073a821ee1ff,665494208,,0 -1705588962,1713112,1705588962,0x73b6a7a6e39a2e405087164d7f407a0bd2c86dcc,0x0573ad07ca4f74757e5b2417bf225bebebcf66d9,2287916846119590,,0 -1705588962,1713112,1705588962,0x73b6a7a6e39a2e405087164d7f407a0bd2c86dcc,0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f,2819796389752923,,0 -1708013774,2288998,1708013774,0x7c8e34d9d5c1e2c40e8860c4511cc132ecb3fa8c,0x0573ad07ca4f74757e5b2417bf225bebebcf66d9,822858310881706,,0 -1708013774,2288998,1708013774,0x7c8e34d9d5c1e2c40e8860c4511cc132ecb3fa8c,0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f,1014150885001675,,0 -1706661478,1952553,1706661478,0x7ce49752ffa7055622f444df3c69598748cb2e5f,0x0573ad07ca4f74757e5b2417bf225bebebcf66d9,188,,0 -1706661478,1952553,1706661478,0x7ce49752ffa7055622f444df3c69598748cb2e5f,0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f,232,,0 -1709963126,2776301,1709963126,0x8d6e361347f7dd8f297a3396098dd4343f5bbb45,0x331152ca43b50b39f3a9f203685b98dbb9b42342,362008,,0 -1709963126,2776301,1709963126,0x8d6e361347f7dd8f297a3396098dd4343f5bbb45,0x176211869ca2b568f2a7d4ee941e073a821ee1ff,665486,,0 -1708956675,2524689,1708956675,0x998e4a86fc6352037b57f087e60ee816d4d25c16,0x331152ca43b50b39f3a9f203685b98dbb9b42342,7717105,,0 -1708956675,2524689,1708956675,0x998e4a86fc6352037b57f087e60ee816d4d25c16,0x176211869ca2b568f2a7d4ee941e073a821ee1ff,14186475,,0 -1700399991,905571,1700399991,0xade09131c6f43fe22c2cbabb759636c43cfc181e,0x0573ad07ca4f74757e5b2417bf225bebebcf66d9,18327466752782912,,0 -1700399991,905571,1700399991,0xade09131c6f43fe22c2cbabb759636c43cfc181e,0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f,22588113143388550,,0 -1700869352,964221,1700869352,0xade09131c6f43fe22c2cbabb759636c43cfc181e,0xbd7eaed30936670c931b718f5d9014aff82fc767,5392584951,,0 -1700869352,964221,1700869352,0xade09131c6f43fe22c2cbabb759636c43cfc181e,0xa219439258ca9da29e9cc4ce5596924745e12b93,5078946075,,0 -1701161360,1000729,1701161360,0xade09131c6f43fe22c2cbabb759636c43cfc181e,0x331152ca43b50b39f3a9f203685b98dbb9b42342,81460274,,0 -1701161360,1000729,1701161360,0xade09131c6f43fe22c2cbabb759636c43cfc181e,0x176211869ca2b568f2a7d4ee941e073a821ee1ff,149749697,,0 -1710419642,2890430,1710419642,0xd84076087f8045dcfb78443930423fc366bd79a7,0x0573ad07ca4f74757e5b2417bf225bebebcf66d9,39,,0 -1710419642,2890430,1710419642,0xd84076087f8045dcfb78443930423fc366bd79a7,0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f,49,,0 -1708902223,2511076,1708902223,0xe0c46719ed5c9d8b2f2f69652a72304aabddd756,0xbd7eaed30936670c931b718f5d9014aff82fc767,0,,0 -1708902223,2511076,1708902223,0xe0c46719ed5c9d8b2f2f69652a72304aabddd756,0xa219439258ca9da29e9cc4ce5596924745e12b93,0,,0 -1710669965,2952998,1710669965,0xe5cec7bb5e90ed2548414d49ceb5e5d89f847295,0x331152ca43b50b39f3a9f203685b98dbb9b42342,263169195,,0 -1710669965,2952998,1710669965,0xe5cec7bb5e90ed2548414d49ceb5e5d89f847295,0x176211869ca2b568f2a7d4ee941e073a821ee1ff,483788051,,0 -1710390126,2883051,1710390126,0xe603b396503f312f61be2851f4c1b8783d7c1ea6,0x0573ad07ca4f74757e5b2417bf225bebebcf66d9,227008422904655922470,,0 -1710390126,2883051,1710390126,0xe603b396503f312f61be2851f4c1b8783d7c1ea6,0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f,279781816561961922289,,0 -1702256219,1157826,1702256219,0xfa53b8cca72c61794ebac3d54b54554aa0f4229d,0xbd7eaed30936670c931b718f5d9014aff82fc767,156427738,,0 -1702256219,1157826,1702256219,0xfa53b8cca72c61794ebac3d54b54554aa0f4229d,0xa219439258ca9da29e9cc4ce5596924745e12b93,147329722,,0 -1710350530,2873152,1710350530,0xfd9da5905ff0eaf8e7748fd3efab9a2404ad798b,0x331152ca43b50b39f3a9f203685b98dbb9b42342,1082608280,,0 -1710350530,2873152,1710350530,0xfd9da5905ff0eaf8e7748fd3efab9a2404ad798b,0x176211869ca2b568f2a7d4ee941e073a821ee1ff,1990175752,,0 \ No newline at end of file +timestamp,block_number,user_address,token_address,token_balance,token_symbol,usd_price +1710677449,2954869,0x04329901a291484bc461b3b61629389cd0a020df,0x331152ca43b50b39f3a9f203685b98dbb9b42342,643720681,,0 +1710677449,2954869,0x04329901a291484bc461b3b61629389cd0a020df,0x176211869ca2b568f2a7d4ee941e073a821ee1ff,617056079,,0 +1709531117,2668299,0x2ad41b63cf636c794c37293fb8b7613331774e1d,0x331152ca43b50b39f3a9f203685b98dbb9b42342,29449870,,0 +1709531117,2668299,0x2ad41b63cf636c794c37293fb8b7613331774e1d,0x176211869ca2b568f2a7d4ee941e073a821ee1ff,28229979,,0 +1701338640,1022900,0x2ba4b2effba90779ca446f2e60e7eef4a707d925,0x0573ad07ca4f74757e5b2417bf225bebebcf66d9,6297238969206360482,,0 +1701338640,1022900,0x2ba4b2effba90779ca446f2e60e7eef4a707d925,0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f,8055090313880131281,,0 +1708984899,2531745,0x2e47bbd27cf07be8b3c3e46a4f406fc60bb59335,0x331152ca43b50b39f3a9f203685b98dbb9b42342,261968308,,0 +1708984899,2531745,0x2e47bbd27cf07be8b3c3e46a4f406fc60bb59335,0x176211869ca2b568f2a7d4ee941e073a821ee1ff,251116893,,0 +1710525538,2916886,0x4df23313d32b33223d18e1f7437f269d92ed3dd6,0x331152ca43b50b39f3a9f203685b98dbb9b42342,0,,0 +1710525538,2916886,0x4df23313d32b33223d18e1f7437f269d92ed3dd6,0x176211869ca2b568f2a7d4ee941e073a821ee1ff,0,,0 +1701459356,1037985,0x5d527765252003acee6545416f6a9c8d15ae8402,0x331152ca43b50b39f3a9f203685b98dbb9b42342,21249215373,,0 +1701459356,1037985,0x5d527765252003acee6545416f6a9c8d15ae8402,0x176211869ca2b568f2a7d4ee941e073a821ee1ff,20369017042,,0 +1710673621,2953912,0x7231fef69df4648448805c28a79945dd30576372,0x331152ca43b50b39f3a9f203685b98dbb9b42342,525792892,,0 +1710673621,2953912,0x7231fef69df4648448805c28a79945dd30576372,0x176211869ca2b568f2a7d4ee941e073a821ee1ff,504013169,,0 +1705588962,1713112,0x73b6a7a6e39a2e405087164d7f407a0bd2c86dcc,0x0573ad07ca4f74757e5b2417bf225bebebcf66d9,2246720107119037,,0 +1705588962,1713112,0x73b6a7a6e39a2e405087164d7f407a0bd2c86dcc,0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f,2873883849946243,,0 +1708013774,2288998,0x7c8e34d9d5c1e2c40e8860c4511cc132ecb3fa8c,0x0573ad07ca4f74757e5b2417bf225bebebcf66d9,808041741334904,,0 +1708013774,2288998,0x7c8e34d9d5c1e2c40e8860c4511cc132ecb3fa8c,0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f,1033603653230573,,0 +1706661478,1952553,0x7ce49752ffa7055622f444df3c69598748cb2e5f,0x0573ad07ca4f74757e5b2417bf225bebebcf66d9,185,,0 +1706661478,1952553,0x7ce49752ffa7055622f444df3c69598748cb2e5f,0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f,237,,0 +1709963126,2776301,0x8d6e361347f7dd8f297a3396098dd4343f5bbb45,0x331152ca43b50b39f3a9f203685b98dbb9b42342,525786,,0 +1709963126,2776301,0x8d6e361347f7dd8f297a3396098dd4343f5bbb45,0x176211869ca2b568f2a7d4ee941e073a821ee1ff,504007,,0 +1708956675,2524689,0x998e4a86fc6352037b57f087e60ee816d4d25c16,0x331152ca43b50b39f3a9f203685b98dbb9b42342,11208434,,0 +1708956675,2524689,0x998e4a86fc6352037b57f087e60ee816d4d25c16,0x176211869ca2b568f2a7d4ee941e073a821ee1ff,10744151,,0 +1700399991,905571,0xade09131c6f43fe22c2cbabb759636c43cfc181e,0x0573ad07ca4f74757e5b2417bf225bebebcf66d9,17997458314916701,,0 +1700399991,905571,0xade09131c6f43fe22c2cbabb759636c43cfc181e,0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f,23021383316697861,,0 +1700869352,964221,0xade09131c6f43fe22c2cbabb759636c43cfc181e,0xbd7eaed30936670c931b718f5d9014aff82fc767,4553332823,,0 +1700869352,964221,0xade09131c6f43fe22c2cbabb759636c43cfc181e,0xa219439258ca9da29e9cc4ce5596924745e12b93,5963992143,,0 +1701161360,1000729,0xade09131c6f43fe22c2cbabb759636c43cfc181e,0x331152ca43b50b39f3a9f203685b98dbb9b42342,118314067,,0 +1701161360,1000729,0xade09131c6f43fe22c2cbabb759636c43cfc181e,0x176211869ca2b568f2a7d4ee941e073a821ee1ff,113413187,,0 +1710419642,2890430,0xd84076087f8045dcfb78443930423fc366bd79a7,0x0573ad07ca4f74757e5b2417bf225bebebcf66d9,39,,0 +1710419642,2890430,0xd84076087f8045dcfb78443930423fc366bd79a7,0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f,50,,0 +1708902223,2511076,0xe0c46719ed5c9d8b2f2f69652a72304aabddd756,0xbd7eaed30936670c931b718f5d9014aff82fc767,0,,0 +1708902223,2511076,0xe0c46719ed5c9d8b2f2f69652a72304aabddd756,0xa219439258ca9da29e9cc4ce5596924745e12b93,0,,0 +1710669965,2952998,0xe5cec7bb5e90ed2548414d49ceb5e5d89f847295,0x331152ca43b50b39f3a9f203685b98dbb9b42342,382230703,,0 +1710669965,2952998,0xe5cec7bb5e90ed2548414d49ceb5e5d89f847295,0x176211869ca2b568f2a7d4ee941e073a821ee1ff,366397703,,0 +1710390126,2883051,0xe603b396503f312f61be2851f4c1b8783d7c1ea6,0x0573ad07ca4f74757e5b2417bf225bebebcf66d9,222920858811060580510,,0 +1710390126,2883051,0xe603b396503f312f61be2851f4c1b8783d7c1ea6,0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f,285148405412526284280,,0 +1702256219,1157826,0xfa53b8cca72c61794ebac3d54b54554aa0f4229d,0xbd7eaed30936670c931b718f5d9014aff82fc767,132082769,,0 +1702256219,1157826,0xfa53b8cca72c61794ebac3d54b54554aa0f4229d,0xa219439258ca9da29e9cc4ce5596924745e12b93,173003079,,0 +1710350530,2873152,0xfd9da5905ff0eaf8e7748fd3efab9a2404ad798b,0x331152ca43b50b39f3a9f203685b98dbb9b42342,1572395751,,0 +1710350530,2873152,0xfd9da5905ff0eaf8e7748fd3efab9a2404ad798b,0x176211869ca2b568f2a7d4ee941e073a821ee1ff,1507262987,,0 \ No newline at end of file diff --git a/adapters/connext/src/index.ts b/adapters/connext/src/index.ts index 383f995e..49ae63f0 100644 --- a/adapters/connext/src/index.ts +++ b/adapters/connext/src/index.ts @@ -1,5 +1,4 @@ import { getUserTVLByBlock, writeCsv } from "./utils"; -import { getPoolInformationFromLpToken } from "./utils/cartographer"; const input = { blockNumber: 2954869, diff --git a/adapters/connext/src/utils/getUserTvlByBlock.ts b/adapters/connext/src/utils/getUserTvlByBlock.ts index fad6199d..e8b5fd55 100644 --- a/adapters/connext/src/utils/getUserTvlByBlock.ts +++ b/adapters/connext/src/utils/getUserTvlByBlock.ts @@ -1,4 +1,3 @@ -import { parseUnits } from "viem"; import { getCompositeBalances, getLpAccountBalanceAtBlock } from "./subgraph"; import { BlockData, OutputDataSchemaRow } from "./types"; @@ -14,16 +13,16 @@ export const getUserTVLByBlock = async (blocks: BlockData): Promise { results.push(...underlyingBalances.map((b, i) => { - return { + const formatted: OutputDataSchemaRow = { timestamp: +modified, block_number: +block, - modified, user_address: account.id, token_address: underlyingTokens[i], token_balance: BigInt(b), token_symbol: "", usd_price: 0, } + return formatted; })); })