Skip to content

Commit

Permalink
Merge pull request #371 from ethereum/correct-store-for-constructors
Browse files Browse the repository at this point in the history
SymExec: correct initial storage for constructors in abstractVM
  • Loading branch information
d-xo authored Sep 6, 2023
2 parents 394f905 + f0aa519 commit e2f32c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/EVM/SymExec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import Data.Text.Lazy qualified as TL
import Data.Text.Lazy.IO qualified as TL
import Data.Tree.Zipper qualified as Zipper
import Data.Tuple (swap)
import EVM (makeVm, abstractContract, getCodeLocation, isValidJumpDest)
import EVM (makeVm, abstractContract, initialContract, getCodeLocation, isValidJumpDest)
import EVM.Exec
import EVM.Fetch qualified as Fetch
import EVM.ABI
Expand Down Expand Up @@ -207,7 +207,7 @@ loadSymVM
-> ST s (VM s)
loadSymVM x callvalue cd create =
(makeVm $ VMOpts
{ contract = abstractContract x (SymAddr "entrypoint")
{ contract = if create then initialContract x else abstractContract x (SymAddr "entrypoint")
, calldata = cd
, value = callvalue
, baseState = AbstractBase
Expand Down

0 comments on commit e2f32c2

Please sign in to comment.