Challenge: Create a Contract

Test your understanding by creating a contract in Solidity and writing a run script for it.

Problem statement

For this challenge, write a small contract called Hello using Solidity version 0.8.4 that would console.log “Hello World” when deployed. Also, write a main function for a Hardhat run script that would load a contract called Hello World and deploy it.


There is no input for this challenge.


The program will display “Hello World” on the console.

Try it yourself

Write the code for the contract in the contracts/contract.sol file and the run script in the scripts/run.js file. Click the “Run” button in the code widget below to test your solution:

Get hands-on with 1200+ tech skills courses.