Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to initialize a new Hardhat project.
Blockchain / Solidity
npx hardhat [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'create' or 'start' instead of 'init'.
✗ Incorrect
Use npx hardhat init to initialize a new Hardhat project.
2fill in blank
mediumComplete the code to compile contracts using Hardhat.
Blockchain / Solidity
npx hardhat [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'deploy' or 'test' instead of 'compile'.
✗ Incorrect
The compile command compiles Solidity contracts in Hardhat.
3fill in blank
hardFix the error in the Hardhat config file to specify the Solidity version.
Blockchain / Solidity
module.exports = {
solidity: '[1]'
}; Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Leaving the version unquoted or adding extra keys.
✗ Incorrect
The Solidity version must be a string in quotes, like '0.8.0'.
4fill in blank
hardFill both blanks to run a local Hardhat node and deploy contracts.
Blockchain / Solidity
npx hardhat [1] & npx hardhat [2]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'test' or 'compile' instead of 'run' for deployment.
✗ Incorrect
Use node to start the local blockchain and run to deploy scripts.
5fill in blank
hardFill all three blanks to connect Remix IDE to a local Hardhat node.
Blockchain / Solidity
In Remix, select [1] environment, set the [2] URL to http://localhost:[3].
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'Injected Web3' or wrong port number.
✗ Incorrect
Use the Web3 Provider environment in Remix and set the URL to http://localhost:8545 to connect to Hardhat.