Skip to content

Commit

Permalink
Cleaner
Browse files Browse the repository at this point in the history
  • Loading branch information
msooseth committed Dec 23, 2024
1 parent af12cba commit 022f6ee
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/EVM.hs
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ getOpW8 state = case state.code of
getOpName :: forall (t :: VMType) s . FrameState t s -> [Char]
getOpName state = intToOpName $ fromEnum $ getOpW8 state

canResolveAddr :: forall (t :: VMType) s . VMOps t => Expr EAddr -> EVM t s (Bool)
canResolveAddr addr = do
canFetchAccount :: forall (t :: VMType) s . VMOps t => Expr EAddr -> EVM t s (Bool)
canFetchAccount addr = do
use (#env % #contracts % at addr) >>= \case
Just _ -> pure True
Nothing -> case addr of
Expand Down Expand Up @@ -996,10 +996,9 @@ exec1 = do
Just xTo' -> do
case gasTryFrom xGas of
Left _ -> vmError IllegalOverflow
Right gas -> do
ok <- canResolveAddr xTo'
if not ok then fallback
else do
Right gas -> canFetchAccount xTo' >>= \case
False -> fallback
True -> do
overrideC <- use $ #state % #overrideCaller
delegateCall this gas xTo' xTo' (Lit 0) xInOffset xInSize xOutOffset xOutSize xs $
\callee -> do
Expand Down

0 comments on commit 022f6ee

Please sign in to comment.