Skip to content

Commit

Permalink
Merge pull request #113 from starkware-libs/error_codes_for_v040
Browse files Browse the repository at this point in the history
adding and fixing collisions of errors (#113)
  • Loading branch information
ArielElp committed Jul 18, 2023
2 parents 798c294 + 96e7af7 commit 9400f52
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 13 deletions.
8 changes: 4 additions & 4 deletions api/starknet_api_openrpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2923,10 +2923,6 @@
"code": 24,
"message": "Block not found"
},
"TXN_HASH_NOT_FOUND": {
"code": 25,
"message": "Transaction hash not found"
},
"INVALID_TXN_INDEX": {
"code": 27,
"message": "Invalid transaction index in a block"
Expand All @@ -2935,6 +2931,10 @@
"code": 28,
"message": "Class hash not found"
},
"TXN_HASH_NOT_FOUND": {
"code": 29,
"message": "Transaction hash not found"
},
"PAGE_SIZE_TOO_BIG": {
"code": 31,
"message": "Requested page size is too big"
Expand Down
16 changes: 8 additions & 8 deletions api/starknet_trace_api_openrpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -355,14 +355,6 @@
}
}
},
"INVALID_BLOCK_HASH": {
"code": 24,
"message": "Invalid block hash"
},
"INVALID_TXN_HASH": {
"code": 25,
"message": "Invalid transaction hash"
},
"CONTRACT_NOT_FOUND": {
"code": 20,
"message": "Contract not found"
Expand All @@ -371,6 +363,14 @@
"code": 24,
"message": "Block not found"
},
"INVALID_TXN_HASH": {
"code": 25,
"message": "Invalid transaction hash"
},
"INVALID_BLOCK_HASH": {
"code": 26,
"message": "Invalid block hash"
},
"CONTRACT_ERROR": {
"code": 40,
"message": "Contract error"
Expand Down
35 changes: 34 additions & 1 deletion api/starknet_write_api.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,44 @@
"message": "Invalid contract class"
},
"CLASS_HASH_NOT_FOUND": {
"$ref": "./api/starknet_api_openrpc.json#/components/errors/CLASS_HASH_NOT_FOUND"
"code": 28,
"message": "Class hash not found"
},
"CLASS_ALREADY_DECLARED": {
"code": 51,
"message": "Class already declared"
},
"INVALID_TRANSACTION_NONCE": {
"code": 52,
"message": "Invalid transaction nonce"
},
"INSUFFICIENT_MAX_FEE": {
"code": 53,
"message": "Max fee is smaller than the validation's actual fee"
},
"INSUFFICIENT_ACCOUNT_BALANCE": {
"code": 54,
"message": "Account balance is smaller than the transaction's max_fee"
},
"VALIDATION_FAILURE": {
"code": 55,
"message": "Account validation failed"
},
"COMPILATION_FAILED": {
"code": 56,
"message": "Compilation failed"
},
"CONTRACT_BYTECODE_SIZE_TOO_LARGE": {
"code": 57,
"message": "Contract bytecode size it too large"
},
"NON_ACCOUNT": {
"code": 58,
"message": "Sender address in not an account contract"
},
"DUPLICATE_TX": {
"code": 59,
"message": "A transaction with the same hash already exists in the mempool"
}
}
}
Expand Down

0 comments on commit 9400f52

Please sign in to comment.