From cdece16cb543026113a65f1174bccd20b57c4516 Mon Sep 17 00:00:00 2001 From: Joseandro Luiz Date: Sat, 11 Nov 2023 23:43:25 +0300 Subject: [PATCH] op-challenger: fixes the latestBlockNumber signature and makes the ROOT_CLAIM variable 32 bytes in size --- op-challenger/scripts/alphabet/init_game.sh | 2 +- op-challenger/scripts/create_game.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/op-challenger/scripts/alphabet/init_game.sh b/op-challenger/scripts/alphabet/init_game.sh index 5a0db7b02540..29f1dfe2feb4 100755 --- a/op-challenger/scripts/alphabet/init_game.sh +++ b/op-challenger/scripts/alphabet/init_game.sh @@ -63,6 +63,6 @@ done # Alphabet game claim construction: keccak256(abi.encode(trace_index, trace[trace_index])) ROOT_CLAIM=$(cast keccak $(cast abi-encode "f(uint256,uint256)" 15 122)) # Replace the first byte of the claim with the invalid vm status indicator -ROOT_CLAIM="0x01${ROOT_CLAIM:4:60}" +ROOT_CLAIM="0x01${ROOT_CLAIM:4}" GAME_TYPE=255 ${SOURCE_DIR}/../create_game.sh http://localhost:8545 "${DISPUTE_GAME_FACTORY}" "${ROOT_CLAIM}" --private-key "${DEVNET_SPONSOR}" diff --git a/op-challenger/scripts/create_game.sh b/op-challenger/scripts/create_game.sh index 151c7cc81aa3..f435fb09e5a7 100755 --- a/op-challenger/scripts/create_game.sh +++ b/op-challenger/scripts/create_game.sh @@ -27,7 +27,7 @@ BLOCK_ORACLE_ADDR=$(cast call --rpc-url "${RPC}" "${GAME_IMPL_ADDR}" 'BLOCK_ORAC echo "Block Oracle: ${BLOCK_ORACLE_ADDR}" # Get the L2 block number of the latest output proposal. This is the proposal that will be disputed by the created game. -L2_BLOCK_NUM=$(cast call --rpc-url "${RPC}" "${L2OO_ADDR}" 'latestBlockNumber() public view returns (uint256)') +L2_BLOCK_NUM=$(cast call --rpc-url "${RPC}" "${L2OO_ADDR}" 'latestBlockNumber() returns(uint256)') echo "L2 Block Number: ${L2_BLOCK_NUM}" # Create a checkpoint in the block oracle to commit to the current L1 head.