accordproject / template-archive

Smart Legal Contracts & Templating System
https://accordproject.org/projects/cicero/
Apache License 2.0
281 stars 119 forks source link

feat(cicero-cli): add --data option to initilize, invoke and trigger commands #685

Closed martinhalford closed 3 years ago

martinhalford commented 3 years ago

Signed-off-by: Martin Halford martin@benext.io

Closes #681

Changes

Flags

Example Usage

cicero trigger --template ./hello-world --data ./hello-world/data.json 
cicero initialize  --template ./hello-world --data ./hello-world/data.json 
cicero invoke  --template ./hello-world --clauseName default --params ./hello-world/params.json --state ./hello-world/state.json --data ./hello-world/data.json

Note

Some significant changes to the validateInvokeArgs, validateTriggerArgs & validateInitializeArgs to handle the scenario where either the--sample option is provided --OR-- the --data option is provided.

coveralls commented 3 years ago

Coverage Status

Coverage increased (+0.2%) to 97.035% when pulling 8624ce44957ea765b450481e263bf8275b51403d on martinhalford:add-data-option into 01f5393dd3075512d688844773f7a3b871062135 on accordproject:master.