@@ -474,27 +474,32 @@ export class TonBaseStaker {
474
474
const description = transaction . description as TransactionDescriptionGeneric
475
475
476
476
if ( description . aborted ) {
477
- return { status : 'failure' , receipt : transaction }
477
+ return { status : 'failure' , receipt : transaction , reason : 'aborted' }
478
478
}
479
479
480
480
if ( description . computePhase . type === 'vm' ) {
481
481
const compute = description . computePhase
482
+
483
+ if ( description . actionPhase && description . actionPhase ?. resultCode === 50 && compute . exitCode === 0 ) {
484
+ return { status : 'failure' , receipt : transaction , reason : 'out_of_storage' }
485
+ }
486
+
482
487
if ( compute . exitCode !== 0 || compute . success === false ) {
483
- return { status : 'failure' , receipt : transaction }
488
+ return { status : 'failure' , receipt : transaction , reason : 'compute_phase' }
484
489
}
485
490
}
486
491
487
492
if ( description . actionPhase ) {
488
493
const action = description . actionPhase
489
494
490
495
if ( action . success === false || action . valid === false ) {
491
- return { status : 'failure' , receipt : transaction }
496
+ return { status : 'failure' , receipt : transaction , reason : 'action_phase' }
492
497
}
493
498
}
494
499
495
500
// the transaction bounced if this is present (so likely it bounced due to error in the contract)
496
501
if ( description . bouncePhase ) {
497
- return { status : 'failure' , receipt : transaction }
502
+ return { status : 'failure' , receipt : transaction , reason : 'bounce_phase' }
498
503
}
499
504
}
500
505
0 commit comments