r0gue-io / pop-cli

An all-in-one tool for Polkadot development.
GNU General Public License v3.0
74 stars 21 forks source link

fix: parse user inputs for Option arguments in constructor #335

Closed AlexD10S closed 2 weeks ago

AlexD10S commented 2 weeks ago

Fixes: https://github.com/r0gue-io/pop-cli/issues/319

This PR improves the DevEx for pop up contract when calling contracts with optional parameters.

The main change is to move the logic for parsing metadata and processing arguments into a filed used by call and up. and includes the parsing parsing metadata and processing arguments of constructors.

Testing

To adjust that the contract used for testing has been updated. Is basically the flipper contract with a third call to test parsing arguments and a constructor with Optional values.