Alchemy: Create a Hello World Smart Contract
Learn how to create and deploy a simple hello world smart contract.
What is a Smart Contract?
1. First, download and install S3FS-FUSE on your local environment.
2. Set up an Access Key file for use with S3FS-FUSE.
3. Mount your bucket.
4. Now, navigate into the mounted Filebase bucket.
5. Then, create a new folder for your project and navigate into that folder:
7. From the Alchemy dashboard, we need to create an app.

8. Create a new app.

9. Then, from your App’s page, select ‘View Key’:

10. Copy your app’s HTTP Key:

11. Next, head over to the Göerli Faucet and send your wallet some fake ETH to use:

12. Check your wallet to make sure your faucet request was successful.
13. Now that we have everything we need for our project, let’s get started writing our smart contract.

14. Download and install Hardhat into your project directory:
15. Next, create a Hardhat project with the command:

16. Next, create two folders in your project directory with the commands:
17. Now it’s time to write the smart contract.
18. Next, install the dotenv package with the command:
dotenv package with the command:19. Then, create a new file called .env with the following content:
.env with the following content:20. Next, install the Ethers.js library with the following command:
Ethers.js library with the following command:21. Open the hardhat.config.js file in your code editor.
hardhat.config.js file in your code editor.22. Now it’s time to compile our contract. Run the command:
23. Then it’s time to deploy our contract.
24. Now, run the newly created deploy.js script to deploy your smart contract:
deploy.js script to deploy your smart contract:25. Now, go to the Ropsten etherscan website.


26. You can also navigate to your Alchemy app, where you’ll see some detailed information about the transaction from this view as well:

Last updated