0

I am planning to implement a Proxy pattern for my smart-contracts. And I want to make sure I understood it's use-case right.

In short: User only needs to know about Proxy contract address, and by sending calls to it, he will be able to use the functionality written in the Implementation contract. That way, whenever I release a new version of Implementation and I set its new address inside the Proxy the user will automatically have access to the latest version of Implementation contract.

Proxy Pattern

This saves me from the trouble of having to inform the user of the new Implementation address. And also, (and this is crucial). If the user is relying on web3 frameworks that require contract ABI's to know how to communicate with the said contracts, the user doesn't actually need a new Implementation contract ABI. As he is only ever using the old Proxy contract ABI no matter my Implementation updates ??

In essence, I save myself from the trouble of updating ABI's too, right?

1 Answer 1

1

Short answer is no, the proxy contract will always have the same ABI, but certain explorer will let you pair proxy to implementation and show available functions from there.

Let's take Etherscan as an example, I've deployed this proxy: 0x5DC1460373F0341963a01393bf0c475fC99d8209 on rinkeby, I've already upgrade it once and the ABI didnt change, but if you go to the Contract section->more options->Is this a proxy? a screen to verify the implmentation contract will show up, just click on verify and it will update the way it reads the proxy contract. enter image description here Note that for this to works you should have gotten your implementation contract verified on etherscan.

And now you can see the contract from the proxy and the explorer shows you that this comes from an abi of the implementation contract: enter image description here And will let you see the previous implementation.

2
  • I am somewhat confused by this answer. (Short answer no). You are saying I will have to update my ABI's in regards to Implementation contract ?
    – Sky
    Jun 17, 2022 at 9:40
  • No, you cant possibly update the abi of a deployed contract, but if you take the abi from a thrid part, like the etherscan explorer you might not have to do so since it recognizes is a proxy and just shows the available functions of the current implementation contract. it all depends n how you willl be using the abi
    – Julissa DC
    Jun 17, 2022 at 11:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.