From ac3afb86e1a4e9e2b108fc4c0401e59cf5e3dcad Mon Sep 17 00:00:00 2001 From: Vladan Thales Date: Mon, 2 Dec 2024 20:35:54 +0100 Subject: [PATCH 1/5] Change Base subgraph URL for Thales strategy From 5156c0236449c67013198ea0ae501f246089c580 Mon Sep 17 00:00:00 2001 From: Vladan Thales <78506565+vladanthales@users.noreply.github.com> Date: Tue, 3 Dec 2024 08:07:57 +0100 Subject: [PATCH 2/5] Update src/strategies/thales/index.ts Co-authored-by: Chaitanya From 52097a5b87e76d5e562d3c71aa5a682ed54b49e3 Mon Sep 17 00:00:00 2001 From: Vladan Thales Date: Wed, 25 Jun 2025 13:49:42 +0200 Subject: [PATCH 3/5] Overtime strategy From 5225e7815c2c4addb33a676576d4a039634e450d Mon Sep 17 00:00:00 2001 From: Vladan Thales Date: Thu, 26 Jun 2025 11:22:16 +0200 Subject: [PATCH 4/5] Remove resetting smartAccount voting power From 84b6d11917fb5765e4bb1e7980d40ff3e6e92ee6 Mon Sep 17 00:00:00 2001 From: Vladan Thales Date: Thu, 26 Jun 2025 14:36:31 +0200 Subject: [PATCH 5/5] Pass smart account addresses the base strategy along with the initial addresses --- src/strategies/overtime/examples.json | 1 - src/strategies/overtime/index.ts | 30 ++++++++++++++++++--------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/src/strategies/overtime/examples.json b/src/strategies/overtime/examples.json index 474db78c7..f3c0696d3 100644 --- a/src/strategies/overtime/examples.json +++ b/src/strategies/overtime/examples.json @@ -13,7 +13,6 @@ "network": "10", "addresses": [ "0x9f8e4ee788D9b00A3409584E18034aA7B736C396", - "0x3e09230ed70b667256BBaf1FDf949050D312D066", "0x7d2824F1825da25072011B3e326025172E404b15", "0x3320EE0189aAD77b3aB570a00464Ce7a45B6E465", "0x28b2Be30b0AE526aF0cB94984B750d4C35e913c0", diff --git a/src/strategies/overtime/index.ts b/src/strategies/overtime/index.ts index b67377f7d..5741fcf14 100644 --- a/src/strategies/overtime/index.ts +++ b/src/strategies/overtime/index.ts @@ -2,7 +2,7 @@ import { customFetch } from '../../utils'; import { strategy as erc20BalanceOfStrategy } from '../erc20-balance-of'; export const author = 'thales-markets'; -export const version = '1.0.0'; +export const version = '1.0.1'; export async function strategy( space, @@ -12,15 +12,6 @@ export async function strategy( options, snapshot ): Promise> { - const scores = await erc20BalanceOfStrategy( - space, - network, - provider, - addresses, - options, - snapshot - ); - const response = await customFetch(options.eoaToSmartAccountMapApi, { method: 'GET', headers: { @@ -30,6 +21,25 @@ export async function strategy( }); const eoaToSmartAccountMapping = await response.json(); + // Build a list of smart account addresses, and pass it to the base strategy along with the initial addresses. + const smartAccountAddresses: string[] = []; + for (let i = 0; i < addresses.length; i++) { + const address = addresses[i]; + const smartAccount = eoaToSmartAccountMapping[address]; + if (smartAccount !== undefined) { + smartAccountAddresses.push(smartAccount); + } + } + + const scores = await erc20BalanceOfStrategy( + space, + network, + provider, + [...addresses, ...smartAccountAddresses], + options, + snapshot + ); + for (let i = 0; i < Object.keys(scores).length; i++) { const address = Object.keys(scores)[i]; const smartAccount = eoaToSmartAccountMapping[address];