Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VIP: Disallow int128 for value and gas kwargs in external function calls #1878

Closed
iamdefinitelyahuman opened this issue Mar 7, 2020 · 2 comments
Labels
VIP: Approved VIP Approved

Comments

@iamdefinitelyahuman
Copy link
Contributor

Simple Summary

When specifying gas and value in an external function call, it should not be possible to use a variable of type int128.

Motivation

  1. msg.value and msg.gas are of both of type uint256.
  2. It is not possible to use negative gas or transfer negative wei, so under the hood we are silently bounds-checking int128 values and converting to uint256.

Specification

Raise an InvalidType error if gas or value are given as an int128 variable.

Backwards Compatibility

This is a breaking change.

Copyright

Copyright and related rights waived via CC0

@fubuloubu fubuloubu added the VIP: Discussion Used to denote VIPs and more complex issues that are waiting discussion in a meeting label Mar 7, 2020
@fubuloubu fubuloubu mentioned this issue Mar 16, 2020
8 tasks
@charles-cooper
Copy link
Member

I think this is great

@fubuloubu fubuloubu added VIP: Approved VIP Approved and removed VIP: Discussion Used to denote VIPs and more complex issues that are waiting discussion in a meeting labels Mar 16, 2020
@fubuloubu fubuloubu added this to the v0.2 Release milestone Jun 21, 2020
@iamdefinitelyahuman
Copy link
Contributor Author

Closed in #2029

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
VIP: Approved VIP Approved
Projects
None yet
Development

No branches or pull requests

3 participants