Commit 5c9b6343 authored by Mark Tyneway's avatar Mark Tyneway

l2geth: to execution manager run

Fix `toExecutionManagerRun` in cases where `asOvmMessage` isn't applied.
Note that tracing currently does not work for optimistic ethereum.
parent 0847f199
---
'@eth-optimism/l2geth': patch
---
Fix execution manager run
...@@ -23,12 +23,20 @@ type ovmTransaction struct { ...@@ -23,12 +23,20 @@ type ovmTransaction struct {
} }
func toExecutionManagerRun(evm *vm.EVM, msg Message) (Message, error) { func toExecutionManagerRun(evm *vm.EVM, msg Message) (Message, error) {
to := msg.To()
if to == nil {
to = &common.Address{}
}
l1MsgSender := msg.L1MessageSender()
if l1MsgSender == nil {
l1MsgSender = &common.Address{}
}
tx := ovmTransaction{ tx := ovmTransaction{
evm.Context.Time, evm.Context.Time,
msg.L1BlockNumber(), msg.L1BlockNumber(),
uint8(msg.QueueOrigin()), uint8(msg.QueueOrigin()),
*msg.L1MessageSender(), *l1MsgSender,
*msg.To(), *to,
big.NewInt(int64(msg.Gas())), big.NewInt(int64(msg.Gas())),
msg.Data(), msg.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