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
sourceimpl<M: Debug + Middleware> Debug for ContractError<M> where
M::Error: Debug,
impl<M: Debug + Middleware> Debug for ContractError<M> where
M::Error: Debug,
sourceimpl<M: Middleware> Display for ContractError<M>
impl<M: Middleware> Display for ContractError<M>
sourceimpl<M: Middleware> Error for ContractError<M> where
Self: Debug + Display,
impl<M: Middleware> Error for ContractError<M> where
Self: Debug + Display,
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl<M: Middleware> From<AbiError> for ContractError<M>
impl<M: Middleware> From<AbiError> for ContractError<M>
sourceimpl<M: Middleware> From<Error> for ContractError<M>
impl<M: Middleware> From<Error> for ContractError<M>
sourceimpl<M: Middleware> From<InvalidOutputType> for ContractError<M>
impl<M: Middleware> From<InvalidOutputType> for ContractError<M>
sourcefn from(source: InvalidOutputType) -> Self
fn from(source: InvalidOutputType) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl<M> !RefUnwindSafe for ContractError<M>
impl<M> Send for ContractError<M>
impl<M> Sync for ContractError<M>
impl<M> Unpin for ContractError<M> where
<M as Middleware>::Error: Unpin,
impl<M> !UnwindSafe for ContractError<M>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more