From 69530bfb4329c0af9a5f9f3663950c956a53230f Mon Sep 17 00:00:00 2001 From: Mark Grothe Date: Tue, 19 Dec 2023 11:13:48 -0600 Subject: [PATCH] fix: specify block number --- .../src/governance-v3/aave-token-v3/index.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/contract-helpers/src/governance-v3/aave-token-v3/index.ts b/packages/contract-helpers/src/governance-v3/aave-token-v3/index.ts index 48b76a4e..22f9bcca 100644 --- a/packages/contract-helpers/src/governance-v3/aave-token-v3/index.ts +++ b/packages/contract-helpers/src/governance-v3/aave-token-v3/index.ts @@ -18,10 +18,13 @@ export class AaveTokenV3Service { return this._contract.balanceOf(user); } - public async getPowerCurrent( + public async getPowerAt( + blockNumber: number, user: string, delegationType: GovernancePowerType, ) { - return this._contract.getPowerCurrent(user, delegationType); + return this._contract.functions.getPowerCurrent(user, delegationType, { + blockTag: blockNumber, + }); } }