From 6841d6588bf5492b0e8b29a2c3d042ea1732874e Mon Sep 17 00:00:00 2001 From: GarmashAlex Date: Wed, 20 Aug 2025 17:51:05 +0300 Subject: [PATCH] Await account2.getAddress() in fees script for correct address resolution --- scripts/fees.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/fees.ts b/scripts/fees.ts index 6832bc2..4936557 100644 --- a/scripts/fees.ts +++ b/scripts/fees.ts @@ -46,7 +46,7 @@ async function main() { let salt = Fr.random(); let account2 = await getSchnorrAccount(pxe, secretKey, deriveSigningKey(secretKey), salt); const wallet2 = await account2.getWallet(); - const feeJuiceRecipient = account2.getAddress(); + const feeJuiceRecipient = await account2.getAddress(); // Setup and bridge fee asset to L2 to get fee juice @@ -74,12 +74,12 @@ async function main() { const claimAndPay = new FeeJuicePaymentMethodWithClaim(wallet2, claim) await account2.deploy({ fee: { paymentMethod: claimAndPay } }).wait() - logger.info(`New account at ${account2.getAddress()} deployed using claimed funds for fees.`) + logger.info(`New account at ${await account2.getAddress()} deployed using claimed funds for fees.`) // Pay fees yourself // Create a new voting contract instance, interacting from the newWallet - const useFeeJuice = new FeeJuicePaymentMethod(account2.getAddress()) + const useFeeJuice = new FeeJuicePaymentMethod(await account2.getAddress()) await votingContract.withWallet(wallet2).methods.cast_vote(wallet1.getAddress()).send({ fee: { paymentMethod: useFeeJuice } }).wait() logger.info(`Vote cast from new account, paying fees via newWallet.`)