Crate stellar_macros

Crate stellar_macros 

Source

Attribute Macros§

has_any_role
A procedural macro that ensures the parameter has any of the specified roles.
has_role
A procedural macro that ensures the parameter has the specified role.
only_admin
A procedural macro that retrieves the admin from storage and requires authorization from the admin before executing the function body.
only_any_role
A procedural macro that ensures the parameter has any of the specified roles and requires authorization.
only_owner
A procedural macro that retrieves the owner from storage and requires authorization from the owner before executing the function body.
only_role
A procedural macro that ensures the parameter has the specified role and requires authorization.
when_not_paused
Adds a pause check at the beginning of the function that ensures the contract is not paused.
when_paused
Adds a pause check at the beginning of the function that ensures the contract is paused.

Derive Macros§

Upgradeable
Derives Upgradeable a) implements the interface; requires only the auth to be defined b) sets wasm version by taking the version from Cargo.tomlDerives UpgradeableMigratable when both an upgrade and a migration are needed a) implements the interface; requires the auth and the migration logic to be defined b) sets wasm version by taking the version from Cargo.toml
UpgradeableMigratable