1use srb_std::types::Token;
2use soroban_sdk::{contractclient, contracterror, Address, Bytes, Env, String};
3
4#[contracterror]
5#[derive(Copy, Clone, Debug, Eq, PartialEq, PartialOrd, Ord)]
6#[repr(u32)]
7pub enum GasServiceError {
8 InvalidAddress = 1,
9 InvalidAmount = 2,
10 InsufficientBalance = 3,
11 AlreadyInitialized = 4,
12 NotInitialized = 5,
13}
14
15#[contractclient(name = "AxelarGasServiceClient")]
17pub trait AxelarGasServiceInterface {
18 fn initialize(env: Env, gas_collector: Address) -> Result<(), GasServiceError>;
20
21 fn pay_gas_for_contract_call(
23 env: Env,
24 sender: Address,
25 destination_chain: String,
26 destination_address: String,
27 payload: Bytes,
28 refund_address: Address,
29 token: Token,
30 ) -> Result<(), GasServiceError>;
31
32 fn collect_fees(env: Env, receiver: Address, token: Token) -> Result<(), GasServiceError>;
34
35 fn refund(
37 env: Env,
38 message_id: String,
39 receiver: Address,
40 token: Token,
41 ) -> Result<(), GasServiceError>;
42}