Waffle say hello world tutorial with hardhat and ethers
wafflesmart contractssoliditytestinghardhatethers.js
page-tutorial-undefinedIn this Waffle tutorial, we will learn how to set up a simple "Hello world" smart contract project, using hardhat and ethers.js. Then we will learn how to add a new functionality to our smart contract and how to test it with Waffle.
Let's start with creating new project:
yarn init
or
npm init
and installing required packages:
yarn add -D hardhat @nomiclabs/hardhat-ethers ethers @nomiclabs/hardhat-waffle ethereum-waffle chai
or
npm install -D hardhat @nomiclabs/hardhat-ethers ethers @nomiclabs/hardhat-waffle ethereum-waffle chai
Next step is creating a sample hardhat project by running npx hardhat
.
888 888 888 888 888888 888 888 888 888888 888 888 888 8888888888888 8888b. 888d888 .d88888 88888b. 8888b. 888888888 888 "88b 888P" d88" 888 888 "88b "88b 888888 888 .d888888 888 888 888 888 888 .d888888 888888 888 888 888 888 Y88b 888 888 888 888 888 Y88b.888 888 "Y888888 888 "Y88888 888 888 "Y888888 "Y888👷 Welcome to Hardhat v2.0.3 👷? What do you want to do? …❯ Create a sample projectCreate an empty hardhat.config.jsQuit모두 보기
Select Create a sample project
Our project's structure should look like this:
1MyWaffleProject2├── contracts3│ └── Greeter.sol4