in a second terminal window:
in a third terminal window:
/packages/hardhat/contracts/. When you run this command, Hardhat runs the
deploycommand, which looks at the
./deployfolder for the scripts instructing which contracts to deploy. In this case, we have the
00_deploy_your_contract.jsscript that tells Hardhat how to deploy the
<Contract />component, which given a contract name you have compiled, it will parse it and create a UI for it exposing all the public variables and methods it has. This is very useful when you want to quickly test your contracts but offers no flexibility in terms of good UX.
purposepublic string which anyone can change by calling
setPurpose(string)you are getting an error like this:
yarn chainto launch Hardhat Network, we saw that by default it always uses the same seed phrase. We can use that seed phrase to load those accounts on Metamask. In order to do that, just import the seed phrase / mnemonic in Metamask and configure it so it can connect to the local network you are running.
YourContract.soland watch your app auto update!
yarn deployany time and get a fresh new contract in the frontend