Skip to content

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

@iamdefinitelyahuman

Description

@iamdefinitelyahuman

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions