From 1d574ac5833470072b22b7c6e06cd2655c717cd8 Mon Sep 17 00:00:00 2001 From: David Date: Wed, 10 Apr 2024 13:37:00 +0800 Subject: [PATCH] feat: fix genesis hash --- integration_test/l1_env.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/integration_test/l1_env.sh b/integration_test/l1_env.sh index 76b1fc923..8861f19c5 100755 --- a/integration_test/l1_env.sh +++ b/integration_test/l1_env.sh @@ -27,5 +27,12 @@ export GUARDIAN_PROVERS=${GUARDIAN_PROVERS_ADDRESSES:1} export MIN_GUARDIANS=${#GUARDIAN_PROVERS_ADDRESSES_LIST[@]} # Get the hash of L2 genesis. -export L2_GENESIS_HASH=$(cast block --rpc-url "$L2_EXECUTION_ENGINE_HTTP_ENDPOINT" 0x0 -f hash) +export L2_GENESIS_HASH=$( + curl \ + --silent \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","id":0,"method":"eth_getBlockByNumber","params":["0x0", false]}' \ + $L2_EXECUTION_ENGINE_HTTP_ENDPOINT | jq .result.hash | sed 's/\"//g' +) echo "L2_GENESIS_HASH: $L2_GENESIS_HASH"