Just need more clarity on response
and receipt` functions
#2504
-
Hi! I understand how these line of codes are written.
however want to understand what if we don't pass anything in thank-you so much in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 15 replies
-
@MasterofBlockchain : You can also do it just like : So, You are not waiting for any blocks to mine. But, If you wanna wait for any particular amount of blocks to mine before your tx went through then you can do :
Hopefully, It helps you to understand! |
Beta Was this translation helpful? Give feedback.
-
Hey @MasterofBlockchain why don't you try not putting anything inside Hint: It still works but the best way to know and learn would be to do it yourself. So next time if you come across something like you do it yourself first, go through the documentation and see what |
Beta Was this translation helpful? Give feedback.
Hey @MasterofBlockchain why don't you try not putting anything inside
wait()
and see if it works or doesn't. That's the best way you will learn. Not everything will be available on the web for you to learn, sometimes you have to tinker and experiment with things yourself. That's the approach I use and it is very effective. I highly recommend. To experiment yourself, you could add aconsole.log(txReceipt)
afterconst txReceipt = await txResponse.wait(1)
and see if you get something back. Then try again whenwait()
is empty and see if you still get thetxReceipt
back. That's how you experiment and learn.Hint: It still works but the best way to know and learn would be to do it yourself. So …