-
Notifications
You must be signed in to change notification settings - Fork 40
Closed
Labels
DevExChange to improve the Developer ExperienceChange to improve the Developer Experiencegood first issueGood for newcomersGood for newcomers
Description
Currently for a smart contract that has an Option parameter, is not intuitive how to add None.
Example:
#[ink(storage)]
pub struct TestContract {
name: String,
otherContract: Option<H160>,
}
impl TestContract {
#[ink(constructor)]
pub fn new(name: String, otherContract: Option<H160>) -> Self {
Self { name, otherContract }
}The None value has to be indicated with "" e.g: pop up --args \"name\" "" . This is because cargo-contract library is implemented that way, to improve the DevEx why not let the user use None and convert it under the hood to "".
Also the experience to input a String has to be improved too, to don't use \"name\": #408
Metadata
Metadata
Assignees
Labels
DevExChange to improve the Developer ExperienceChange to improve the Developer Experiencegood first issueGood for newcomersGood for newcomers