Is it possible to customize AdminUpgradeabilityProxy?

Hi!

We have a contract system using openzeppelin/upgrades v2.8 and use the upgradeable proxy for most of the contracts. Nevertheless we found we would like to change, in some particular case, the proxy default behavior (in order to avoid to proxy fallback calls triggered by transfers received).

Is it possible to, in some particular contract deploy, specify a different proxy? (which will be an AdminUpgradeabilityProxy)

Is there any resource available about this?

Thanks in advance
david

1 Like

Hi David (@tenuki),

Welcome to the community :wave:

You may want to migrate existing projects from @openzeppelin/upgrades to OpenZeppelin Upgrades Plugins.
See: Building for interoperability: why we’re focusing on Upgrades Plugins

If you were deploying using the OpenZeppelin CLI you can migrate to Upgrades Plugins using the migration tool: https://docs.openzeppelin.com/upgrades-plugins/1.x/migrate-from-cli


Proxy contracts are also part of OpenZeppelin Contracts: https://docs.openzeppelin.com/contracts/3.x/api/proxy


Can you describe a bit more your use case and what customization you want to make?

Hello and Thanks, @abcoathup !

Perhaps we should migrate but it doesn’t seems like an option at the moment. :frowning:

Our use case is simple, we have this (proxyed) contract which is part of a set of components which connects among them. It doesn’t really matter what the components do, but what actually matters is that it have to interact with an external (out of our scope) contract (a basecoin wrapper) and call its withdraw, which finally calls a transfer(…) to us. We reached this problem: Msg.sender.transfer runs out of gas on a payable upgradeable proxy contract and thought it would be useful for us to prevent the transfer callback: fallback to be proxied.

At the moment, if we continue with the option to use a custom (fallback blocking) proxy, seems to be to deploy it by hand and then configure it point to the implementation (also deployed by hand).

But I would prefer to use the standard createProxy(…) functions…

Thank you!

1 Like

Hi @tenuki,

I assume that you can’t setup your system so the withdraw goes to a new, simple, non-upgradeable contract such as a vault contract, that you can sweep or withdraw in another transaction?.

You can create your own custom proxy. You would need to run your own custom deployment, as neither the SDK nor the Upgrade Plugins support custom proxy contracts. Though you could use the Upgrade Plugins for locally testing your upgrades