diff --git a/vyper/codegen/external_call.py b/vyper/codegen/external_call.py index 45283fb307..6c3252792e 100644 --- a/vyper/codegen/external_call.py +++ b/vyper/codegen/external_call.py @@ -169,6 +169,8 @@ def _extcodesize_check(address): def _external_call_helper(contract_address, args_ir, call_kwargs, call_expr, context): fn_type = call_expr.func._metadata["type"] + # the return type may differ from the function's return type if the function was + # imported via ABI e.g. widening of bytestrings return_t = call_expr._metadata["type"] if fn_type.is_from_abi else fn_type.return_type # sanity check