diff --git a/api/starknet_api_openrpc.json b/api/starknet_api_openrpc.json index e3806a6..23220dd 100644 --- a/api/starknet_api_openrpc.json +++ b/api/starknet_api_openrpc.json @@ -249,6 +249,11 @@ "execution_status": { "title": "execution status", "$ref": "#/components/schemas/TXN_EXECUTION_STATUS" + }, + "failure_reason": { + "title": "failure reason", + "description": "the failure reason, only appears if finality_status is REJECTED or execution_status is REVERTED", + "type": "string" } }, "required": ["finality_status"] @@ -3573,6 +3578,36 @@ "required": ["data_availability"] } ] + }, + "CONTRACT_EXECUTION_ERROR": { + "description": "structured error that can later be processed by wallets or sdks", + "titel": "contract execution error", + "oneOf": [ + { + "type": "object", + "title": "inner call", + "description": "error frame", + "properties": { + "contract_address": { + "$ref": "#/components/schemas/ADDRESS" + }, + "class_hash": { + "$ref": "#/components/schemas/FELT" + }, + "selector": { + "$ref": "#/components/schemas/FELT" + }, + "error": { + "$ref": "#/components/schemas/CONTRACT_EXECUTION_ERROR" + } + } + }, + { + "title": "error message", + "description": "the error raised during execution", + "type": "string" + } + ] } }, "errors": { @@ -3625,8 +3660,8 @@ "properties": { "revert_error": { "title": "revert error", - "description": "a string encoding the execution trace up to the point of failure", - "type": "string" + "description": "the execution trace up to the point of failure", + "$ref": "#/components/schemas/CONTRACT_EXECUTION_ERROR" } }, "required": "revert_error" @@ -3646,8 +3681,8 @@ }, "execution_error": { "title": "revert error", - "description": "a string encoding the execution trace up to the point of failure", - "type": "string" + "description": "theĀ§ execution trace up to the point of failure", + "$ref": "#/components/schemas/CONTRACT_EXECUTION_ERROR" } }, "required": ["transaction_index", "execution_error"]