Skip to content

Add SafeCast variants for signed integers #2240

Closed
@nventuro

Description

@nventuro

SafeCast currently has support for downcasting uints and casting them to int256, but there's no safe way to downcast signed integers.

This is slightly trickier because the two's complement integer representation has different ranges for positive and negative numbers, but should be easy to do anyway.

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueLow hanging fruit for new contributors to get involved!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions