stellar_multicall/interface.rs
1use stellar_axelar_std::{Env, Val, Vec};
2
3use crate::types::FunctionCall;
4
5//#[contractclient(name = "MulticallClient")]
6pub trait MulticallInterface {
7 /// Executes an arbitrary list of contract calls and returns the results of all the calls.
8 ///
9 /// # Arguments
10 /// * `function_calls` - A list of params containing the contract address, function name and arguments for each contract call.
11 ///
12 /// # Returns
13 /// - `Ok(Vec<Val>)`: Returns a vector with the return data of each function call
14 ///
15 /// # Errors:
16 /// - Propagates any error that occurs during the execution of the contract calls.
17 fn multicall(env: &Env, function_calls: Vec<FunctionCall>) -> Vec<Val>;
18}