Skip to content

Lesson 7: Understanding interactions #296

Answered by PatrickAlphaC
NotNotRama asked this question in Q&A
Discussion options

You must be logged in to vote

So run is only called when we call the script from the command line, in our tests here, we actually never call it!

forge script path/to/your/file.sol

^ This is the command that will call run. In our tests we don't bother.

On your other question, this is where the "magic" of forge scripting happens. Whatever the private key is being used to run the test sends the value. In forge test, it magically creates some fake accounts for you that have value in them to start.

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@NotNotRama
Comment options

@PatrickAlphaC
Comment options

Answer selected by NotNotRama
@NotNotRama
Comment options

@NotNotRama
Comment options

@Elldees
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants