The admin of that proxy is https://polygonscan.com/address/0x8cfc0974780dDa5D754FFc52C00184d52994B3BE
Hello! how did you find this admin's address?
The admin of that proxy is https://polygonscan.com/address/0x8cfc0974780dDa5D754FFc52C00184d52994B3BE
Hello! how did you find this admin's address?
This can be found by using erc1967.getAdminAddress(proxyAddress)
from the Hardhat Upgrades plugin.
Thanx for reply but I've already tried that before.
My proxy-contract:
My proxy-admin contract:
(Found it by using:
const res = (await upgrades.admin.getInstance()).address;
console.log(res);
// output: 0xE05B69bf685DB7F8b4bF04f3B87563d6159733Fc
)
So the next step, according to your advice:
const res = await upgrades.erc1967.getAdminAddress("0xF834E734C9Ba0A7953aE56510483C3E81bFeEd79");
console.log(res);
// output: 0x0000000000000000000000000000000000000000
Or (just in case):
const res = await upgrades.erc1967.getAdminAddress("0xE05B69bf685DB7F8b4bF04f3B87563d6159733Fc");
console.log(res);
// output: 0x0000000000000000000000000000000000000000
And now I haven't any idea where I can get address of Proxy Admin to change it
The erc1967.getAdminAddress(proxyAddress)
function should be called using the proxy address as input.
But the issue here is that your proxy is a UUPS proxy, which does not have the concept of a proxy admin. For a UUPS proxy, when your implementation extends UUPSUpgradeable
, the upgradeability is restricted to whoever is allowed to call the _authorizeUpgrade
function of your implementation.
thank you a lot, because I spent couple hours of searching