Vanclief / foundry-tutorial

Minimalistic tutorial on how to get started with foundry

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

foundry-tutorial

Basic tutorial on how to get started with testing and deployment on foundry

Prerequisites

  1. Install foundry

  2. Clone this repo

  3. Create an alchemy account and create a new Goerli App

  4. Get some Goerli tokens from a faucet.

  5. Create an Etherscan account

Challenges

Testing a Smart Contract

  1. Execute forge test to run the tests
  2. Add another test to FoundryToken.t.sol that checks that the symbol of the token is FTK
  3. Add another test to check that when transfering tokens from alice to bob the tokens are actually transfered and that alice balance is reduced by the amount of tokens transfered.

hint: You can use forge test -vv to see a more detailed output of the tests.

hint: You can create an array of user accounts with address payable[] memory users = utils.createUsers(2);

Step by step solution

Deploying a Smart Contract

  1. Deploy and verify the FoundryToken to Goerli.

Step by step solution

Resources

About

Minimalistic tutorial on how to get started with foundry

License:The Unlicense


Languages

Language:Solidity 99.9%Language:Makefile 0.1%Language:Nix 0.0%