Skip to content

Allow number separator for argument parsing #2447

@tupui

Description

@tupui

What problem does your feature solve?

When invoking contracts which involve numbers, e.g. an amount field, you might end up having to write large values like 1000000000. At first glance it's hard to parse and error prone. This is a common problem when dealing with asset as you could have to offset by 1e7.

You might be tempted to use handy separators like _ which currently leads to the following error:

Context: Expected type i128 (signed 128-bit integer), but received: '100_0000000'

What would you like to see?

I would like to be able to define numbers with separators like it can be done in Rust.

What alternatives are there?

Do nothing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Backlog (Not Ready)

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions