neo3/neo_builder/transaction/
transaction_error.rs1use crate::{
2 codec::CodecError, crypto::CryptoError, neo_builder::BuilderError, neo_clients::ProviderError,
3};
4use thiserror::Error;
5
6#[derive(Error, Debug, PartialEq, Clone)]
7pub enum TransactionError {
8 #[error("Script format error: {0}")]
9 ScriptFormat(String),
10 #[error("Signer configuration error: {0}")]
11 SignerConfiguration(String),
12 #[error("Invalid nonce")]
13 InvalidNonce,
14 #[error("Invalid block")]
15 InvalidBlock,
16 #[error("Invalid transaction")]
17 InvalidTransaction,
18 #[error("Invalid witness condition")]
19 InvalidWitnessCondition,
20 #[error("Too many signers")]
21 TooManySigners,
22 #[error("Duplicate signer")]
23 DuplicateSigner,
24 #[error("No signers")]
25 NoSigners,
26 #[error("No script")]
27 NoScript,
28 #[error("Empty script")]
29 EmptyScript,
30 #[error("Invalid sender")]
31 InvalidSender,
32 #[error("Invalid state:{0}")]
33 IllegalState(String),
34 #[error("Transaction too large")]
35 TxTooLarge,
36 #[error("Transaction configuration error: {0}")]
37 TransactionConfiguration(String),
38 #[error("Codec error: {0}")]
39 CodecError(#[from] CodecError),
40 #[error("Crypto error: {0}")]
41 CryptoError(#[from] CryptoError),
42 #[error(transparent)]
43 ProviderError(#[from] ProviderError),
44 #[error("Insufficient funds")]
45 InsufficientFunds,
46 #[error("Invalid script")]
47 InvalidScript,
48 #[error("Unknown transaction")]
49 UnknownTransaction,
50 #[error("Builder error: {0}")]
51 BuilderError(#[from] BuilderError),
52}