First you'll need to get node/npm. If you don't have it click here.
Warning: Recommend you install at least node v15.Now go to the terminal and type the following commands:
Warning: Do not use the GitBash terminal
mkdir my-first-smart-contract
cd my-first-smart-contract
npm init -y
npm install --save-dev hardhat
Now let's install the Hardhat with the command:
npx hardhat
Warning: In case od error, use this command:yarn add hardhat
Choose the option create a sample project and agree with all the questions.
The sample project will ask you to install hardhat-waffle and hardhat-ethers. Install the dependencies with the command:
npm install --save-dev @nomiclabs/hardhat-waffle ethereum-waffle chai @nomiclabs/hardhat-ethers ethers
After that, you will run the command:
npx hardhat accounts
and it should print a lot of addresses like this:
0xa0Ee7A142d267C1f36714E4a8F75612F20a79720
These are addresses that Hardhat generates to simulate users on the Blockchain.After that we will see if everything is working, run the command:
npx hardhat compile
Then this command:
npx hardhat test
That's it, your project is configured to create Smart Contracts with Ethereum! 🎉🎉
Top comments (1)
Muito bom, objetivo e simples, fera!