transferProxyAdminOwnership results in Ownable: caller is not the owner

Following this tutorial verbatim for deploying an upgradeable contract and then delegating authority to a Gnosis Safe results in an error on Rinkeby.

This forum keeps throwing an error saying I’m not allowed to post more than 2 links for some reason, so I’m putting the content in this pastebin: https://pastebin.com/CMFpDHgY

1 Like

Hi @sean,

The ProxyAdmin contract is Ownable.

I want to try it out but I recommend separating the deploy and the transfer of ownership into two separate scripts.

I suggest you look at not using the ERC20 Preset Minter Pauser contract, instead you should create your own based on the Preset which takes in the address that you want to use for roles as parameters to the initializer, rather than granting and revoking in the constructor. I recently created an issue for this purpose: https://github.com/OpenZeppelin/openzeppelin-contracts/issues/2422

Hi @sean,

There is one ProxyAdmin contract per network per project (see: https://docs.openzeppelin.com/upgrades-plugins/1.x/faq#what-is-a-proxy-admin).

If you transfer ownership of the ProxyAdmin to a Gnosis Safe, all subsequent deployments of upgradeable contracts from that project will use that one ProxyAdmin. To upgrade any of the contracts you will need to do so via the Gnosis Safe (either the OpenZeppelin app in Gnosis Safe or OpenZeppelin Defender). You can still deploy from that project.

The ProxyAdmin (and your implementation contracts) are recorded in the <network_name>.json file in the .openzeppelin directory. See the documentation for details: https://docs.openzeppelin.com/upgrades-plugins/1.x/network-files

Hi @sean,

If I understand correctly, you had already transferred ownership of the ProxyAdmin and the issue occurred when you tried to do this again when it was already transferred.

I recommend separating out the deployProxy from the transfer of ownership of the ProxyAdmin, as you should only transfer the ProxyAdmin once, whilst you can deploy multiple proxies if required.

Hi @sean,

Just wanted to check if you needed any more information?