Skip to content

Lesson 5: Brownie SimpleStorage #1716

Answered by cromewar
ManiBharathiSS asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @ManiBharathiSS
Nice question, this depends a lot on the network we are deploying/testing.

On the test we use accounts[0] which is a local ganache account, as the blockchain is locally running on your computer your transaction will not have to wait till the process is done as is instant, so no need to tx.wait().

Regarding why we don't don't wait when deploying, the reason is because the deploy transaction is "special", when you assign
simple_storage = SimpleStorage.deploy(), you won't be able to use the functions on the contract unless the contract is deployed, for example trying to use the store function when the contract does not exists on the blockchain.

So when you deploy a cont…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ManiBharathiSS
Comment options

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