foundry
foundry copied to clipboard
fix : cast interface can handle vyper contracts
Motivation
cast interface wasn't handling vyper contracts because of missing stuff related struct types of vyper contracts such as they do not have internal_types in the abi file specially when output variable is struct
Solution
I added missing behavior for such case that I explained in motivation but also noticed that some vyper contracts are using solidity syntax words in some variables so in that case it fails and in my solution it doesn't set output value as struct but unpack the variables directly because cause of structure of vyper contract abis it is impossible to fetch which struct it is therefore it can't add structs to the interface as well user needs to handle it manually
Also added 2 more tests cases and confirmed all the tests are passing