let (response,) = canister
.update_("load_wasm")
.with_arg_raw(Encode!(&wasm).unwrap())
.build::<(bool,)>()
.call_and_wait(waiter)
.await
.unwrap();
Here the canister exposes a function called “load_wasm” and expects a vec[u8] and returns a bool. Let me know if you have any questions and I’ll do my best to help.
Note that “Encode!” will help you encode the arguments, whatever the canister expects, and the type you specify in build::<(type,) should match the returned type of the function you are calling. Also note that this is a (tuple,) → this is done so that some type magic works in the back.
If you want to see more examples, I usually search Dfinity’s git repo for the functions I’d like to explore (update_ in this case) and read through the results. Hint: look for the end to end test cases, there’s lots of code for calling and interacting with canisters there.