You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reverting in the __default__ function will raise an exception:
Traceback (most recent call last):
File "/home/lemy/otitanoboa/titanoboa/test_except.py", line 15, in <module>
res = getattr(ct, name)()
File "/home/lemy/otitanoboa/titanoboa/boa/contracts/vyper/vyper_contract.py", line 1075, in __call__
return self.contract.marshal_to_python(computation, typ)
File "/home/lemy/otitanoboa/titanoboa/boa/contracts/vyper/vyper_contract.py", line 782, in marshal_to_python
self.handle_error(computation)
File "/home/lemy/otitanoboa/titanoboa/boa/contracts/base_evm_contract.py", line 51, in handle_error
raise strip_internal_frames(b) from b
File "/home/lemy/otitanoboa/titanoboa/test_except.py", line 15, in <module>
res = getattr(ct, name)()
boa.contracts.base_evm_contract.BoaError: <exception str() failed>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/lemy/otitanoboa/titanoboa/test_except.py", line 18, in <module>
print(e)
File "/home/lemy/otitanoboa/titanoboa/boa/contracts/base_evm_contract.py", line 132, in __str__
call_tree = str(self.call_trace)
File "/home/lemy/otitanoboa/titanoboa/boa/contracts/call_trace.py", line 97, in __str__
text = f"{' ' * self.depth * 4}{self.text}"
File "/home/lemy/otitanoboa/titanoboa/boa/contracts/call_trace.py", line 103, in text
text = self.source.format(self.input_data, self.output, self.is_error)
File "/home/lemy/otitanoboa/titanoboa/boa/contracts/call_trace.py", line 15, in format
in_ = self._format_input(input_)
File "/home/lemy/otitanoboa/titanoboa/boa/contracts/call_trace.py", line 25, in _format_input
decoded = abi_decode(self.args_abi_type, input_)
File "/usr/lib/python3.10/functools.py", line 981, in __get__
val = self.func(instance)
File "/home/lemy/otitanoboa/titanoboa/boa/contracts/vyper/vyper_contract.py", line 1135, in args_abi_type
schema, fn_t = self._func_t_helper
File "/usr/lib/python3.10/functools.py", line 981, in __get__
val = self.func(instance)
File "/home/lemy/otitanoboa/titanoboa/boa/contracts/vyper/vyper_contract.py", line 1123, in _func_t_helper
method_id_int = int(self.method_id.hex(), 16)
ValueError: invalid literal for int() with base 16: ''
Meanwhile, using the non-default function will work as expected:
========================================================================
[E] [52] <unknown>.foo:5() <0x>
========================================================================
Revert(b'')
<<unknown> at 0x0880cf17Bd263d3d3a5c09D2D86cCecA3CcbD97c, compiled with vyper-0.4.0+e9db8d9>
<compiler: user raise>
function "foo", line 5:4
4 def foo() -> uint256:
---> 5 raise
-----------^
6
Provides an empty method_id for the default function and hence crashes.
The text was updated successfully, but these errors were encountered:
Boa commit:
f58c33cde50f6deaaeefff1136b18f92ef747c6b
Example:
Reverting in the
__default__
function will raise an exception:Meanwhile, using the non-default function will work as expected:
Provides an empty
method_id
for the default function and hence crashes.The text was updated successfully, but these errors were encountered: