Install and Initialize a Foundry Application

Noah Hein
InstructorNoah Hein
Share this video with your friends

Social Share Links

Send Tweet
Published 2 years ago
Updated 2 years ago

We will learn about how to install foundry, and initialize your project using the forge command line utility.

After creating a new project, we'll learn about the high-level architecture of a forge application.

Here is the documentation on how to install Foundry.

Instructor: [0:02] Foundry, as you can see here, is considered a smart contract element toolchain, which means that it allows you to easily create workflows for writing your contracts, deploying them, and testing them. [0:18] To install Foundry, you can go to the Get Started tab. They will have different commands for all of the different platforms. For me, since I am on Mac, we can just copy this command. Then, we can go over here and paste it. That will install it.

[0:34] Then, what we want to do is we can run foundry up to install our project. Then, wherever you want to create your project, you can run forge init. I will call our project forge egghead. Here, you can see that forge has created a scaffold project for us.

[1:02] What we will be really working on is out of the source and the test folders. Source is where your smart contracts will go. You can see here that this is just an empty smart contract that needs to be filled out with functionality.

[1:17] Then, there's a test contract that inherits the test contract that forge gives us, along with some other nice functionality for writing tests that we will dig into.

[1:28] There's also this lib folder that we will not be making use of in this course, but is worth digging into as you level up in your smart contract writing skills.

[1:38] Whenever you import third-party libraries for various bits of functionality into forge, they will go in your lib folder, and you will import them in your smart contracts through there.

egghead
egghead
~ 50 minutes ago

Member comments are a way for members to communicate, interact, and ask questions about a lesson.

The instructor or someone from the community might respond to your question Here are a few basic guidelines to commenting on egghead.io

Be on-Topic

Comments are for discussing a lesson. If you're having a general issue with the website functionality, please contact us at support@egghead.io.

Avoid meta-discussion

  • This was great!
  • This was horrible!
  • I didn't like this because it didn't match my skill level.
  • +1 It will likely be deleted as spam.

Code Problems?

Should be accompanied by code! Codesandbox or Stackblitz provide a way to share code and discuss it in context

Details and Context

Vague question? Vague answer. Any details and context you can provide will lure more interesting answers!

Markdown supported.
Become a member to join the discussionEnroll Today