vyper Version (output of vyper --version): commit 4b4e188ba83d28b5dd6ff66479e7448e5b925030
Issue description
ContractFunctionT.fetch_call_return depends on self.is_internal to
prevent or not the call from being passed some external call reserved
kwargs such as gas or value. However, an __init__ function has
self.is_internal = False so it is possible to pass kwags when calling
it although it should not be allowed.
POC
For example, the contract below compiles:
# main.vy
import bar
initializes: bar
@deploy
@payable
def __init__():
bar.__init__(12, gas=14, value = 12, skip_contract_check= True)
Version Information
vyper --version
): commit 4b4e188ba83d28b5dd6ff66479e7448e5b925030Issue description
ContractFunctionT.fetch_call_return
depends onself.is_internal
to prevent or not the call from being passed some external call reserved kwargs such asgas
orvalue
. However, an__init__
function hasself.is_internal = False
so it is possible to pass kwags when calling it although it should not be allowed.POC
For example, the contract below compiles:
credits: @trocher