Enum ethers_contract::ContractError
source · pub enum ContractError<M: Middleware> {
DecodingError(Error),
AbiError(AbiError),
DetokenizationError(InvalidOutputType),
MiddlewareError(M::Error),
ProviderError(ProviderError),
ConstructorError,
ContractNotDeployed,
}
Expand description
An Error which is thrown when interacting with a smart contract
Variants§
DecodingError(Error)
Thrown when the ABI decoding fails
AbiError(AbiError)
Thrown when the internal BaseContract errors
DetokenizationError(InvalidOutputType)
Thrown when detokenizing an argument
MiddlewareError(M::Error)
Thrown when a middleware call fails
ProviderError(ProviderError)
Thrown when a provider call fails
ConstructorError
Thrown during deployment if a constructor argument was passed in the deploy
call but a constructor was not present in the ABI
ContractNotDeployed
Thrown if a contract address is not found in the deployment transaction’s receipt
Trait Implementations§
source§impl<M: Debug + Middleware> Debug for ContractError<M>where
M::Error: Debug,
impl<M: Debug + Middleware> Debug for ContractError<M>where
M::Error: Debug,
source§impl<M: Middleware> Display for ContractError<M>
impl<M: Middleware> Display for ContractError<M>
source§impl<M: Middleware> Error for ContractError<M>where
Self: Debug + Display,
impl<M: Middleware> Error for ContractError<M>where
Self: Debug + Display,
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl<M: Middleware> From<AbiError> for ContractError<M>
impl<M: Middleware> From<AbiError> for ContractError<M>
source§impl<M: Middleware> From<ContractError<M>> for MulticallError<M>
Available on crate feature abigen
only.
impl<M: Middleware> From<ContractError<M>> for MulticallError<M>
Available on crate feature
abigen
only.source§fn from(source: ContractError<M>) -> Self
fn from(source: ContractError<M>) -> Self
Converts to this type from the input type.
source§impl<M: Middleware> From<Error> for ContractError<M>
impl<M: Middleware> From<Error> for ContractError<M>
source§impl<M: Middleware> From<InvalidOutputType> for ContractError<M>
impl<M: Middleware> From<InvalidOutputType> for ContractError<M>
source§fn from(source: InvalidOutputType) -> Self
fn from(source: InvalidOutputType) -> Self
Converts to this type from the input type.