Commit 73f0cdde authored by mergify[bot]'s avatar mergify[bot] Committed by GitHub

Merge pull request #4731 from ethereum-optimism/feat/lwd-cdm

op-chain-ops: add getter for cdm
parents 2c26ac35 22ce313e
...@@ -170,3 +170,17 @@ func (w *LegacyWithdrawal) Value() (*big.Int, error) { ...@@ -170,3 +170,17 @@ func (w *LegacyWithdrawal) Value() (*big.Int, error) {
return value, nil return value, nil
} }
// CrossDomainMessage turns the LegacyWithdrawal into
// a CrossDomainMessage. LegacyWithdrawals do not have
// the concept of value or gaslimit, so set them to 0.
func (w *LegacyWithdrawal) CrossDomainMessage() *CrossDomainMessage {
return &CrossDomainMessage{
Nonce: w.Nonce,
Sender: w.Sender,
Target: w.Target,
Value: new(big.Int),
GasLimit: new(big.Int),
Data: []byte(w.Data),
}
}
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