From 96a7fc7c4b5556d32d7619b287a9af5a4c0099d5 Mon Sep 17 00:00:00 2001 From: LHerskind Date: Tue, 22 Oct 2024 11:27:44 +0000 Subject: [PATCH] chore: address comments --- .../scripts/native-network/deploy-l1-contracts.sh | 9 +++++++++ yarn-project/end-to-end/src/e2e_p2p/gerousia.test.ts | 1 + yarn-project/sequencer-client/src/publisher/utils.ts | 11 +++-------- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/yarn-project/end-to-end/scripts/native-network/deploy-l1-contracts.sh b/yarn-project/end-to-end/scripts/native-network/deploy-l1-contracts.sh index 413b30d1b252..4ee84d7f3914 100755 --- a/yarn-project/end-to-end/scripts/native-network/deploy-l1-contracts.sh +++ b/yarn-project/end-to-end/scripts/native-network/deploy-l1-contracts.sh @@ -43,6 +43,11 @@ INBOX_CONTRACT_ADDRESS=$(echo "$output" | grep -oP 'L1 -> L2 Inbox Address: \K0x OUTBOX_CONTRACT_ADDRESS=$(echo "$output" | grep -oP 'L2 -> L1 Outbox Address: \K0x[a-fA-F0-9]{40}') FEE_JUICE_CONTRACT_ADDRESS=$(echo "$output" | grep -oP 'Fee Juice Address: \K0x[a-fA-F0-9]{40}') FEE_JUICE_PORTAL_CONTRACT_ADDRESS=$(echo "$output" | grep -oP 'Fee Juice Portal Address: \K0x[a-fA-F0-9]{40}') +NOMISMATOKOPIO_CONTRACT_ADDRESS=$(echo "$output" | grep -oP 'Nomismatokopio Address: \K0x[a-fA-F0-9]{40}') +SYSSTIA_CONTRACT_ADDRESS=$(echo "$output" | grep -oP 'Sysstia Address: \K0x[a-fA-F0-9]{40}') +GEROUSIA_CONTRACT_ADDRESS=$(echo "$output" | grep -oP 'Gerousia Address: \K0x[a-fA-F0-9]{40}') +APELLA_CONTRACT_ADDRESS=$(echo "$output" | grep -oP 'Apella Address: \K0x[a-fA-F0-9]{40}') + # Save contract addresses to state/l1-contracts.env cat << EOCONFIG > $(git rev-parse --show-toplevel)/yarn-project/end-to-end/scripts/native-network/state/l1-contracts.env @@ -52,6 +57,10 @@ export INBOX_CONTRACT_ADDRESS=$INBOX_CONTRACT_ADDRESS export OUTBOX_CONTRACT_ADDRESS=$OUTBOX_CONTRACT_ADDRESS export FEE_JUICE_CONTRACT_ADDRESS=$FEE_JUICE_CONTRACT_ADDRESS export FEE_JUICE_PORTAL_CONTRACT_ADDRESS=$FEE_JUICE_PORTAL_CONTRACT_ADDRESS +export NOMISMATOKOPIO_CONTRACT_ADDRESS=$NOMISMATOKOPIO_CONTRACT_ADDRESS +export SYSSTIA_CONTRACT_ADDRESS=$SYSSTIA_CONTRACT_ADDRESS +export GEROUSIA_CONTRACT_ADDRESS=$GEROUSIA_CONTRACT_ADDRESS +export APELLA_CONTRACT_ADDRESS=$APELLA_CONTRACT_ADDRESS EOCONFIG echo "Contract addresses saved to state/l1-contracts.env" diff --git a/yarn-project/end-to-end/src/e2e_p2p/gerousia.test.ts b/yarn-project/end-to-end/src/e2e_p2p/gerousia.test.ts index 4ac399e1ae52..66d9a799e4cf 100644 --- a/yarn-project/end-to-end/src/e2e_p2p/gerousia.test.ts +++ b/yarn-project/end-to-end/src/e2e_p2p/gerousia.test.ts @@ -46,6 +46,7 @@ describe('e2e_p2p_gerousia', () => { /** * There is some flaky behavior in here, likely similar to what is in the gossip test. * For this reason we are not running it as part of the CI. + * TODO(https://github.com/AztecProtocol/aztec-packages/issues/9164): Currently flakey */ it.skip('Should cast votes to upgrade gerousia', async () => { // create the bootstrap node for the network diff --git a/yarn-project/sequencer-client/src/publisher/utils.ts b/yarn-project/sequencer-client/src/publisher/utils.ts index d2dac86476ee..ad2177019c11 100644 --- a/yarn-project/sequencer-client/src/publisher/utils.ts +++ b/yarn-project/sequencer-client/src/publisher/utils.ts @@ -15,13 +15,8 @@ export function prettyLogViemErrorMsg(err: any) { } export function prettyLogViemError(err: any, logger: Logger) { - if (err instanceof BaseError) { - const revertError = err.walk(err => err instanceof ContractFunctionRevertedError); - if (revertError instanceof ContractFunctionRevertedError) { - const errorName = revertError.data?.errorName ?? ''; - const args = - revertError.metaMessages && revertError.metaMessages?.length > 1 ? revertError.metaMessages[1].trimStart() : ''; - logger.debug(`canProposeAtTime failed with "${errorName}${args}"`); - } + const msg = prettyLogViemErrorMsg(err); + if (msg) { + logger.debug(`canProposeAtTime failed with "${msg}"`); } }