DEV Community

Discussion on: The Complete Guide to Full Stack Ethereum and EVM Development

Collapse
 
zoiecheng profile image
Zoie Cheng

Hi,
one question about
...
const transaction = await contract.setGreeting(greeting)
await transaction.wait()
in setGreeting() of App.js
I can understand contract.setGreeting might be asynchronous so it needs to be 'awaited'
But what is transaction.wait() doing? why does it also need to be 'awaited' ?