1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#[macro_export]
macro_rules! impl_owner_feature {
    ($contract:ident, $instance:ident) => {
        use $crate::owner::{ContractOwner, ContractOwnerTransfer};

        #[near_bindgen]
        impl ContractOwner for $contract {
          fn get_owner(&self) -> AccountId {
            self.$instance.get_owner()
          }
        }

        #[near_bindgen]
        impl ContractOwnerTransfer for $contract {
          fn set_owner(&mut self, account_id: AccountId) -> AccountId {
            self.$instance.set_owner(account_id)
          }
        }
    };
}