Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions vyper/codegen_venom/expr.py
Original file line number Diff line number Diff line change
Expand Up @@ -1793,6 +1793,9 @@ def _lower_external_call(self) -> VyperValue:

# === Dispatch CALL or STATICCALL ===
use_staticcall = fn_type.mutability in (StateMutability.VIEW, StateMutability.PURE)
if self.ctx.is_constant():
# Non-static calls in constant context should be rejected by the typechecker.
assert use_staticcall

# Return buffer location and size
ret_ofst = buf._ptr
Expand Down