Delegate Call to UpgradeabilityProxy

Hi,

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,

address(B).delegatecall(signature)

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?

Thanks

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 @Yoshiko

The proxy contract is https://etherscan.io/address/0x6C3c78838c761c6Ac7bE9F59fe808ea2A6E4379d

And I tried to send the delegate call to the implementation, I think it’s this one https://etherscan.io/address/0x4e750a23ddd33e2b977b19dbd014c764f074e3c2

But with no luck.

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

Thanks!

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