scale-it / algo-builder

Framework to automate development of Algorand Assets and Smart Contracts.
https://algobuilder.dev
Apache License 2.0
133 stars 42 forks source link

Feature: Algob cli format for passing the arguments in script. #850

Closed rmeena840 closed 1 year ago

rmeena840 commented 1 year ago

New format for passing the arguments in algob cli: yarn algob run scripts/0-gold-asa.js --arg '{"firstname":"Jesper","surname":"Aaberg","phone":["555-0100", "555-0120"]}'

rmeena840 commented 1 year ago

example/test

I have created a task for this. https://www.pivotaltracker.com/story/show/183908501

rmeena840 commented 1 year ago

I am bit curious if we catch error the argument user passed in is a correct json format or not?

I have handled this case.

rmeena840 commented 1 year ago

Will it throw error if we run yarn algob run script.js '<JSON String>'?

Yes, that's the cli format. @thdailong

thdailong commented 1 year ago

Will it throw error if we run yarn algob run script.js '<JSON String>'?

Yes, that's the cli format. @thdailong

No, my means is that passing like this yarn algob run script.js '<JSON String>' without --arg flag would throw error or not

rmeena840 commented 1 year ago

Will it throw error if we run yarn algob run script.js '<JSON String>'?

Yes, that's the cli format. @thdailong

No, my means is that passing like this yarn algob run script.js '<JSON String>' without --arg flag would throw error or not

@thdailong Yes, it will throw error.

rmeena840 commented 1 year ago

@sczembor Please review the PR.