Skip to content

Commit

Permalink
Merge pull request #140 from starkware-libs/mempool_transactions
Browse files Browse the repository at this point in the history
add starknet_getTransactionStatus and remove starknet_pendingTransactions (#140)
  • Loading branch information
ArielElp authored Sep 21, 2023
2 parents 4bb9c31 + dafe3e9 commit 59b838c
Showing 1 changed file with 61 additions and 34 deletions.
95 changes: 61 additions & 34 deletions api/starknet_api_openrpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,47 @@
}
]
},
{
"name": "starknet_getTransactionStatus",
"summary": "Gets the transaction status (possibly reflecting that the tx is still in the mempool, or dropped from it)",
"paramStructure": "by-name",
"params": [
{
"name": "transaction_hash",
"summary": "The hash of the requested transaction",
"required": true,
"schema": {
"title": "Transaction hash",
"$ref": "#/components/schemas/TXN_HASH"
}
}
],
"result": {
"name": "result",
"schema": {
"title": "Transaction status",
"type": "object",
"properties": {
"finality_status": {
"title": "finality status",
"$ref": "#/components/schemas/TXN_STATUS"
},
"execution_status": {
"title": "execution status",
"$ref": "#/components/schemas/TXN_EXECUTION_STATUS"
}
},
"required": [
"finality_status"
]
}
},
"errors": [
{
"$ref": "#/components/errors/TXN_HASH_NOT_FOUND"
}
]
},
{
"name": "starknet_getTransactionByHash",
"summary": "Get the details and status of a submitted transaction",
Expand Down Expand Up @@ -695,37 +736,6 @@
}
}
},
{
"name": "starknet_pendingTransactions",
"summary": "Returns the transactions in the transaction pool, recognized by this sequencer",
"params": [],
"result": {
"name": "result",
"schema": {
"type": "array",
"title": "Pending Transactions",
"items": {
"allOf": [
{
"$ref": "#/components/schemas/TXN"
},
{
"type": "object",
"properties": {
"transaction_hash": {
"title": "transaction hash",
"$ref": "#/components/schemas/TXN_HASH"
}
},
"required": [
"transaction_hash"
]
}
]
}
}
}
},
{
"name": "starknet_syncing",
"summary": "Returns an object about the sync status, or false if the node is not synching",
Expand Down Expand Up @@ -2304,7 +2314,8 @@
"block_hash",
"block_number",
"messages_sent",
"events"
"events",
"execution_resources"
]
},
"INVOKE_TXN_RECEIPT": {
Expand Down Expand Up @@ -2658,7 +2669,11 @@
],
"description": "The finality status of the transaction"
},
"execution_reources": {
"execution_status": {
"title": "Execution status",
"$ref": "#/components/schemas/TXN_EXECUTION_STATUS"
},
"execution_resources": {
"title": "Execution resources",
"description": "The resources consumed by the transaction",
"$ref": "#/components/schemas/EXECUTION_RESOURCES"
Expand All @@ -2671,7 +2686,8 @@
"messages_sent",
"events",
"finality_status",
"execution_status"
"execution_status",
"execution_resources"
]
},
"MSG_TO_L1": {
Expand Down Expand Up @@ -2736,6 +2752,17 @@
"entry_point_selector"
]
},
"TXN_STATUS": {
"title": "Transaction status",
"type": "string",
"enum": [
"RECEIVED",
"REJECTED",
"ACCEPTED_ON_L2",
"ACCEPTED_ON_L1"
],
"description": "The finality status of the transaction, including the case the txn is still in the mempool or failed validation during the block construction phase"
},
"TXN_FINALITY_STATUS": {
"title": "Finality status",
"type": "string",
Expand Down

0 comments on commit 59b838c

Please sign in to comment.