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
The use of value as a kwarg typically indicates an amount of ether to send, but because of the input argument the intention becomes ambiguous. Is call_to_foo transferring 31337 wei, or sending an integer of 31337?
Specification
Use of value as a variable name in a function input should raise. We can suggest that users change it to _value.
Backwards Compatibility
It's a breaking change for some contracts, but with a well explained error message it's easily dealt with.
Copyright
Copyright and related rights waived via CC0
The text was updated successfully, but these errors were encountered:
Simple Summary
Vyper should not allow
value
as a function input variable name.Motivation
Imagine the following contract
Foo
:and another contract interacting with the previous one:
The use of
value
as a kwarg typically indicates an amount of ether to send, but because of the input argument the intention becomes ambiguous. Iscall_to_foo
transferring 31337 wei, or sending an integer of 31337?Specification
Use of
value
as a variable name in a function input should raise. We can suggest that users change it to_value
.Backwards Compatibility
It's a breaking change for some contracts, but with a well explained error message it's easily dealt with.
Copyright
Copyright and related rights waived via CC0
The text was updated successfully, but these errors were encountered: