mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-24 11:21:08 +00:00
Serialize CodeUploadReturnValue deposit correctly (#10526)
This commit is contained in:
@@ -151,11 +151,19 @@ pub struct InstantiateReturnValue<AccountId> {
|
|||||||
/// The result of succesfully uploading a contract.
|
/// The result of succesfully uploading a contract.
|
||||||
#[derive(PartialEq, Eq, Encode, Decode, RuntimeDebug)]
|
#[derive(PartialEq, Eq, Encode, Decode, RuntimeDebug)]
|
||||||
#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
|
#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
|
||||||
#[cfg_attr(feature = "std", serde(rename_all = "camelCase"))]
|
#[cfg_attr(
|
||||||
|
feature = "std",
|
||||||
|
serde(
|
||||||
|
rename_all = "camelCase",
|
||||||
|
bound(serialize = "CodeHash: Serialize, Balance: Copy + Into<NumberOrHex>"),
|
||||||
|
bound(deserialize = "CodeHash: Deserialize<'de>, Balance: TryFrom<NumberOrHex>")
|
||||||
|
)
|
||||||
|
)]
|
||||||
pub struct CodeUploadReturnValue<CodeHash, Balance> {
|
pub struct CodeUploadReturnValue<CodeHash, Balance> {
|
||||||
/// The key under which the new code is stored.
|
/// The key under which the new code is stored.
|
||||||
pub code_hash: CodeHash,
|
pub code_hash: CodeHash,
|
||||||
/// The deposit that was reserved at the caller. Is zero when the code already existed.
|
/// The deposit that was reserved at the caller. Is zero when the code already existed.
|
||||||
|
#[cfg_attr(feature = "std", serde(with = "as_hex"))]
|
||||||
pub deposit: Balance,
|
pub deposit: Balance,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user