You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some contracts use a pattern similar to an upgradeable proxy, but where the implementation doesn't exist in a single contract but in multiple contracts instead. One of the reasons for doing this is to avoid the contract size limit.
The most well-known pattern that does this is the Diamond pattern, but there are systems with their implementation of something similar (e.g., The Graph and Synthetix).
You can now deploy such a system with Ignition, but you can't express a contractAt that combines all the different implementations.
I think this snippet illustrates the problem:
constproxy=m.contract('DiamondLikeProxy');constimplementation1=m.contract('Implementation1');constimplementation2=m.contract('Implementation2');// Somehow set the implementationsconstproxyWithCombinedAbi=m.contractAt(?????,proxy)// Which contract name do we use?
As a workaround, you can do multiple contractAts, depending on how you need to interact with the contact, but that's really inconvenient.
Search terms
modules, diamond, proxy
The text was updated successfully, but these errors were encountered:
Describe the feature
Some contracts use a pattern similar to an upgradeable proxy, but where the implementation doesn't exist in a single contract but in multiple contracts instead. One of the reasons for doing this is to avoid the contract size limit.
The most well-known pattern that does this is the Diamond pattern, but there are systems with their implementation of something similar (e.g., The Graph and Synthetix).
You can now deploy such a system with Ignition, but you can't express a
contractAt
that combines all the different implementations.I think this snippet illustrates the problem:
As a workaround, you can do multiple
contractAt
s, depending on how you need to interact with the contact, but that's really inconvenient.Search terms
modules, diamond, proxy
The text was updated successfully, but these errors were encountered: