confirmTx method
Implementation
Future<Contract> confirmTx(
{int maxAttempts = 20, int interval = 1000}) async {
try {
await this.transaction!.confirm(
txHash: this.transaction!.transactionID,
maxAttempts: maxAttempts,
interval: interval);
if (this.transaction!.receipt == null ||
!this.transaction!.receipt!['success']) {
this.setStatus(ContractStatus.REJECTED);
return this;
}
this.setStatus(ContractStatus.DEPLOYED);
return this;
} catch (error) {
rethrow;
}
}