#[derive(Drop, PartialEq, Serde, Debug)]pubstructErrorData {
msg: ByteArray
}
#[derive(Drop, PartialEq, Serde, Debug)]pubstructContractErrorData {
revert_error: ContractExecutionError
}
#[derive(Drop, PartialEq, Debug)]pubstructTransactionExecutionErrorData {
transaction_index: felt252,
execution_error: ContractExecutionError,
}
#[derive(Drop, PartialEq, Debug)]pubenumContractExecutionError {
Nested: Box<ContractExecutionErrorInner>,
Message: ByteArray
}
#[derive(Drop, Serde, Debug)]pubstructContractExecutionErrorInner {
contract_address: ContractAddress,
class_hash: felt252,
selector: felt252,
error: ContractExecutionError,
}
#[derive(Drop, Serde, PartialEq, Debug)]pubenumStarknetError {
/// Failed to receive transaction
FailedToReceiveTransaction,
/// Contract not found
ContractNotFound,
/// Requested entrypoint does not exist in the contract
EntryPointNotFound,
/// Block not found
BlockNotFound,
/// Invalid transaction index in a block
InvalidTransactionIndex,
/// Class hash not found
ClassHashNotFound,
/// Transaction hash not found
TransactionHashNotFound,
/// Contract error
ContractError: ContractErrorData,
/// Transaction execution error
TransactionExecutionError: TransactionExecutionErrorData,
/// Class already declared
ClassAlreadyDeclared,
/// Invalid transaction nonce
InvalidTransactionNonce,
/// The transaction's resources don't cover validation or the minimal transaction fee
InsufficientResourcesForValidate,
/// Account balance is smaller than the transaction's max_fee
InsufficientAccountBalance,
/// Account validation failed
ValidationFailure: ErrorData,
/// Compilation failed
CompilationFailed,
/// Contract class size it too large
ContractClassSizeIsTooLarge,
/// Sender address in not an account contract
NonAccount,
/// A transaction with the same hash already exists in the mempool
DuplicateTx,
/// the compiled class hash did not match the one supplied in the transaction
CompiledClassHashMismatch,
/// the transaction version is not supported
UnsupportedTxVersion,
/// the contract class version is not supported
UnsupportedContractClassVersion,
/// An unexpected error occurred
UnexpectedError: ErrorData,
}
#[derive(Drop, Serde, PartialEq, Debug)]pubenumProviderError {
StarknetError: StarknetError,
RateLimited,
UnknownError: ErrorData,
}
#[derive(Drop, Serde, PartialEq, Debug)]pubenumTransactionError {
Rejected,
Reverted: ErrorData,
}
#[derive(Drop, Serde, PartialEq, Debug)]pubenumWaitForTransactionError {
TransactionError: TransactionError,
TimedOut,
ProviderError: ProviderError,
}
#[derive(Drop, Serde, PartialEq, Debug)]pubenumScriptCommandError {
UnknownError: ErrorData,
ContractArtifactsNotFound: ErrorData,
WaitForTransactionError: WaitForTransactionError,
ProviderError: ProviderError,
}