Skip to content

Commit

Permalink
Document --sender as part of the tutorial for forge script (#1314)
Browse files Browse the repository at this point in the history
* document --sender as part of the tutorial for forge script

* clean up
  • Loading branch information
zerosnacks committed Sep 23, 2024
1 parent 3d22aba commit 06afa8c
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, the default Foundry sender (`0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38`) is attempted to be 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 06afa8c

Please sign in to comment.