mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-11 14:11:09 +00:00
contracts: Rework contracts_call RPC (#7468)
* Implement serde::Deserialize for DispatchError if std This is needed to use this type in the contracts RPC. * contracts: Change contract_call RPC to return more information
This commit is contained in:
committed by
GitHub
parent
9026eee5d6
commit
a5a6474025
@@ -388,10 +388,10 @@ pub type DispatchResultWithInfo<T> = sp_std::result::Result<T, DispatchErrorWith
|
||||
|
||||
/// Reason why a dispatch call failed.
|
||||
#[derive(Eq, PartialEq, Clone, Copy, Encode, Decode, RuntimeDebug)]
|
||||
#[cfg_attr(feature = "std", derive(Serialize))]
|
||||
#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
|
||||
pub enum DispatchError {
|
||||
/// Some error occurred.
|
||||
Other(#[codec(skip)] &'static str),
|
||||
Other(#[codec(skip)] #[cfg_attr(feature = "std", serde(skip_deserializing))] &'static str),
|
||||
/// Failed to lookup some data.
|
||||
CannotLookup,
|
||||
/// A bad origin.
|
||||
@@ -404,6 +404,7 @@ pub enum DispatchError {
|
||||
error: u8,
|
||||
/// Optional error message.
|
||||
#[codec(skip)]
|
||||
#[cfg_attr(feature = "std", serde(skip_deserializing))]
|
||||
message: Option<&'static str>,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user