Delegate Call to UpgradeabilityProxy


I’m trying to create a contract A that contains a function fA that call other contract B function fB, passing the msg.sender that initiate the transaction. The idea was to use a simple delegatecall to it,


But the contract B is a InitializableImmutableAdminUpgradeabilityProxy, so when the delegate call execution, the context is not reaching the B implementation but the B proxy, and the delegate function is not working, always returns success but assume that is because the fallback.

Is there any way to delegate the call in the contract A to the contract B using the proxy? How can I send the tx to the contract B maintaining the msg.sender that originate the transaction?


1 Like

You have Contract A and Contract B. Contract B is the proxy.

There should be a Contract C, which is the implementation contract, behind Contract B.

Try the address of the implemented contract. If you need some help with figuring that out, link your contracts on etherscan or bscscan and we can try to help figure out that address.

1 Like

Thanks for your help @Tsushima_Yoshiko

The proxy contract is

And I tried to send the delegate call to the implementation, I think it’s this one

But with no luck.

Is there any way to get the implementation address calling a function on the proxy address?


1 Like

Yep that’s your implementation and if you tried with that address, I’m not sure what to do here. Usually when you call the proxy to do something, it goes automatically to the implementation. So I’m stumped, perhaps someone else can answer that has experience with delegatecall

1 Like

A post was split to a new topic: Pass my delegated call to another proxy