wighawag / hardhat-deploy

hardhat deployment plugin
MIT License
1.17k stars 283 forks source link

Programatic deployment of Diamond #464

Open hickscorp opened 1 year ago

hickscorp commented 1 year ago

We are using hardhat-deploy within hardhat tasks to deploy diamonds-organized contracts with a deterministic salt, so a given diamond with the same init parameters is always deployed at the same address (deployer factory pattern). I am aware that this question is not hardhat-diamond specific... But it seems to me that the knowledge of the prople involved might be on point.

Is there a known approach on how to deploy a diamond programatically from the browser? I'm assuming that there would be a need for a backend who keeps track of the various artifacts and their already deployed addresses (facets etc). Or would there be another way of doing that, eg using solidity directly, or not needing a backend?