How to wait for the tx confirmation in zkSync?
I'm writing a small contract ro swap 2 tokens using zkSync and Hardhat. Here's how I deploy test tokens:
await tokenA.approve(router.address, await tokenA.totalSupply())
await tokenB.approve(router.address, await tokenB.totalSupply())
//TODO: await here
await router.addLiquidity(tokenA.address, tokenB.address, 1000000
I heard that zkSync is forming a block of tx's and confirm them in eth only after block fully set. Is it true? How should I properly wait for end of this block confirmation?
I'm using await setTimeout(30000);
but it does not look like a proper way of doing it.