Replies: 2 comments
-
What would library level support look like? This is something I think could easily be handled by an ancillary library, no? |
Beta Was this translation helpful? Give feedback.
-
Maybe, I was hoping to kickstart a discussion around it as the steps that ethers takes before actually submitting (even raw txs) might not be workable by any higher level library. Case in point, here's a very recent example of this problem (and one author's workaround to it): wighawag/hardhat-deploy#72 (comment) In our case the ancillary library would be hardhat-deploy, a crucial plugin on top of the Hardhat framework, all that would be needed is a way for us to successfully send UncheckedTransactions to the Diamond address, carrying calldata encoded from another contract ABI (a Facet) which the Diamond itself cannot possess. Here's a successful way to achieve that using Truffle and Web3, from the reference implementations:
Update: This can be achieved in exactly the same native way in Ethers:
However, I would also like to know a way to do it without instantiating and connecting to the Contract instances, in a more raw way like I attempted here: https://github.com/ARM-Finance/kingmaker/blob/c0aca060476b9ff0d7448fb7c5f2d8ce18305cda/protocol/deploy/governance/02_kingmaker_governance_facet.ts#L51-54 but failed due to this portion: https://github.com/ARM-Finance/kingmaker/blob/c0aca060476b9ff0d7448fb7c5f2d8ce18305cda/protocol/libs/CrownHelper.ts#L27-30 In any case and finally, I opened this thread because I also wanted to bring to your attention the standard in case you didn't hear of it yet, and because I see that ethers has indeed special support for key Ethereum standards like: https://docs.ethers.io/v5/single-page/#/v5/api/contract/example/-%23-example-erc-20-contract--connecting-to-a-contract--erc20contract |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The Diamond Standard is an emerging standard to provide smart contracts with the right amount of modularity and cohesion, with a built-in, flexible upgrade mechanism at the center. The Standard also introduces the "Diamond Storage", a storage pattern that is well suited for proxy contracts and diamonds alike as it greatly simplifies organizing and using state contract variables.
Some introductions:
The reference implementations: https://github.com/mudgen/diamond
The EIP: https://eips.ethereum.org/EIPS/eip-2535
I propose that the ethers.js team considers introducing early support for the Diamond Standard at the library level
Official Discord server for the Diamond Standard: https://discord.gg/y9EWSVBS7C
Beta Was this translation helpful? Give feedback.
All reactions