Skip to content

Commit

Permalink
op-node: Fix storage slot comment
Browse files Browse the repository at this point in the history
The withdrawals mapping is the 0th storage slot, not the second.

Fixes CLI-3440
  • Loading branch information
mslipper committed Feb 24, 2023
1 parent e36ddb0 commit 6ee7733
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion op-node/withdrawals/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ func ParseMessagePassed(receipt *types.Receipt) (*bindings.L2ToL1MessagePasserMe
// StorageSlotOfWithdrawalHash determines the storage slot of the Withdrawer contract to look at
// given a WithdrawalHash
func StorageSlotOfWithdrawalHash(hash common.Hash) common.Hash {
// The withdrawals mapping is the second (0 indexed) storage element in the Withdrawer contract.
// The withdrawals mapping is the 0th storage slot in the L2ToL1MessagePasser contract.
// To determine the storage slot, use keccak256(withdrawalHash ++ p)
// Where p is the 32 byte value of the storage slot and ++ is concatenation
buf := make([]byte, 64)
Expand Down

0 comments on commit 6ee7733

Please sign in to comment.