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: start and length args in slice should be uint256 #1986

Closed
iamdefinitelyahuman opened this issue May 21, 2020 · 0 comments · Fixed by #2033
Closed

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

iamdefinitelyahuman opened this issue May 21, 2020 · 0 comments · Fixed by #2033
Labels
VIP: Approved VIP Approved

Comments

@iamdefinitelyahuman
Copy link
Contributor

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

@iamdefinitelyahuman iamdefinitelyahuman added the VIP: Discussion Used to denote VIPs and more complex issues that are waiting discussion in a meeting label May 21, 2020
@fubuloubu fubuloubu mentioned this issue May 21, 2020
5 tasks
@iamdefinitelyahuman iamdefinitelyahuman 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 May 26, 2020
@fubuloubu fubuloubu added this to the v0.2 Release milestone Jun 21, 2020
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

Successfully merging a pull request may close this issue.

2 participants