Skip to content

Commit

Permalink
More informative errors for unimplemented EVM features (#1387)
Browse files Browse the repository at this point in the history
* Report the transaction type that is not yet supported

* Added a more informative error about the `STATICCALL` opcode (#1168)

* Reminder for when #1168 is addressed
  • Loading branch information
ESultanik authored and disconnect3d committed Mar 14, 2019
1 parent 10707f6 commit 9097916
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion manticore/platforms/evm.py
Original file line number Diff line number Diff line change
Expand Up @@ -2532,7 +2532,11 @@ def _process_pending_transaction(self):
sort, address, price, data, caller, value, gas = self._pending_transaction

if sort not in {'CALL', 'CREATE', 'DELEGATECALL', 'CALLCODE'}:
raise EVMException('Type of transaction not supported')
if sort == 'STATICCALL':
# TODO: Remove this once Issue #1168 is resolved
raise EVMException(f"The STATICCALL opcode is not yet supported; see https://github.com/trailofbits/manticore/issues/1168")
else:
raise EVMException(f"Transaction type '{sort}' not supported")

if self.depth > 0:
assert price is None, "Price should not be used in internal transactions"
Expand Down

0 comments on commit 9097916

Please sign in to comment.