🧪 When you want to deploy copies of a smart contract from the frontend.
-
Deploy YourContract and Factory contracts with hardhat.
-
From the frontend Next app, create new Clones from the Factory contract. Now check out the Debug Clones page.
-
The Select Clone Contract dropdown menu will allow you to select from a list of all Clones that were created from the Factory contract and interact with read and write functions.
You can create additional logic to set the contract owner to the user that calls the cloneContract function or require a fee to create a clone. Clones are the EASIEST way to implement copies of contracts but the LEAST GAS EFFICIENT. Check out my Proxy build next for cheaper contract copies that are created from a frontend web app. COMING SOON...