Commit fa88dfd7 authored by Adrian Sutton's avatar Adrian Sutton

op-challenger: Use the checkpointed block number from the emitted event rather...

op-challenger: Use the checkpointed block number from the emitted event rather than subtracting one from the block number manually.
parent 20b33498
...@@ -33,9 +33,7 @@ echo "L2 Block Number: ${L2_BLOCK_NUM}" ...@@ -33,9 +33,7 @@ echo "L2 Block Number: ${L2_BLOCK_NUM}"
# Create a checkpoint in the block oracle to commit to the current L1 head. # Create a checkpoint in the block oracle to commit to the current L1 head.
# This defines the L1 head that will be used in the dispute game. # This defines the L1 head that will be used in the dispute game.
echo "Checkpointing the block oracle..." echo "Checkpointing the block oracle..."
L1_CHECKPOINT=$(cast send --rpc-url "${RPC}" ${SIGNER_ARGS} "${BLOCK_ORACLE_ADDR}" "checkpoint()" --json | jq -r .blockNumber | cast to-dec) L1_CHECKPOINT=$(cast send --rpc-url "${RPC}" ${SIGNER_ARGS} "${BLOCK_ORACLE_ADDR}" "checkpoint()" --json | jq -r '.logs[0].topics[1]' | cast to-dec)
# The L1 head to be used is the block prior to the one the checkpoint transaction was included in.
((L1_CHECKPOINT=L1_CHECKPOINT-1))
echo "L1 Checkpoint: $L1_CHECKPOINT" echo "L1 Checkpoint: $L1_CHECKPOINT"
# Fault dispute game extra data is calculated as follows. # Fault dispute game extra data is calculated as follows.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment