diff --git a/src/curr/generated.rs b/src/curr/generated.rs index 8bde0fbc..53040029 100644 --- a/src/curr/generated.rs +++ b/src/curr/generated.rs @@ -22,7 +22,7 @@ pub const XDR_FILES_SHA256: [(&str, &str); 12] = [ ), ( "xdr/curr/Stellar-contract-config-setting.x", - "fc42980e8710514679477f767ecad6f9348c38d24b1e4476fdd7e73e8e672ea8", + "5f1ff5172fa7e446221d2325e3ee8ba7eca8c16a2e0522672a86553ff1b6244f", ), ( "xdr/curr/Stellar-contract-env-meta.x", @@ -46,7 +46,7 @@ pub const XDR_FILES_SHA256: [(&str, &str); 12] = [ ), ( "xdr/curr/Stellar-ledger-entries.x", - "4f8f2324f567a40065f54f696ea1428740f043ea4154f5986d9f499ad00ac333", + "725b310cdb771755cc60b338fe9c6c26e3e137b3605b9c8af9a9304bae89fe24", ), ( "xdr/curr/Stellar-ledger.x", @@ -3960,7 +3960,30 @@ impl WriteXdr for ConfigSettingContractBandwidthV0 { /// // Cost of int256 shift (`shl`, `shr`) operation /// Int256Shift = 21, /// // Cost of drawing random bytes using a ChaCha20 PRNG -/// ChaCha20DrawBytes = 22 +/// ChaCha20DrawBytes = 22, +/// +/// // Cost of instantiating unknown wasm bytecode. +/// VmInstantiateUnknownBytes = 23, +/// // Cost of instantiating wasm bytes that only encode instructions. +/// VmInstantiateInstructions = 24, +/// // Cost of instantiating a known number of wasm functions. +/// VmInstantiateFunctions = 25, +/// // Cost of instantiating a known number of wasm globals. +/// VmInstantiateGlobals = 26, +/// // Cost of instantiating a known number of wasm table entries. +/// VmInstantiateTableEntries = 27, +/// // Cost of instantiating a known number of wasm types. +/// VmInstantiateTypes = 28, +/// // Cost of instantiating a known number of wasm data segments. +/// VmInstantiateDataSegments = 29, +/// // Cost of instantiating a known number of wasm element segments. +/// VmInstantiateElemSegments = 30, +/// // Cost of instantiating a known number of wasm imports. +/// VmInstantiateImports = 31, +/// // Cost of instantiating a known number of wasm exports. +/// VmInstantiateExports = 32, +/// // Cost of instantiating a known number of memory pages. +/// VmInstantiateMemoryPages = 33 /// }; /// ``` /// @@ -3997,10 +4020,21 @@ pub enum ContractCostType { Int256Pow = 20, Int256Shift = 21, ChaCha20DrawBytes = 22, + VmInstantiateUnknownBytes = 23, + VmInstantiateInstructions = 24, + VmInstantiateFunctions = 25, + VmInstantiateGlobals = 26, + VmInstantiateTableEntries = 27, + VmInstantiateTypes = 28, + VmInstantiateDataSegments = 29, + VmInstantiateElemSegments = 30, + VmInstantiateImports = 31, + VmInstantiateExports = 32, + VmInstantiateMemoryPages = 33, } impl ContractCostType { - pub const VARIANTS: [ContractCostType; 23] = [ + pub const VARIANTS: [ContractCostType; 34] = [ ContractCostType::WasmInsnExec, ContractCostType::MemAlloc, ContractCostType::MemCpy, @@ -4024,8 +4058,19 @@ impl ContractCostType { ContractCostType::Int256Pow, ContractCostType::Int256Shift, ContractCostType::ChaCha20DrawBytes, + ContractCostType::VmInstantiateUnknownBytes, + ContractCostType::VmInstantiateInstructions, + ContractCostType::VmInstantiateFunctions, + ContractCostType::VmInstantiateGlobals, + ContractCostType::VmInstantiateTableEntries, + ContractCostType::VmInstantiateTypes, + ContractCostType::VmInstantiateDataSegments, + ContractCostType::VmInstantiateElemSegments, + ContractCostType::VmInstantiateImports, + ContractCostType::VmInstantiateExports, + ContractCostType::VmInstantiateMemoryPages, ]; - pub const VARIANTS_STR: [&'static str; 23] = [ + pub const VARIANTS_STR: [&'static str; 34] = [ "WasmInsnExec", "MemAlloc", "MemCpy", @@ -4049,6 +4094,17 @@ impl ContractCostType { "Int256Pow", "Int256Shift", "ChaCha20DrawBytes", + "VmInstantiateUnknownBytes", + "VmInstantiateInstructions", + "VmInstantiateFunctions", + "VmInstantiateGlobals", + "VmInstantiateTableEntries", + "VmInstantiateTypes", + "VmInstantiateDataSegments", + "VmInstantiateElemSegments", + "VmInstantiateImports", + "VmInstantiateExports", + "VmInstantiateMemoryPages", ]; #[must_use] @@ -4077,11 +4133,22 @@ impl ContractCostType { Self::Int256Pow => "Int256Pow", Self::Int256Shift => "Int256Shift", Self::ChaCha20DrawBytes => "ChaCha20DrawBytes", + Self::VmInstantiateUnknownBytes => "VmInstantiateUnknownBytes", + Self::VmInstantiateInstructions => "VmInstantiateInstructions", + Self::VmInstantiateFunctions => "VmInstantiateFunctions", + Self::VmInstantiateGlobals => "VmInstantiateGlobals", + Self::VmInstantiateTableEntries => "VmInstantiateTableEntries", + Self::VmInstantiateTypes => "VmInstantiateTypes", + Self::VmInstantiateDataSegments => "VmInstantiateDataSegments", + Self::VmInstantiateElemSegments => "VmInstantiateElemSegments", + Self::VmInstantiateImports => "VmInstantiateImports", + Self::VmInstantiateExports => "VmInstantiateExports", + Self::VmInstantiateMemoryPages => "VmInstantiateMemoryPages", } } #[must_use] - pub const fn variants() -> [ContractCostType; 23] { + pub const fn variants() -> [ContractCostType; 34] { Self::VARIANTS } } @@ -4135,6 +4202,17 @@ impl TryFrom for ContractCostType { 20 => ContractCostType::Int256Pow, 21 => ContractCostType::Int256Shift, 22 => ContractCostType::ChaCha20DrawBytes, + 23 => ContractCostType::VmInstantiateUnknownBytes, + 24 => ContractCostType::VmInstantiateInstructions, + 25 => ContractCostType::VmInstantiateFunctions, + 26 => ContractCostType::VmInstantiateGlobals, + 27 => ContractCostType::VmInstantiateTableEntries, + 28 => ContractCostType::VmInstantiateTypes, + 29 => ContractCostType::VmInstantiateDataSegments, + 30 => ContractCostType::VmInstantiateElemSegments, + 31 => ContractCostType::VmInstantiateImports, + 32 => ContractCostType::VmInstantiateExports, + 33 => ContractCostType::VmInstantiateMemoryPages, #[allow(unreachable_patterns)] _ => return Err(Error::Invalid), }; @@ -15323,11 +15401,249 @@ impl WriteXdr for ContractDataEntry { } } +/// ContractCodeCostInputs is an XDR Struct defines as: +/// +/// ```text +/// struct ContractCodeCostInputs { +/// uint32 nFunctions; +/// uint32 nGlobals; +/// uint32 nTableEntries; +/// uint32 nTypes; +/// uint32 nDataSegments; +/// uint32 nElemSegments; +/// uint32 nImports; +/// uint32 nExports; +/// uint32 nMemoryPages; +/// }; +/// ``` +/// +#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] +#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] +#[cfg_attr( + all(feature = "serde", feature = "alloc"), + derive(serde::Serialize, serde::Deserialize), + serde(rename_all = "snake_case") +)] +pub struct ContractCodeCostInputs { + pub n_functions: u32, + pub n_globals: u32, + pub n_table_entries: u32, + pub n_types: u32, + pub n_data_segments: u32, + pub n_elem_segments: u32, + pub n_imports: u32, + pub n_exports: u32, + pub n_memory_pages: u32, +} + +impl ReadXdr for ContractCodeCostInputs { + #[cfg(feature = "std")] + fn read_xdr(r: &mut Limited) -> Result { + r.with_limited_depth(|r| { + Ok(Self { + n_functions: u32::read_xdr(r)?, + n_globals: u32::read_xdr(r)?, + n_table_entries: u32::read_xdr(r)?, + n_types: u32::read_xdr(r)?, + n_data_segments: u32::read_xdr(r)?, + n_elem_segments: u32::read_xdr(r)?, + n_imports: u32::read_xdr(r)?, + n_exports: u32::read_xdr(r)?, + n_memory_pages: u32::read_xdr(r)?, + }) + }) + } +} + +impl WriteXdr for ContractCodeCostInputs { + #[cfg(feature = "std")] + fn write_xdr(&self, w: &mut Limited) -> Result<()> { + w.with_limited_depth(|w| { + self.n_functions.write_xdr(w)?; + self.n_globals.write_xdr(w)?; + self.n_table_entries.write_xdr(w)?; + self.n_types.write_xdr(w)?; + self.n_data_segments.write_xdr(w)?; + self.n_elem_segments.write_xdr(w)?; + self.n_imports.write_xdr(w)?; + self.n_exports.write_xdr(w)?; + self.n_memory_pages.write_xdr(w)?; + Ok(()) + }) + } +} + +/// ContractCodeEntryV1 is an XDR NestedStruct defines as: +/// +/// ```text +/// struct +/// { +/// ExtensionPoint ext; +/// ContractCodeCostInputs costInputs; +/// } +/// ``` +/// +#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] +#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] +#[cfg_attr( + all(feature = "serde", feature = "alloc"), + derive(serde::Serialize, serde::Deserialize), + serde(rename_all = "snake_case") +)] +pub struct ContractCodeEntryV1 { + pub ext: ExtensionPoint, + pub cost_inputs: ContractCodeCostInputs, +} + +impl ReadXdr for ContractCodeEntryV1 { + #[cfg(feature = "std")] + fn read_xdr(r: &mut Limited) -> Result { + r.with_limited_depth(|r| { + Ok(Self { + ext: ExtensionPoint::read_xdr(r)?, + cost_inputs: ContractCodeCostInputs::read_xdr(r)?, + }) + }) + } +} + +impl WriteXdr for ContractCodeEntryV1 { + #[cfg(feature = "std")] + fn write_xdr(&self, w: &mut Limited) -> Result<()> { + w.with_limited_depth(|w| { + self.ext.write_xdr(w)?; + self.cost_inputs.write_xdr(w)?; + Ok(()) + }) + } +} + +/// ContractCodeEntryExt is an XDR NestedUnion defines as: +/// +/// ```text +/// union switch (int v) +/// { +/// case 0: +/// void; +/// case 1: +/// struct +/// { +/// ExtensionPoint ext; +/// ContractCodeCostInputs costInputs; +/// } v1; +/// } +/// ``` +/// +// union with discriminant i32 +#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] +#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] +#[cfg_attr( + all(feature = "serde", feature = "alloc"), + derive(serde::Serialize, serde::Deserialize), + serde(rename_all = "snake_case") +)] +#[allow(clippy::large_enum_variant)] +pub enum ContractCodeEntryExt { + V0, + V1(ContractCodeEntryV1), +} + +impl ContractCodeEntryExt { + pub const VARIANTS: [i32; 2] = [0, 1]; + pub const VARIANTS_STR: [&'static str; 2] = ["V0", "V1"]; + + #[must_use] + pub const fn name(&self) -> &'static str { + match self { + Self::V0 => "V0", + Self::V1(_) => "V1", + } + } + + #[must_use] + pub const fn discriminant(&self) -> i32 { + #[allow(clippy::match_same_arms)] + match self { + Self::V0 => 0, + Self::V1(_) => 1, + } + } + + #[must_use] + pub const fn variants() -> [i32; 2] { + Self::VARIANTS + } +} + +impl Name for ContractCodeEntryExt { + #[must_use] + fn name(&self) -> &'static str { + Self::name(self) + } +} + +impl Discriminant for ContractCodeEntryExt { + #[must_use] + fn discriminant(&self) -> i32 { + Self::discriminant(self) + } +} + +impl Variants for ContractCodeEntryExt { + fn variants() -> slice::Iter<'static, i32> { + Self::VARIANTS.iter() + } +} + +impl Union for ContractCodeEntryExt {} + +impl ReadXdr for ContractCodeEntryExt { + #[cfg(feature = "std")] + fn read_xdr(r: &mut Limited) -> Result { + r.with_limited_depth(|r| { + let dv: i32 = ::read_xdr(r)?; + #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] + let v = match dv { + 0 => Self::V0, + 1 => Self::V1(ContractCodeEntryV1::read_xdr(r)?), + #[allow(unreachable_patterns)] + _ => return Err(Error::Invalid), + }; + Ok(v) + }) + } +} + +impl WriteXdr for ContractCodeEntryExt { + #[cfg(feature = "std")] + fn write_xdr(&self, w: &mut Limited) -> Result<()> { + w.with_limited_depth(|w| { + self.discriminant().write_xdr(w)?; + #[allow(clippy::match_same_arms)] + match self { + Self::V0 => ().write_xdr(w)?, + Self::V1(v) => v.write_xdr(w)?, + }; + Ok(()) + }) + } +} + /// ContractCodeEntry is an XDR Struct defines as: /// /// ```text /// struct ContractCodeEntry { -/// ExtensionPoint ext; +/// union switch (int v) +/// { +/// case 0: +/// void; +/// case 1: +/// struct +/// { +/// ExtensionPoint ext; +/// ContractCodeCostInputs costInputs; +/// } v1; +/// } ext; /// /// Hash hash; /// opaque code<>; @@ -15342,7 +15658,7 @@ impl WriteXdr for ContractDataEntry { serde(rename_all = "snake_case") )] pub struct ContractCodeEntry { - pub ext: ExtensionPoint, + pub ext: ContractCodeEntryExt, pub hash: Hash, pub code: BytesM, } @@ -15352,7 +15668,7 @@ impl ReadXdr for ContractCodeEntry { fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { - ext: ExtensionPoint::read_xdr(r)?, + ext: ContractCodeEntryExt::read_xdr(r)?, hash: Hash::read_xdr(r)?, code: BytesM::read_xdr(r)?, }) @@ -42247,7 +42563,10 @@ pub enum TypeVariant { LiquidityPoolEntryConstantProduct, ContractDataDurability, ContractDataEntry, + ContractCodeCostInputs, ContractCodeEntry, + ContractCodeEntryExt, + ContractCodeEntryV1, TtlEntry, LedgerEntryExtensionV1, LedgerEntryExtensionV1Ext, @@ -42530,7 +42849,7 @@ pub enum TypeVariant { } impl TypeVariant { - pub const VARIANTS: [TypeVariant; 418] = [ + pub const VARIANTS: [TypeVariant; 421] = [ TypeVariant::Value, TypeVariant::ScpBallot, TypeVariant::ScpStatementType, @@ -42669,7 +42988,10 @@ impl TypeVariant { TypeVariant::LiquidityPoolEntryConstantProduct, TypeVariant::ContractDataDurability, TypeVariant::ContractDataEntry, + TypeVariant::ContractCodeCostInputs, TypeVariant::ContractCodeEntry, + TypeVariant::ContractCodeEntryExt, + TypeVariant::ContractCodeEntryV1, TypeVariant::TtlEntry, TypeVariant::LedgerEntryExtensionV1, TypeVariant::LedgerEntryExtensionV1Ext, @@ -42950,7 +43272,7 @@ impl TypeVariant { TypeVariant::HmacSha256Key, TypeVariant::HmacSha256Mac, ]; - pub const VARIANTS_STR: [&'static str; 418] = [ + pub const VARIANTS_STR: [&'static str; 421] = [ "Value", "ScpBallot", "ScpStatementType", @@ -43089,7 +43411,10 @@ impl TypeVariant { "LiquidityPoolEntryConstantProduct", "ContractDataDurability", "ContractDataEntry", + "ContractCodeCostInputs", "ContractCodeEntry", + "ContractCodeEntryExt", + "ContractCodeEntryV1", "TtlEntry", "LedgerEntryExtensionV1", "LedgerEntryExtensionV1Ext", @@ -43515,7 +43840,10 @@ impl TypeVariant { Self::LiquidityPoolEntryConstantProduct => "LiquidityPoolEntryConstantProduct", Self::ContractDataDurability => "ContractDataDurability", Self::ContractDataEntry => "ContractDataEntry", + Self::ContractCodeCostInputs => "ContractCodeCostInputs", Self::ContractCodeEntry => "ContractCodeEntry", + Self::ContractCodeEntryExt => "ContractCodeEntryExt", + Self::ContractCodeEntryV1 => "ContractCodeEntryV1", Self::TtlEntry => "TtlEntry", Self::LedgerEntryExtensionV1 => "LedgerEntryExtensionV1", Self::LedgerEntryExtensionV1Ext => "LedgerEntryExtensionV1Ext", @@ -43804,7 +44132,7 @@ impl TypeVariant { #[must_use] #[allow(clippy::too_many_lines)] - pub const fn variants() -> [TypeVariant; 418] { + pub const fn variants() -> [TypeVariant; 421] { Self::VARIANTS } } @@ -43971,7 +44299,10 @@ impl core::str::FromStr for TypeVariant { "LiquidityPoolEntryConstantProduct" => Ok(Self::LiquidityPoolEntryConstantProduct), "ContractDataDurability" => Ok(Self::ContractDataDurability), "ContractDataEntry" => Ok(Self::ContractDataEntry), + "ContractCodeCostInputs" => Ok(Self::ContractCodeCostInputs), "ContractCodeEntry" => Ok(Self::ContractCodeEntry), + "ContractCodeEntryExt" => Ok(Self::ContractCodeEntryExt), + "ContractCodeEntryV1" => Ok(Self::ContractCodeEntryV1), "TtlEntry" => Ok(Self::TtlEntry), "LedgerEntryExtensionV1" => Ok(Self::LedgerEntryExtensionV1), "LedgerEntryExtensionV1Ext" => Ok(Self::LedgerEntryExtensionV1Ext), @@ -44410,7 +44741,10 @@ pub enum Type { LiquidityPoolEntryConstantProduct(Box), ContractDataDurability(Box), ContractDataEntry(Box), + ContractCodeCostInputs(Box), ContractCodeEntry(Box), + ContractCodeEntryExt(Box), + ContractCodeEntryV1(Box), TtlEntry(Box), LedgerEntryExtensionV1(Box), LedgerEntryExtensionV1Ext(Box), @@ -44693,7 +45027,7 @@ pub enum Type { } impl Type { - pub const VARIANTS: [TypeVariant; 418] = [ + pub const VARIANTS: [TypeVariant; 421] = [ TypeVariant::Value, TypeVariant::ScpBallot, TypeVariant::ScpStatementType, @@ -44832,7 +45166,10 @@ impl Type { TypeVariant::LiquidityPoolEntryConstantProduct, TypeVariant::ContractDataDurability, TypeVariant::ContractDataEntry, + TypeVariant::ContractCodeCostInputs, TypeVariant::ContractCodeEntry, + TypeVariant::ContractCodeEntryExt, + TypeVariant::ContractCodeEntryV1, TypeVariant::TtlEntry, TypeVariant::LedgerEntryExtensionV1, TypeVariant::LedgerEntryExtensionV1Ext, @@ -45113,7 +45450,7 @@ impl Type { TypeVariant::HmacSha256Key, TypeVariant::HmacSha256Mac, ]; - pub const VARIANTS_STR: [&'static str; 418] = [ + pub const VARIANTS_STR: [&'static str; 421] = [ "Value", "ScpBallot", "ScpStatementType", @@ -45252,7 +45589,10 @@ impl Type { "LiquidityPoolEntryConstantProduct", "ContractDataDurability", "ContractDataEntry", + "ContractCodeCostInputs", "ContractCodeEntry", + "ContractCodeEntryExt", + "ContractCodeEntryV1", "TtlEntry", "LedgerEntryExtensionV1", "LedgerEntryExtensionV1Ext", @@ -46100,11 +46440,26 @@ impl Type { ContractDataEntry::read_xdr(r)?, ))) }), + TypeVariant::ContractCodeCostInputs => r.with_limited_depth(|r| { + Ok(Self::ContractCodeCostInputs(Box::new( + ContractCodeCostInputs::read_xdr(r)?, + ))) + }), TypeVariant::ContractCodeEntry => r.with_limited_depth(|r| { Ok(Self::ContractCodeEntry(Box::new( ContractCodeEntry::read_xdr(r)?, ))) }), + TypeVariant::ContractCodeEntryExt => r.with_limited_depth(|r| { + Ok(Self::ContractCodeEntryExt(Box::new( + ContractCodeEntryExt::read_xdr(r)?, + ))) + }), + TypeVariant::ContractCodeEntryV1 => r.with_limited_depth(|r| { + Ok(Self::ContractCodeEntryV1(Box::new( + ContractCodeEntryV1::read_xdr(r)?, + ))) + }), TypeVariant::TtlEntry => { r.with_limited_depth(|r| Ok(Self::TtlEntry(Box::new(TtlEntry::read_xdr(r)?)))) } @@ -47960,10 +48315,22 @@ impl Type { ReadXdrIter::<_, ContractDataEntry>::new(&mut r.inner, r.limits.clone()) .map(|r| r.map(|t| Self::ContractDataEntry(Box::new(t)))), ), + TypeVariant::ContractCodeCostInputs => Box::new( + ReadXdrIter::<_, ContractCodeCostInputs>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::ContractCodeCostInputs(Box::new(t)))), + ), TypeVariant::ContractCodeEntry => Box::new( ReadXdrIter::<_, ContractCodeEntry>::new(&mut r.inner, r.limits.clone()) .map(|r| r.map(|t| Self::ContractCodeEntry(Box::new(t)))), ), + TypeVariant::ContractCodeEntryExt => Box::new( + ReadXdrIter::<_, ContractCodeEntryExt>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::ContractCodeEntryExt(Box::new(t)))), + ), + TypeVariant::ContractCodeEntryV1 => Box::new( + ReadXdrIter::<_, ContractCodeEntryV1>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::ContractCodeEntryV1(Box::new(t)))), + ), TypeVariant::TtlEntry => Box::new( ReadXdrIter::<_, TtlEntry>::new(&mut r.inner, r.limits.clone()) .map(|r| r.map(|t| Self::TtlEntry(Box::new(t)))), @@ -49812,10 +50179,25 @@ impl Type { ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) .map(|r| r.map(|t| Self::ContractDataEntry(Box::new(t.0)))), ), + TypeVariant::ContractCodeCostInputs => Box::new( + ReadXdrIter::<_, Frame>::new( + &mut r.inner, + r.limits.clone(), + ) + .map(|r| r.map(|t| Self::ContractCodeCostInputs(Box::new(t.0)))), + ), TypeVariant::ContractCodeEntry => Box::new( ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) .map(|r| r.map(|t| Self::ContractCodeEntry(Box::new(t.0)))), ), + TypeVariant::ContractCodeEntryExt => Box::new( + ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::ContractCodeEntryExt(Box::new(t.0)))), + ), + TypeVariant::ContractCodeEntryV1 => Box::new( + ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::ContractCodeEntryV1(Box::new(t.0)))), + ), TypeVariant::TtlEntry => Box::new( ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) .map(|r| r.map(|t| Self::TtlEntry(Box::new(t.0)))), @@ -51788,10 +52170,22 @@ impl Type { ReadXdrIter::<_, ContractDataEntry>::new(dec, r.limits.clone()) .map(|r| r.map(|t| Self::ContractDataEntry(Box::new(t)))), ), + TypeVariant::ContractCodeCostInputs => Box::new( + ReadXdrIter::<_, ContractCodeCostInputs>::new(dec, r.limits.clone()) + .map(|r| r.map(|t| Self::ContractCodeCostInputs(Box::new(t)))), + ), TypeVariant::ContractCodeEntry => Box::new( ReadXdrIter::<_, ContractCodeEntry>::new(dec, r.limits.clone()) .map(|r| r.map(|t| Self::ContractCodeEntry(Box::new(t)))), ), + TypeVariant::ContractCodeEntryExt => Box::new( + ReadXdrIter::<_, ContractCodeEntryExt>::new(dec, r.limits.clone()) + .map(|r| r.map(|t| Self::ContractCodeEntryExt(Box::new(t)))), + ), + TypeVariant::ContractCodeEntryV1 => Box::new( + ReadXdrIter::<_, ContractCodeEntryV1>::new(dec, r.limits.clone()) + .map(|r| r.map(|t| Self::ContractCodeEntryV1(Box::new(t)))), + ), TypeVariant::TtlEntry => Box::new( ReadXdrIter::<_, TtlEntry>::new(dec, r.limits.clone()) .map(|r| r.map(|t| Self::TtlEntry(Box::new(t)))), @@ -53289,9 +53683,18 @@ impl Type { TypeVariant::ContractDataEntry => Ok(Self::ContractDataEntry(Box::new( serde_json::from_reader(r)?, ))), + TypeVariant::ContractCodeCostInputs => Ok(Self::ContractCodeCostInputs(Box::new( + serde_json::from_reader(r)?, + ))), TypeVariant::ContractCodeEntry => Ok(Self::ContractCodeEntry(Box::new( serde_json::from_reader(r)?, ))), + TypeVariant::ContractCodeEntryExt => Ok(Self::ContractCodeEntryExt(Box::new( + serde_json::from_reader(r)?, + ))), + TypeVariant::ContractCodeEntryV1 => Ok(Self::ContractCodeEntryV1(Box::new( + serde_json::from_reader(r)?, + ))), TypeVariant::TtlEntry => Ok(Self::TtlEntry(Box::new(serde_json::from_reader(r)?))), TypeVariant::LedgerEntryExtensionV1 => Ok(Self::LedgerEntryExtensionV1(Box::new( serde_json::from_reader(r)?, @@ -54218,7 +54621,10 @@ impl Type { Self::LiquidityPoolEntryConstantProduct(ref v) => v.as_ref(), Self::ContractDataDurability(ref v) => v.as_ref(), Self::ContractDataEntry(ref v) => v.as_ref(), + Self::ContractCodeCostInputs(ref v) => v.as_ref(), Self::ContractCodeEntry(ref v) => v.as_ref(), + Self::ContractCodeEntryExt(ref v) => v.as_ref(), + Self::ContractCodeEntryV1(ref v) => v.as_ref(), Self::TtlEntry(ref v) => v.as_ref(), Self::LedgerEntryExtensionV1(ref v) => v.as_ref(), Self::LedgerEntryExtensionV1Ext(ref v) => v.as_ref(), @@ -54649,7 +55055,10 @@ impl Type { Self::LiquidityPoolEntryConstantProduct(_) => "LiquidityPoolEntryConstantProduct", Self::ContractDataDurability(_) => "ContractDataDurability", Self::ContractDataEntry(_) => "ContractDataEntry", + Self::ContractCodeCostInputs(_) => "ContractCodeCostInputs", Self::ContractCodeEntry(_) => "ContractCodeEntry", + Self::ContractCodeEntryExt(_) => "ContractCodeEntryExt", + Self::ContractCodeEntryV1(_) => "ContractCodeEntryV1", Self::TtlEntry(_) => "TtlEntry", Self::LedgerEntryExtensionV1(_) => "LedgerEntryExtensionV1", Self::LedgerEntryExtensionV1Ext(_) => "LedgerEntryExtensionV1Ext", @@ -54942,7 +55351,7 @@ impl Type { #[must_use] #[allow(clippy::too_many_lines)] - pub const fn variants() -> [TypeVariant; 418] { + pub const fn variants() -> [TypeVariant; 421] { Self::VARIANTS } @@ -55104,7 +55513,10 @@ impl Type { } Self::ContractDataDurability(_) => TypeVariant::ContractDataDurability, Self::ContractDataEntry(_) => TypeVariant::ContractDataEntry, + Self::ContractCodeCostInputs(_) => TypeVariant::ContractCodeCostInputs, Self::ContractCodeEntry(_) => TypeVariant::ContractCodeEntry, + Self::ContractCodeEntryExt(_) => TypeVariant::ContractCodeEntryExt, + Self::ContractCodeEntryV1(_) => TypeVariant::ContractCodeEntryV1, Self::TtlEntry(_) => TypeVariant::TtlEntry, Self::LedgerEntryExtensionV1(_) => TypeVariant::LedgerEntryExtensionV1, Self::LedgerEntryExtensionV1Ext(_) => TypeVariant::LedgerEntryExtensionV1Ext, @@ -55580,7 +55992,10 @@ impl WriteXdr for Type { Self::LiquidityPoolEntryConstantProduct(v) => v.write_xdr(w), Self::ContractDataDurability(v) => v.write_xdr(w), Self::ContractDataEntry(v) => v.write_xdr(w), + Self::ContractCodeCostInputs(v) => v.write_xdr(w), Self::ContractCodeEntry(v) => v.write_xdr(w), + Self::ContractCodeEntryExt(v) => v.write_xdr(w), + Self::ContractCodeEntryV1(v) => v.write_xdr(w), Self::TtlEntry(v) => v.write_xdr(w), Self::LedgerEntryExtensionV1(v) => v.write_xdr(w), Self::LedgerEntryExtensionV1Ext(v) => v.write_xdr(w), diff --git a/xdr/curr b/xdr/curr index b96148cd..a7de8ac7 160000 --- a/xdr/curr +++ b/xdr/curr @@ -1 +1 @@ -Subproject commit b96148cd4acc372cc9af17b909ffe4b12c43ecb6 +Subproject commit a7de8ac7d2ebf34fb9102fb27b5e7fd60a4775b2 diff --git a/xdr/curr-version b/xdr/curr-version index b7c39795..28f81620 100644 --- a/xdr/curr-version +++ b/xdr/curr-version @@ -1 +1 @@ -b96148cd4acc372cc9af17b909ffe4b12c43ecb6 \ No newline at end of file +a7de8ac7d2ebf34fb9102fb27b5e7fd60a4775b2 \ No newline at end of file