( network: string, fromBlock: string, recipient: string | undefined, mnemonic?: string )
| 97 | } |
| 98 | |
| 99 | export async function awaitBridgedToLayer2( |
| 100 | network: string, |
| 101 | fromBlock: string, |
| 102 | recipient: string | undefined, |
| 103 | mnemonic?: string |
| 104 | ): Promise<void> { |
| 105 | let web3 = await getWeb3(network, mnemonic); |
| 106 | let tokenBridge = await getSDK('TokenBridgeHomeSide', web3); |
| 107 | recipient = recipient ?? (await web3.eth.getAccounts())[0]; |
| 108 | |
| 109 | let blockExplorer = await getConstant('blockExplorer', web3); |
| 110 | |
| 111 | console.log(`Waiting for bridging to complete for depot owner ${recipient} from block ${fromBlock}...`); |
| 112 | let result = await tokenBridge.waitForBridgingToLayer2Completed(recipient, fromBlock); |
| 113 | console.log(`Bridging transaction hash: ${blockExplorer}/tx/${result.transactionHash}`); |
| 114 | } |
no test coverage detected