Posted on c/ElrondDevelopers 1 lor321034262c/ElrondDevelopers 2 years ago Hello, Is there a way to change the ownership of a token/nft by using the self.send() API in a smartcontract ? Something like self.send().change_token_owner() ? Comment 1 Comments Sky8921089645 2years ago yes! Here’s my function if you want ? #[only_owner] #[endpoint(changeCollectionOwner)] fn change_collection_owner(&self, new_owner: Address) { let token = self.sft_token_id().get(); self.send() .esdt_system_sc_proxy() .transfer_ownership(&token, &new_owner) .async_call() .call_and_exit() }
yes! Here’s my function if you want ? #[only_owner] #[endpoint(changeCollectionOwner)] fn change_collection_owner(&self, new_owner: Address) { let token = self.sft_token_id().get(); self.send() .esdt_system_sc_proxy() .transfer_ownership(&token, &new_owner) .async_call() .call_and_exit() }