Skip to content

Commit

Permalink
fix: prevent overflow in abi encoding (#1135)
Browse files Browse the repository at this point in the history
* l2geth: prevent overflow in abi encoding to ovm codec tx

* chore: add changeset
  • Loading branch information
tynes committed Jun 25, 2021
1 parent 55aefc9 commit 3ed8788
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/happy-dancers-raise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@eth-optimism/l2geth': patch
---

Prevent overflows in abi encoding of ovm codec transaction from geth types.Transaction
2 changes: 1 addition & 1 deletion l2geth/core/state_transition_ovm.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func EncodeSimulatedMessage(msg Message, timestamp, blockNumber *big.Int, execut
uint8(msg.QueueOrigin()),
*msg.L1MessageSender(),
*to,
big.NewInt(int64(msg.Gas())),
new(big.Int).SetUint64(msg.Gas()),
msg.Data(),
}

Expand Down

0 comments on commit 3ed8788

Please sign in to comment.