MCPcopy Create free account
hub / github.com/dfinity/orbit / call

Function call

tests/canister/impl/src/lib.rs:12–25  ·  view source on GitHub ↗
(canister_id: Principal, method_name: String, arg: Vec<u8>, mut total_calls: u64)

Source from the content-addressed store, hash-verified

10
11#[update]
12async fn call(canister_id: Principal, method_name: String, arg: Vec<u8>, mut total_calls: u64) {
13 while total_calls != 0 {
14 let current_batch = std::cmp::min(total_calls, 500);
15 total_calls -= current_batch;
16 let mut futs = vec![];
17 for _ in 0..current_batch {
18 futs.push(call_raw(canister_id, &method_name, arg.clone(), 0));
19 }
20 let res = join_all(futs).await;
21 for r in res {
22 r.unwrap();
23 }
24 }
25}
26
27#[derive(CandidType, Deserialize)]
28pub enum ValidationResponse {

Callers 1

paginatedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected