Two canisters: caller makes an inter-canister call to callee.
- Zig 0.15+
- icp-cli
zig buildThis produces zig-out/bin/callee.wasm and zig-out/bin/caller.wasm.
icp network start --background
icp deploy callee
CALLEE=$(icp canister status -i callee)
icp canister create caller
icp canister install caller --args-format hex --args "$(echo -n $CALLEE | xxd -p)"Query the callee directly:
icp canister call callee greet --args-format hex "" -o autoMake the caller call into the callee (returns "hello from callee"):
icp canister call caller call_greet --args-format hex "" -o autoAfter changing source code, rebuild and upgrade a single canister:
zig build callee
icp canister install callee --mode upgrade
zig build caller
icp canister install caller --mode upgradeOr rebuild and upgrade everything:
icp deploy --upgrade-unchanged