Skip to content

Improved support for sized bytes types #20

@rkalis

Description

@rkalis

Currently, CashScript has support for bytes, bytes20, and bytes32. However, solidity has support from bytes1 up to bytes32 in increments of 1. This should be added to CashScript, and potentially expanded on by allowing even larger bytes types like bytes64.

These "bounded" bytes types facilitate better int to bytes casting by being able to specify the specific sized bytes. They also facilitate using bitwise operations such as bitwise AND and OR, which otherwise fail when the parameters are not exactly the same size. Using these bounded bytes types also allows for easier SDK-level type checking, as provided arguments can be typechecked to be the correct size by the SDK.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cashc-compilerRelates to the cashc compiler

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions