Hi guys,
This is my first post on the forums. I tried to search around but I wasn't able to find a discussion regarding this issue i'm having.
I have 2 uups upgradeable contracts. The structure is pretty simply as follows:
proxy1 -> implementation1
proxy2 -> implementation2
Both implementations has a function defined, called myFunction
.
FYI: I am using the recommended @openzeppelin/hardhat-upgrades
plugin
Problem:
Calling proxy2.implementation2.myFunction()
from proxy1.implementation1.myFunction()
. This throws an execution error
.
Deployment and running the above scenario locally works just fine. I started to hit this issue when I pushed my code up to Ropsten.
I am unable to find out what the exact issue is because Ropsten doesn't really show you the stack trace.
I am able to call proxy1.implementation1.myFunction()
and proxy2.implementation2.myFunction()
directly without any issues on Ropsten. Just unable to call once upgradeable contract function from another.
Code to reproduce
How I make the call inside proxy1.implementation1.myFunction()
:
Proxy2ContractInstance('0x-proxy2-contract-address').myFunction()
As mentioned above, running above works just fine locally
Looking at the Ropsten transaction call trace. I can see proxy1.implementation1.myFunction()
is called, then it invokes proxy2.implementation2
, the function proxy1.implementation1.myFunction()
is never called, and then the call fails
Wondering if there is a limitation with communicating between 2 uups proxies?
Environment
Ubuntu / Harthat / Solicity v0.8.12