This repository has been archived by the owner on Aug 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 295
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
63 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
use thiserror_no_std::Error; | ||
|
||
#[allow(missing_docs)] | ||
#[derive(Error, Clone, Copy, Debug, scale_codec::Encode, scale_codec::Decode, scale_info::TypeInfo)] | ||
pub enum StarknetRpcApiError { | ||
#[error("Failed to write transaction")] | ||
FailedToReceiveTxn = 1, | ||
#[error("Contract not found")] | ||
ContractNotFound = 20, | ||
#[error("Invalid message selector")] | ||
InvalidMessageSelector = 21, | ||
#[error("Invalid call data")] | ||
InvalidCallData = 22, | ||
#[error("Block not found")] | ||
BlockNotFound = 24, | ||
#[error("Transaction hash not found")] | ||
TxnHashNotFound = 25, | ||
#[error("Invalid transaction index in a block")] | ||
InvalidTxnIndex = 27, | ||
#[error("Class hash not found")] | ||
ClassHashNotFound = 28, | ||
#[error("Class already declared")] | ||
ClassAlreadyDeclared = 51, | ||
#[error("Requested page size is too big")] | ||
PageSizeTooBig = 31, | ||
#[error("There are no blocks")] | ||
NoBlocks = 32, | ||
#[error("The supplied continuation token is invalid or unknown")] | ||
InvalidContinuationToken = 33, | ||
#[error("Contract error")] | ||
ContractError = 40, | ||
#[error("Invalid contract class")] | ||
InvalidContractClass = 50, | ||
#[error("Too many storage keys requested")] | ||
ProofLimitExceeded = 10000_isize, | ||
#[error("Too many keys provided in a filter")] | ||
TooManyKeysInFilter = 34, | ||
#[error("Internal server error")] | ||
InternalServerError = 500_isize, | ||
#[error("Failed to fetch pending transactions")] | ||
FailedToFetchPendingTransactions = 38, | ||
#[error("Unimplemented method")] | ||
UnimplementedMethod = 501_isize, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters