Skip to content

This repo contains the code for my Foundry Blog published on Dev.to and Hashnode. The contract is replicated from my Chainlink VRF blog repo while including the nuances of Foundry

Notifications You must be signed in to change notification settings

abhik-99/Foundry-Blog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fun with Foundry and Fuzzing

This repo contains the code for my blog post on how to use Foundry to

  1. Develop Contract.
  2. Write Tests in Solidity (instead of ChaiJS).
  3. Deploy the Contract.

If you wish to follow along I would suggest you browse over to my article published on dev.to . To deploy the contract you need to have Linux or WSL. Make sure to change the environment variables to your required values before following the instructructions below:

  1. Run source ./env.sh to set the required Environment Variables.
  2. Run forge create --rpc-url $ETH_RPC_URL --constructor-args <CONTRUCTOR ARGUMENTS for your CONTRACT> --private-key $PRIVATE_KEY <CONTRACT NAME> --verify.

Note:

  1. The --verify flag needs to have ETHERSCAN_API_KEY variable set. This is done through step 1.
  2. The contract name should be without the .sol extension. For eg., if contract name is Test.sol and the contract inside it is called Test, then you need to pass Test in the contract name space in the above command.

About

This repo contains the code for my Foundry Blog published on Dev.to and Hashnode. The contract is replicated from my Chainlink VRF blog repo while including the nuances of Foundry

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published