0xPolygonMiden / miden-client

Client library that facilitates interaction with the Miden rollup
MIT License
25 stars 22 forks source link

Define format and custom parsers to define assets on the CLI #340

Closed mFragaBA closed 1 month ago

mFragaBA commented 1 month ago

Similar, but more related to how we input to the CLI. I believe Bobbin suggested something like using "{FaucetID}::{Amount}" for inputting fungible asssets.

_Originally posted by @igamigo in https://github.com/0xPolygonMiden/miden-client/pull/324#discussion_r1601889525_

bobbinth commented 1 month ago

There could also be other formats (especially once we add support for mapping ticker symbols). For example:

mFragaBA commented 1 month ago

There could also be other formats (especially once we add support for mapping ticker symbols). For example:

* `{amount}::{faucetId}` - e.g., `100::0x123456789`

* `{amount}::{symbol}` - e.g., `100::POL` or maybe even just `100POL` (though this would be a bit more difficult to parse).

agreed, I woudl keep the :: for ease of parsing (a space is also ok). And we can handle either the ID (we check if it starts with 0x) or a symbol otherwise

mFragaBA commented 1 month ago

closing as #349 got merged. We may revisit the asset format if we add account aliases / token symbol mapping