mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-11 11:51:12 +00:00
Merge remote-tracking branch 'origin/master' into na-jsonrpsee-core-client
This commit is contained in:
+8
-1
@@ -157,7 +157,14 @@ impl<T: Config> Client<T> {
|
||||
&self.metadata
|
||||
}
|
||||
|
||||
/// Returns the system properties
|
||||
/// Returns the properties defined in the chain spec as a JSON object.
|
||||
///
|
||||
/// # Note
|
||||
///
|
||||
/// Many chains use this to define common properties such as `token_decimals` and `token_symbol`
|
||||
/// required for UIs, but this is merely a convention. It is up to the library user to
|
||||
/// deserialize the JSON into the appropriate type or otherwise extract the properties defined
|
||||
/// in the target chain's spec.
|
||||
pub fn properties(&self) -> &SystemProperties {
|
||||
&self.properties
|
||||
}
|
||||
|
||||
@@ -143,6 +143,11 @@ pub struct PalletMetadata {
|
||||
}
|
||||
|
||||
impl PalletMetadata {
|
||||
/// Get the name of the pallet.
|
||||
pub fn name(&self) -> &str {
|
||||
&self.name
|
||||
}
|
||||
|
||||
/// Encode a call based on this pallet metadata.
|
||||
pub fn encode_call<C>(&self, call: &C) -> Result<Encoded, MetadataError>
|
||||
where
|
||||
|
||||
+2
-11
@@ -145,17 +145,8 @@ impl From<u32> for BlockNumber {
|
||||
}
|
||||
}
|
||||
|
||||
/// System properties for a Substrate-based runtime
|
||||
#[derive(serde::Serialize, Deserialize, Debug, Clone, PartialEq, Eq, Default)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct SystemProperties {
|
||||
/// The address format
|
||||
pub ss58_format: u8,
|
||||
/// The number of digits after the decimal point in the native token
|
||||
pub token_decimals: u8,
|
||||
/// The symbol of the native token
|
||||
pub token_symbol: String,
|
||||
}
|
||||
/// Arbitrary properties defined in the chain spec as a JSON object.
|
||||
pub type SystemProperties = serde_json::Map<String, serde_json::Value>;
|
||||
|
||||
/// Possible transaction status events.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user