Do deploy scripts cost ETH? #2563
Answered
by
onbjerg
dino-rodriguez
asked this question in
Help
|
If I have a forge deploy script that stores its own state (such as an array), does this increase my deploy cost? Or is it only for the transactions that actually call the contract? I am basically deploying a contract and uploading data to it. And I am using a cheat code to read from file and store that in an array in the deploy script before uploading that array, and I'm wondering if this costs money. |
Answered by
onbjerg
Aug 3, 2022
Replies: 1 comment 1 reply
|
The script itself is run on an in-process EVM. The only thing that incur transaction fees are transactions that are broadcasted, so any external call or deployment affected by So no, internal state such as arrays or mappings in your script do not affect transaction costs :) |
1 reply
Answer selected by
onbjerg
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The script itself is run on an in-process EVM. The only thing that incur transaction fees are transactions that are broadcasted, so any external call or deployment affected by
vm.broadcastorvm.startBroadcastSo no, internal state such as arrays or mappings in your script do not affect transaction costs :)