File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed
src/Packages/Passport/Runtime/Scripts/Private/Model/Response Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -413,7 +413,21 @@ public async void GetZkTransactionReceiptStatus()
413
413
ShowOutput ( $ "Getting zkEVM transaction receipt status...") ;
414
414
415
415
TransactionReceiptResponse response = await passport . ZkEvmGetTransactionReceipt ( ZkGetTransactionReceiptHash . text ) ;
416
+ string status = "Transaction receipt status: " ;
416
417
ShowOutput ( $ "Transaction receipt status: { ( response . status == "0x1" ? "Success" : "Failed" ) } ") ;
418
+ switch ( response . status )
419
+ {
420
+ case "0x1" :
421
+ status += "Success" ;
422
+ break ;
423
+ case "0x0" :
424
+ status += "Failed" ;
425
+ break ;
426
+ case null :
427
+ status += "Still processing" ;
428
+ break ;
429
+ }
430
+ ShowOutput ( status ) ;
417
431
}
418
432
catch ( Exception ex )
419
433
{
Original file line number Diff line number Diff line change @@ -21,7 +21,18 @@ public class TransactionReceiptResponse
21
21
public string logsBloom ;
22
22
23
23
/// <summary>
24
- /// Either 1 (success) or 0 (failure) encoded as a hexadecimal.
24
+ /// Possible reponses:
25
+ /// <list type="bullet">
26
+ /// <item>
27
+ /// <description>Success: 0x0</description>
28
+ /// </item>
29
+ /// <item>
30
+ /// <description>Failure: 0x0</description>
31
+ /// </item>
32
+ /// <item>
33
+ /// <description>Null: Transaction is still processing</description>
34
+ /// </item>
35
+ /// </list>
25
36
/// </summary>
26
37
public string status ;
27
38
You can’t perform that action at this time.
0 commit comments