waitForTxConfirmation method
Implementation
Future<bool> waitForTxConfirmation(
String hash, {
Duration interval = const Duration(seconds: 5),
}) async {
while (true) {
await Future.delayed(interval);
final receipt = await performTask(
(client) => client.getTransactionReceipt(hash),
);
switch (receipt?['status']) {
case '0x1':
return true;
case '0x0':
return false;
default:
}
}
}