Skip to content

VIP: start and length args in slice should be uint256 #1986

@iamdefinitelyahuman

Description

@iamdefinitelyahuman

Simple Summary

The start and length args in the builtin function slice should be expected as uint256.

Motivation

We do not use negative values for indexing, so a negative start index or length already won't work. There is no need for int128 here.

Specification

Change the function signature to:

slice(b: bytes, start: uint256, length: uint256) → bytes

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