We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e6ae103 commit 07633c8Copy full SHA for 07633c8
action/protocol/execution/evm/evm.go
@@ -371,7 +371,7 @@ func ExecuteContract(
371
}
372
stateDB.clear()
373
374
- if ps.featureCtx.SetRevertMessageToReceipt && receipt.Status == uint64(iotextypes.ReceiptStatus_ErrExecutionReverted) && retval != nil && bytes.Equal(retval[:4], _revertSelector) {
+ if ps.featureCtx.SetRevertMessageToReceipt && receipt.Status == uint64(iotextypes.ReceiptStatus_ErrExecutionReverted) && len(retval) >= 4 && bytes.Equal(retval[:4], _revertSelector) {
375
// in case of the execution revert error, parse the retVal and add to receipt
376
receipt.SetExecutionRevertMsg(ExtractRevertMessage(retval))
377
0 commit comments