Modifier instances for sway

Hi :wave:t2:
Is there any libraries in sway to implement what modifiers do for smart contracts in solidity
To reduce verbose code and code readability

Hey @shealtielanz, yes, you can use sway-libs to implement functionality similar to implement the same functionality.

Here is one such example of the ownership lib:

use sway_libs::ownership::_owner;
use standards::src5::{SRC5, State};
 
impl SRC5 for Contract {
    #[storage(read)]
    fn owner() -> State {
        _owner()
    }
}