Open Latrasis opened 5 years ago
This all works in #191. That is:
cap9-cli new <project-name> --acl
.cap9-cli deploy
.cap9-cli new-procedure <proc-name>
.<proc-name>
.cargo build --target wasm32-unknown-unknown
.cap9-cli deploy-procedure <proc-name>
.cap9-cli fetch procedures
and seeing a procedure with the name <proc-name>
is now in the procedure list.I'm going to add some better error messages and tests.
Added error messages that should cover most if not all problems that might occur in this workflow and offer guidance on how to fix it.
Added execution of arbitrary procedures via the admin procedure. Added tests to execute new procedures via this process.
I added a script to the root of the cap9-cli package to step through all of these things with the right commands. I've reproduced it here:
cargo run --bin cap9-cli -- new --acl new-project
cd new-project
cargo run --bin cap9-cli -- deploy
cargo run --bin cap9-cli -- new-procedure hello_world
cd hello_world
cargo build --target wasm32-unknown-unknown --release
cd ..
cargo run --bin cap9-cli -- deploy-procedure hello_world
cargo run --bin cap9-cli -- fetch all-logs
cargo run --bin cap9-cli -- call-any hello_world say_hello
cargo run --bin cap9-cli -- fetch all-logs
This issue is completed with #191.
We need a
new-procedure
command for setting up a new procedure code.New-Procedure Command
Parameters:
<name>
- Name of new procedureOutput:
caps.json
file with sample log capabilitymain.rs
file that uses the log capability to output "Hello World"Deploy-Procedure Command
The
deploy-procedure
command is amended: