From a4f8dfb7a85b946a95d7ac5db09fa3fe5dd28c4d Mon Sep 17 00:00:00 2001 From: LHerskind <16536249+LHerskind@users.noreply.github.com> Date: Wed, 26 Mar 2025 13:03:43 +0000 Subject: [PATCH] chore: fix governance util issue --- spartan/bootstrap.sh | 8 ++++---- yarn-project/cli/src/cmds/l1/governance_utils.ts | 2 +- yarn-project/ethereum/src/contracts/fee_juice.ts | 14 ++++++++++++-- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/spartan/bootstrap.sh b/spartan/bootstrap.sh index 7efa8da676d9..6a9ec63a2ddb 100755 --- a/spartan/bootstrap.sh +++ b/spartan/bootstrap.sh @@ -56,14 +56,14 @@ function test_cmds { # Note: commands that start with 'timeout ...' override the default timeout. # TODO figure out why these take long sometimes. echo "$hash timeout -v 20m ./spartan/bootstrap.sh test-kind-smoke" - # if [ "$CI_FULL" -eq 1 ]; then + if [ "$CI_FULL" -eq 1 ]; then # echo "$hash timeout -v 20m ./spartan/bootstrap.sh test-kind-transfer" # TODO(#12791) re-enable # echo "$hash timeout -v 30m ./spartan/bootstrap.sh test-kind-4epochs" # echo "$hash timeout -v 30m ./spartan/bootstrap.sh test-kind-upgrade-rollup-version" # echo "$hash timeout -v 30m ./spartan/bootstrap.sh test-prod-deployment" - # echo "$hash timeout -v 30m ./spartan/bootstrap.sh test-cli-upgrade-with-lock" - # fi + echo "$hash timeout -v 30m ./spartan/bootstrap.sh test-cli-upgrade-with-lock" + fi if [ "$CI_NIGHTLY" -eq 1 ]; then echo "$hash timeout -v 50m ./spartan/bootstrap.sh test-kind-4epochs-sepolia" @@ -155,7 +155,7 @@ case "$cmd" in FRESH_INSTALL=false INSTALL_METRICS=false ./scripts/test_prod_deployment.sh ;; "test-cli-upgrade-with-lock") - OVERRIDES="telemetry.enabled=false" \ + OVERRIDES="telemetry.enabled=false,network.setupL2Contracts=false" \ FRESH_INSTALL=${FRESH_INSTALL:-true} INSTALL_METRICS=false \ ./scripts/test_kind.sh src/spartan/upgrade_via_cli.test.ts 1-validators.yaml upgrade-via-cli${NAME_POSTFIX:-} ;; diff --git a/yarn-project/cli/src/cmds/l1/governance_utils.ts b/yarn-project/cli/src/cmds/l1/governance_utils.ts index 5ed2ff4875cd..f681c75e1cbb 100644 --- a/yarn-project/cli/src/cmds/l1/governance_utils.ts +++ b/yarn-project/cli/src/cmds/l1/governance_utils.ts @@ -42,7 +42,7 @@ export async function depositGovernanceTokens({ const addresses = await RegistryContract.collectAddresses(publicClient, registryAddress, 'canonical'); const governanceAddress = addresses.governanceAddress.toString(); - const tokenAddress = addresses.feeJuiceAddress.toString(); + const tokenAddress = addresses.stakingAssetAddress.toString(); const feeJuice = new FeeJuiceContract(tokenAddress, publicClient, walletClient); const governance = new GovernanceContract(governanceAddress, publicClient, walletClient); diff --git a/yarn-project/ethereum/src/contracts/fee_juice.ts b/yarn-project/ethereum/src/contracts/fee_juice.ts index da6820f2883a..a74c80f62962 100644 --- a/yarn-project/ethereum/src/contracts/fee_juice.ts +++ b/yarn-project/ethereum/src/contracts/fee_juice.ts @@ -32,12 +32,22 @@ export class FeeJuiceContract { public async mint(to: Hex, amount: bigint) { const walletFeeJuice = this.assertWalletFeeJuice(); const tx = await walletFeeJuice.write.mint([to, amount]); - await this.publicClient.waitForTransactionReceipt({ hash: tx }); + const receipt = await this.publicClient.waitForTransactionReceipt({ hash: tx }); + + if (receipt.status === 'success') { + return; + } + throw new Error('Mint failed'); } public async approve(spender: Hex, amount: bigint) { const walletFeeJuice = this.assertWalletFeeJuice(); const tx = await walletFeeJuice.write.approve([spender, amount]); - await this.publicClient.waitForTransactionReceipt({ hash: tx }); + const receipt = await this.publicClient.waitForTransactionReceipt({ hash: tx }); + + if (receipt.status === 'success') { + return; + } + throw new Error('Approve failed'); } }