stellar-axelar-std-derive 2.1.0

Proc macros for Axelar contracts.
Documentation
#[soroban_sdk::contractimpl]
#[contractimpl]
impl Contract {
    pub fn should_return_contract_error(
        env: &Env,
        arg: String,
    ) -> Result<u32, ContractError> {
        stellar_axelar_std::ttl::extend_instance_ttl(&env);
        if stellar_axelar_std::interfaces::is_migrating(&env) {
            return Err(ContractError::MigrationInProgress);
        }
        Ok(3)
    }
    pub fn should_panic(env: &Env, arg: String) {
        stellar_axelar_std::ttl::extend_instance_ttl(&env);
        if stellar_axelar_std::interfaces::is_migrating(&env) {
            panic!("contract migration in progress");
        }
    }
    pub fn should_panic_because_not_contract_error(
        env: &Env,
        arg: String,
    ) -> Result<u32, OtherError> {
        stellar_axelar_std::ttl::extend_instance_ttl(&env);
        if stellar_axelar_std::interfaces::is_migrating(&env) {
            panic!("contract migration in progress");
        }
        Ok(5)
    }
    pub fn should_have_no_check_because_not_stateful() {}
    pub fn is_allowed_during_migration(env: &Env, arg: String) {
        stellar_axelar_std::ttl::extend_instance_ttl(&env);
    }
    fn should_have_no_check_because_private(env: &Env, arg: String) {}
}