1use soroban_sdk::{contractclient, contracterror, Address, Env, Symbol, Val, Vec};
2
3#[contracterror]
4#[derive(Copy, Clone, Debug, Eq, PartialEq, PartialOrd, Ord)]
5#[repr(u32)]
6pub enum OperatorError {
7 OperatorAlreadyAdded = 1,
8 NotAnOperator = 2,
9 AlreadyInitialized = 3,
10 NotInitialized = 4,
11}
12
13#[contractclient(name = "AxelarOperators")]
15pub trait AxelarOperatorsInterface {
16 fn initialize(env: Env, owner: Address) -> Result<(), OperatorError>;
18
19 fn is_operator(env: Env, account: Address) -> bool;
21
22 fn add_operator(env: Env, operator: Address) -> Result<(), OperatorError>;
24
25 fn remove_operator(env: Env, operator: Address) -> Result<(), OperatorError>;
27
28 fn execute(
30 env: Env,
31 operator: Address,
32 contract: Address,
33 function_name: Symbol,
34 args: Vec<Val>,
35 ) -> Result<Val, OperatorError>;
36}