Attribute Macro stellar_axelar_std_derive::only_owner

source ·
#[only_owner]
Expand description

Ensures that only a contract’s owner can execute the attributed function.

The first argument to the function must be env

§Example

use stellar_axelar_std::only_owner;

#[contract]
pub struct Contract;

#[contractimpl]
impl Contract {
    #[only_owner]
    pub fn transfer(env: &Env, to: Address, amount: String) {
        // ... transfer logic ...
    }
}