How does upgrades.admin.transferProxyAdminOwnership know which proxy to work with?


I have been googling and looking through the documentation, but the answer seems to have evaded me thus far.

Situation which was tested:

  • I deployed an upgradable multisig wallet.
  • Subsequently, I pass the admin ownership to the multisig itself:
        await upgrades.admin.transferProxyAdminOwnership(
  • The test passes with: ✔ 0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0 (transparent) proxy ownership transfered through admin proxy

However, the admin object was imported from upgrades. How does it know which is the proxy for which I want to transfer ownership?

The Upgrades Plugin keeps track of the admin in its network file. Currently the plugin only supports one admin for all transparent proxies (there is a related PR to improve this), so transferProxyAdminOwnership always affects the same admin.

1 Like