Changing Your Pool's Owner
The "CONTROLLER" key stands for the owner of the ID of a given staking pool.
const getBytes32 = (key) => {
return ethers.utils.formatBytes32String(key);
};
const owner = Portal.readAddressForId(id, getBytes32("CONTROLLER"))
This might be a developer's address, a developers' multisig, or a token address.
Portal.changeIdCONTROLLER(uint256 id, address newCONTROLLER)
Since the Withdrawal Contracts do not trust Portal, you will need to transfer its ownership as well.
const getBytes32 = (key) => {
return ethers.utils.formatBytes32String(key);
};
const wcAddress = Portal.readAddressForId(id, getBytes32("withdrawalContract");
await wcAddress.changeController(newController);
If your Pool's Owner is not the Withdrawal Pool's Owner, it will go into Recovery Mode until you change it's ownership:
After changing your CONTROLLER, you will not be able to take this action back by using your old CONTROLLER address.
Last modified 6mo ago