Closed haydenadams closed 5 years ago
@haydenadams does this occur on assert
statements? I think this is probably related to our get_revert
function if so: https://github.com/ethereum/vyper/blob/master/vyper/compile_lll.py#L30
@jacqueswww It occurs on failing web3 function calls that are not constant.
@jacqueswww wait sorry I misunderstood. You mean Vyper asserts not pytest asserts.
Yeah I think thats the case.
After a lot of digging, I have figured out what is causing this. Doing an invalid jump, was the old method of throwing in a contract, before REVERT came to be. create_with_code_of
still uses this type of exception after the delegatcall returns a failure. So here are the steps to fix this issue:
kode
variable in functions.py to be more readable, hex blobs should be avoided.create_with_code_of
use REVERT instead.
I've noticed that ever since switching to a vyper version using #901 the only error I get (on transactions that should fail) is
eth.exceptions.InvalidJumpDestination: Invalid Jump Destination
Here is my testing setup: https://github.com/Uniswap/contracts-vyper/blob/master/tests/conftest.py
Version Information
Error Output: