Attribute Macro stellar_axelar_std_derive::only_operator
source · #[only_operator]
Expand description
Ensures that only a contract’s operator can execute the attributed function.
The first argument to the function must be env
§Example
ⓘ
use stellar_axelar_std::only_operator;
#[contract]
pub struct Contract;
#[contractimpl]
impl Contract {
#[only_operator]
pub fn transfer(env: &Env, to: Address, amount: String) {
// ... transfer logic ...
}
}