From 946a3ca6112bef3283600640f4bc18af6428b606 Mon Sep 17 00:00:00 2001 From: Lor3mipsvm <52577544+Lor3mipsvm@users.noreply.github.com> Date: Fri, 17 Jan 2025 10:05:00 +0000 Subject: [PATCH 1/8] added sei / base / avax factory contracts --- projects/gyroscope/index.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/projects/gyroscope/index.js b/projects/gyroscope/index.js index 39e7a22c3d..d3fb38a433 100644 --- a/projects/gyroscope/index.js +++ b/projects/gyroscope/index.js @@ -65,6 +65,27 @@ const config = { fromBlock: 41209677, }, ], + base: [ + { + name: "Gyro E-CLP V2 Factory", + factory: "0x15e86be6084c6a5a8c17732d398dfbc2ec574cec", + fromBlock: 13035219, + }, + ], + sei: [ + { + name: "Gyro E-CLP V2 Factory", + factory: "0xB438ea246cefA9241305aD62E5D307D014baF7Fa", + fromBlock: 117480059, + }, + ], + avax: [ + { + name: "Gyro E-CLP V2 Factory", + factory: "0x41E9ac0bfed353c2dE21a980dA0EbB8A464D946A", + fromBlock: 50484541, + }, + ], optimism: [ { name: "Gyro E-CLP V2 Factory", From 425c648ad9936bcca23f6d28cd6b9ca9a4c5a998 Mon Sep 17 00:00:00 2001 From: Lor3mipsvm <52577544+Lor3mipsvm@users.noreply.github.com> Date: Fri, 17 Jan 2025 10:13:21 +0000 Subject: [PATCH 2/8] adding avalanche & base factory contracts (removed sei) --- projects/gyroscope/index.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/projects/gyroscope/index.js b/projects/gyroscope/index.js index d3fb38a433..4620f3dba4 100644 --- a/projects/gyroscope/index.js +++ b/projects/gyroscope/index.js @@ -72,13 +72,6 @@ const config = { fromBlock: 13035219, }, ], - sei: [ - { - name: "Gyro E-CLP V2 Factory", - factory: "0xB438ea246cefA9241305aD62E5D307D014baF7Fa", - fromBlock: 117480059, - }, - ], avax: [ { name: "Gyro E-CLP V2 Factory", From 29e0a7635d0a7e3b6f5ef24b5c09872d87c89787 Mon Sep 17 00:00:00 2001 From: Lor3mipsvm <52577544+Lor3mipsvm@users.noreply.github.com> Date: Fri, 17 Jan 2025 10:30:30 +0000 Subject: [PATCH 3/8] adding sei back --- projects/gyroscope/index.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/projects/gyroscope/index.js b/projects/gyroscope/index.js index 4620f3dba4..1141ae918f 100644 --- a/projects/gyroscope/index.js +++ b/projects/gyroscope/index.js @@ -72,6 +72,13 @@ const config = { fromBlock: 13035219, }, ], + sei: [ + { + name: "Gyro E-CLP V2 Factory", + factory: "0xB438ea246cefA9241305aD62E5D307D014baF7Fa", + fromBlock: 117_480_059, + }, + ], avax: [ { name: "Gyro E-CLP V2 Factory", From c60358e66cc1875a4209ebfa5063ec27c7a17c3e Mon Sep 17 00:00:00 2001 From: Lor3mipsvm <52577544+Lor3mipsvm@users.noreply.github.com> Date: Fri, 17 Jan 2025 10:35:53 +0000 Subject: [PATCH 4/8] trying to add sei factory contract --- projects/gyroscope/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/projects/gyroscope/index.js b/projects/gyroscope/index.js index 1141ae918f..bebd528731 100644 --- a/projects/gyroscope/index.js +++ b/projects/gyroscope/index.js @@ -75,8 +75,7 @@ const config = { sei: [ { name: "Gyro E-CLP V2 Factory", - factory: "0xB438ea246cefA9241305aD62E5D307D014baF7Fa", - fromBlock: 117_480_059, + factory: "0xB438ea246cefA9241305aD62E5D307D014baF7Fa" }, ], avax: [ From 06538485ae9f9ed6580475ca4531c6b90414160d Mon Sep 17 00:00:00 2001 From: Lor3mipsvm <52577544+Lor3mipsvm@users.noreply.github.com> Date: Fri, 17 Jan 2025 10:49:20 +0000 Subject: [PATCH 5/8] diff Sei block height --- projects/gyroscope/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/gyroscope/index.js b/projects/gyroscope/index.js index bebd528731..94beb7df74 100644 --- a/projects/gyroscope/index.js +++ b/projects/gyroscope/index.js @@ -75,7 +75,8 @@ const config = { sei: [ { name: "Gyro E-CLP V2 Factory", - factory: "0xB438ea246cefA9241305aD62E5D307D014baF7Fa" + factory: "0xB438ea246cefA9241305aD62E5D307D014baF7Fa", + fromBlock: 113_999_999, }, ], avax: [ From a93c66cc659b6d74590321466c10cd148ea4590b Mon Sep 17 00:00:00 2001 From: Lor3mipsvm <52577544+Lor3mipsvm@users.noreply.github.com> Date: Fri, 17 Jan 2025 11:01:08 +0000 Subject: [PATCH 6/8] start closer to current block height --- projects/gyroscope/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/gyroscope/index.js b/projects/gyroscope/index.js index 94beb7df74..775f6682ed 100644 --- a/projects/gyroscope/index.js +++ b/projects/gyroscope/index.js @@ -76,7 +76,7 @@ const config = { { name: "Gyro E-CLP V2 Factory", factory: "0xB438ea246cefA9241305aD62E5D307D014baF7Fa", - fromBlock: 113_999_999, + fromBlock: 126_717_200, }, ], avax: [ From 627a9a0b46086c91ab9f61a2b8ceacd9ea6e85e7 Mon Sep 17 00:00:00 2001 From: Lor3mipsvm <52577544+Lor3mipsvm@users.noreply.github.com> Date: Fri, 17 Jan 2025 11:44:31 +0000 Subject: [PATCH 7/8] custom rpc for sei --- projects/gyroscope/index.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/projects/gyroscope/index.js b/projects/gyroscope/index.js index 775f6682ed..64ff6fd2fe 100644 --- a/projects/gyroscope/index.js +++ b/projects/gyroscope/index.js @@ -1,11 +1,12 @@ -const { getLogs } = require("../helper/cache/getLogs"); -module.exports.doublecounted = true; -const blacklistedTokens = [ - '0xe07f9d810a48ab5c3c914ba3ca53af14e4491e8a', // GYD ethereum -] +const Web3 = require("web3"); +const { getLogs } = require("../helper/cache/getLogs");module.exports.doublecounted = true; +const blacklistedTokens = ["0xe07f9d810a48ab5c3c914ba3ca53af14e4491e8a", // GYD ethereum] +const rpcUrls = {sei: "https://still-clean-morning.sei-pacific.quiknode.pro/414cfbb55c44ed3ba548d8a68dfb59cdf72a4775",}; async function tvl(api) { - const pools = config[api.chain]; + if (api.chain === "sei") { + api.web3 = new Web3(rpcUrls.sei); + } const promises = pools.map(async ({ factory, fromBlock }) => { const logs = await getLogs({ From 7d23660b8690cc403e69541a4bf5475b2205e0c1 Mon Sep 17 00:00:00 2001 From: Lor3mipsvm <52577544+Lor3mipsvm@users.noreply.github.com> Date: Fri, 17 Jan 2025 11:46:33 +0000 Subject: [PATCH 8/8] Update index.js --- projects/gyroscope/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/projects/gyroscope/index.js b/projects/gyroscope/index.js index 64ff6fd2fe..1bbd921f83 100644 --- a/projects/gyroscope/index.js +++ b/projects/gyroscope/index.js @@ -1,4 +1,3 @@ -const Web3 = require("web3"); const { getLogs } = require("../helper/cache/getLogs");module.exports.doublecounted = true; const blacklistedTokens = ["0xe07f9d810a48ab5c3c914ba3ca53af14e4491e8a", // GYD ethereum] const rpcUrls = {sei: "https://still-clean-morning.sei-pacific.quiknode.pro/414cfbb55c44ed3ba548d8a68dfb59cdf72a4775",};