Skip to content

Lesson 6: understanding wait and deployed #2771

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

You must be logged in to vote

@NotNotRama SimpleStorageFactory.deploy() deploys the actual contract which the ContractFactory instance represents.

contract.deployTransaction.wait(1) Here, .wait(<insert number>) the number represents the number of blocks you want to "wait" (for them to be mined). 1 means we are waiting for one block (to be mined).

simpleStorage.deployed() Here, .deployed() serves as a "progress-checker", one which will pass once simpleStorage is deployed.

For example, xyzContract.deployed will wait until xyzContract is deployed and will return true once deployed. So, it serves for a confirmation for the contract to be deployed.

Replies: 2 comments 3 replies

Comment options

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

@RoboCrypter
Comment options

@RoboCrypter
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by NotNotRama
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants