Skip to content

Commit

Permalink
In TXN_RECEIPT, revert_reason is required if execution_status is REVE…
Browse files Browse the repository at this point in the history
…RTED
  • Loading branch information
ShahakShama committed Mar 3, 2024
1 parent 7ae9e7b commit 67c4fd5
Showing 1 changed file with 96 additions and 56 deletions.
152 changes: 96 additions & 56 deletions api/starknet_api_openrpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2842,64 +2842,104 @@
]
},
"COMMON_RECEIPT_PROPERTIES": {
"title": "Common receipt properties",
"description": "Common properties for a transaction receipt",
"type": "object",
"properties": {
"transaction_hash": {
"title": "Transaction hash",
"$ref": "#/components/schemas/TXN_HASH",
"description": "The hash identifying the transaction"
},
"actual_fee": {
"title": "Actual fee",
"$ref": "#/components/schemas/FEE_PAYMENT",
"description": "The fee that was charged by the sequencer"
},
"execution_status": {
"title": "Execution status",
"$ref": "#/components/schemas/TXN_EXECUTION_STATUS"
},
"finality_status": {
"title": "Finality status",
"description": "finality status of the tx",
"$ref": "#/components/schemas/TXN_FINALITY_STATUS"
},
"messages_sent": {
"type": "array",
"title": "Messages sent",
"items": {
"$ref": "#/components/schemas/MSG_TO_L1"
}
},
"revert_reason": {
"title": "Revert reason",
"name": "revert reason",
"description": "the revert reason for the failed execution",
"type": "string"
},
"events": {
"description": "The events emitted as part of this transaction",
"title": "Events",
"type": "array",
"items": {
"$ref": "#/components/schemas/EVENT"
}
"allOf": [
{
"title": "Common receipt properties",
"description": "Common properties for a transaction receipt",
"type": "object",
"properties": {
"transaction_hash": {
"title": "Transaction hash",
"$ref": "#/components/schemas/TXN_HASH",
"description": "The hash identifying the transaction"
},
"actual_fee": {
"title": "Actual fee",
"$ref": "#/components/schemas/FEE_PAYMENT",
"description": "The fee that was charged by the sequencer"
},
"finality_status": {
"title": "Finality status",
"description": "finality status of the tx",
"$ref": "#/components/schemas/TXN_FINALITY_STATUS"
},
"messages_sent": {
"type": "array",
"title": "Messages sent",
"items": {
"$ref": "#/components/schemas/MSG_TO_L1"
}
},
"events": {
"description": "The events emitted as part of this transaction",
"title": "Events",
"type": "array",
"items": {
"$ref": "#/components/schemas/EVENT"
}
},
"execution_resources": {
"title": "Execution resources",
"description": "The resources consumed by the transaction",
"$ref": "#/components/schemas/EXECUTION_RESOURCES"
}
},
"required": [
"transaction_hash",
"actual_fee",
"finality_status",
"messages_sent",
"events",
"execution_resources"
]
},
"execution_resources": {
"title": "Execution resources",
"description": "The resources consumed by the transaction",
"$ref": "#/components/schemas/EXECUTION_RESOURCES"
{
"oneOf": [
{
"title": "Successful Common receipt properties",
"description": "Common properties for a transaction receipt that was executed successfully",
"type": "object",
"properties": {
"execution_status": {
"title": "Execution status",
"type": "string",
"enum": [
"SUCCEEDED"
],
"description": "The execution status of the transaction"
}
},
"required": [
"execution_status"
]
},
{
"title": "Reverted Common receipt properties",
"description": "Common properties for a transaction receipt that was reverted",
"type": "object",
"properties": {
"execution_status": {
"title": "Execution status",
"type": "string",
"enum": [
"REVERTED"
],
"description": "The execution status of the transaction"
},
"revert_reason": {
"title": "Revert reason",
"name": "revert reason",
"description": "the revert reason for the failed execution",
"type": "string"
}
},
"required": [
"execution_status",
"revert_reason"
]
}
]
}
},
"required": [
"transaction_hash",
"actual_fee",
"finality_status",
"execution_status",
"messages_sent",
"events",
"execution_resources"
]
},
"INVOKE_TXN_RECEIPT": {
Expand Down

0 comments on commit 67c4fd5

Please sign in to comment.