Changing of the contract administrator is done in 2 steps:
- 1.Current administrator should transfer his rights to a new administrator.
- 2.A new administrator must accept his new role. If he didn't accept a new role, the previous administrator continues to be an administrator of this contract.
const tFarmAddress = "KT1...";
const admin = "tz1...";
const tFarm = await tezos.contract.at(tFarmAddress);
const operation = await tFarm.methods.set_admin(admin).send();
senderof the transaction is not current administrator.