Skip to content

Proxy pattern - Good practices and SOC #521

Answered by ericnordelo
bal7hazar asked this question in Q&A
Discussion options

You must be logged in to vote

You probably shouldn't implement functions related to the business logic of your dApp in the proxy because the general idea of it is to redirect calls (like in EIP-1167).

But, sometimes, you want some logic in the proxy related to extra functionality, like functions providing upgradeability of the implementation contract. Then you have a new issue: clashes between proxy and implementation functions. This can be solved in different ways, with some Pros and Cons that are out of the scope of this answer, but I recommend you to check Transparent Proxies and UUPS for upgrades.

getImplementationHash in the implementation results from using the UUPS proxy pattern.

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
1 reply
@bal7hazar
Comment options

Answer selected by bal7hazar
Comment options

You must be logged in to vote
4 replies
@bal7hazar
Comment options

@martriay
Comment options

@bal7hazar
Comment options

@martriay
Comment options

Comment options

You must be logged in to vote
1 reply
@martriay
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants