Commit d27ada8f authored by Mark Tyneway's avatar Mark Tyneway

op-chain-ops: make the migrated withdrawals version 0

Update the migrated withdrawals to be version 0 based
on the new scheme that is introduced in https://github.com/ethereum-optimism/optimism/pull/4562.
This is a safety measure to ensure that withdrawals cannot
be double withdrawn and that ether stuck in the L1xdm cannot
be stolen in the case of a withdrawal with value reverting.
parent 509df58e
...@@ -63,7 +63,8 @@ func MigrateWithdrawal(withdrawal *LegacyWithdrawal, l1CrossDomainMessenger *com ...@@ -63,7 +63,8 @@ func MigrateWithdrawal(withdrawal *LegacyWithdrawal, l1CrossDomainMessenger *com
return nil, err return nil, err
} }
versionedNonce := EncodeVersionedNonce(withdrawal.Nonce, common.Big1) // Migrated withdrawals are specified as version 0
versionedNonce := EncodeVersionedNonce(withdrawal.Nonce, new(big.Int))
// Encode the call to `relayMessage` on the `CrossDomainMessenger`. // Encode the call to `relayMessage` on the `CrossDomainMessenger`.
// The minGasLimit can safely be 0 here. // The minGasLimit can safely be 0 here.
data, err := abi.Pack( data, err := abi.Pack(
......
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