Skip to content

Commit

Permalink
document --sender as part of the tutorial for forge script
Browse files Browse the repository at this point in the history
  • Loading branch information
zerosnacks committed Sep 23, 2024
1 parent 3d22aba commit 6b1608c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/tutorials/solidity-scripting.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,12 @@ NFT nft = new NFT("NFT_tutorial", "TUT", "baseUri");

Here we have just created our NFT contract. Because we called `vm.startBroadcast()` before this line, the contract creation will be recorded by Forge, and as mentioned previously, we can broadcast the transaction to deploy the contract on-chain. The broadcast transaction logs will be stored in the `broadcast` directory by default. You can change the logs location by setting [`broadcast`](../reference/config/project.md#broadcast) in your `foundry.toml` file.

The broadcasting sender is determined by checking the following in order:

1. If `--sender` argument was provided, that address is used.
2. If exactly one signer (e.g. private key, hardware wallet, keystore) is set, that signer is used.
3. Otherwise, default foundry sender (1804c8AB1F12E6bbf3894d4083f33e07309d1f38) is used.

Now that you’re up to speed about what the script smart contract does, let’s run it.

You should have added the variables we mentioned earlier to the `.env` for this next part to work.
Expand Down

0 comments on commit 6b1608c

Please sign in to comment.