Why does upgrades.deployProxy sometimes only deploy two contracts?

on sepolia, I deployed a contract and it deployed the expected three contracts

Since I messed it up, I fixed the code and redeployed from a new key/address

This time it only deployed two contracts (no ProxyAdmin)

When I went to deploy the same on mumbai, it deployed three contracts again.

Any idea why ?

This means that the TransparentUpgradableProxy has different addresses on each chain

When you redeployed the second time on Sepolia it reused the same ProxyAdmin instance.

When you deployed on Mumbai, it needed a new ProxyAdmin instance.

Is there any way to force it to deploy the proxyAdmin - or deploy that first / separately?

It seemed odd because they were deployed by different EOA's

Check the .openzeppelin folder, it contains the configuration settings for your deployed contracts.

One of them will contain the information for your proxyadmin which you can then delete to redeploy it.

1 Like

You can deploy a proxy admin separately using deployProxyAdmin if there isn't one already registered in the network file.