diff --git a/Cargo.lock b/Cargo.lock index 4ee996334..efa17459d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -17,6 +17,15 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + [[package]] name = "autocfg" version = "1.1.0" @@ -77,6 +86,12 @@ dependencies = [ "generic-array", ] +[[package]] +name = "bumpalo" +version = "3.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1ad822118d20d2c234f427000d5acc36eabe1e29a348c89b63dd60b13f28e5d" + [[package]] name = "byteorder" version = "1.4.3" @@ -107,6 +122,35 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "chrono" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfd4d1b31faaa3a89d7934dbded3111da0d2ef28e3ebccdb4f0179f5929d1ef1" +dependencies = [ + "iana-time-zone", + "num-integer", + "num-traits", + "serde", + "winapi", +] + +[[package]] +name = "codespan-reporting" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" +dependencies = [ + "termcolor", + "unicode-width", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" + [[package]] name = "cpufeatures" version = "0.2.5" @@ -149,6 +193,50 @@ dependencies = [ "zeroize", ] +[[package]] +name = "cxx" +version = "1.0.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19f39818dcfc97d45b03953c1292efc4e80954e1583c4aa770bac1383e2310a4" +dependencies = [ + "cc", + "cxxbridge-flags", + "cxxbridge-macro", + "link-cplusplus", +] + +[[package]] +name = "cxx-build" +version = "1.0.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e580d70777c116df50c390d1211993f62d40302881e54d4b79727acb83d0199" +dependencies = [ + "cc", + "codespan-reporting", + "once_cell", + "proc-macro2", + "quote", + "scratch", + "syn", +] + +[[package]] +name = "cxxbridge-flags" +version = "1.0.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56a46460b88d1cec95112c8c363f0e2c39afdb237f60583b0b36343bf627ea9c" + +[[package]] +name = "cxxbridge-macro" +version = "1.0.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "747b608fecf06b0d72d440f27acc99288207324b793be2c17991839f3d4995ea" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "darling" version = "0.14.1" @@ -305,6 +393,33 @@ name = "hex" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +dependencies = [ + "serde", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.51" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5a6ef98976b22b3b7f2f3a806f858cb862044cfa66805aa3ad84cb3d3b785ed" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "winapi", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fde6edd6cef363e9359ed3c98ba64590ba9eecba2293eb5a723ab32aee8926aa" +dependencies = [ + "cxx", + "cxx-build", +] [[package]] name = "ident_case" @@ -334,6 +449,7 @@ checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" dependencies = [ "autocfg", "hashbrown", + "serde", ] [[package]] @@ -357,6 +473,15 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c8af84674fe1f223a982c933a0ee1086ac4d4052aa0fb8060c12c6ad838e754" +[[package]] +name = "js-sys" +version = "0.3.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" +dependencies = [ + "wasm-bindgen", +] + [[package]] name = "libc" version = "0.2.134" @@ -369,6 +494,15 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "292a948cd991e376cf75541fe5b97a1081d713c618b4f1b9500f8844e49eb565" +[[package]] +name = "link-cplusplus" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9272ab7b96c9046fbc5bc56c06c117cb639fe2d509df0c421cad82d2915cf369" +dependencies = [ + "cc", +] + [[package]] name = "log" version = "0.4.17" @@ -441,6 +575,15 @@ dependencies = [ "autocfg", ] +[[package]] +name = "num_threads" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" +dependencies = [ + "libc", +] + [[package]] name = "object" version = "0.29.0" @@ -450,6 +593,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "once_cell" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e82dad04139b71a90c080c8463fe0dc7902db5192d939bd0950f074d014339e1" + [[package]] name = "opaque-debug" version = "0.3.0" @@ -609,6 +758,12 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" +[[package]] +name = "scratch" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8132065adcfd6e02db789d9285a0deb2f3fcb04002865ab67d5fb103533898" + [[package]] name = "serde" version = "1.0.145" @@ -640,6 +795,34 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_with" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "368f2d60d049ea019a84dcd6687b0d1e0030fe663ae105039bdf967ed5e6a9a7" +dependencies = [ + "base64", + "chrono", + "hex", + "indexmap", + "serde", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ccadfacf6cf10faad22bbadf55986bdd0856edfb5d9210aa1dcf1f516e84e93" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "sha2" version = "0.9.9" @@ -692,7 +875,7 @@ dependencies = [ [[package]] name = "soroban-env-common" version = "0.0.6" -source = "git+https://github.com/stellar/rs-soroban-env?rev=91cf595#91cf595508d475877f855619ad5baeb5f45a3885" +source = "git+https://github.com/stellar/rs-soroban-env?rev=4f2f3a2d#4f2f3a2da58dd869b559f41311815b20d1552ce5" dependencies = [ "soroban-env-macros", "soroban-wasmi", @@ -703,7 +886,7 @@ dependencies = [ [[package]] name = "soroban-env-guest" version = "0.0.6" -source = "git+https://github.com/stellar/rs-soroban-env?rev=91cf595#91cf595508d475877f855619ad5baeb5f45a3885" +source = "git+https://github.com/stellar/rs-soroban-env?rev=4f2f3a2d#4f2f3a2da58dd869b559f41311815b20d1552ce5" dependencies = [ "soroban-env-common", "static_assertions", @@ -712,7 +895,7 @@ dependencies = [ [[package]] name = "soroban-env-host" version = "0.0.6" -source = "git+https://github.com/stellar/rs-soroban-env?rev=91cf595#91cf595508d475877f855619ad5baeb5f45a3885" +source = "git+https://github.com/stellar/rs-soroban-env?rev=4f2f3a2d#4f2f3a2da58dd869b559f41311815b20d1552ce5" dependencies = [ "backtrace", "dyn-fmt", @@ -735,7 +918,7 @@ dependencies = [ [[package]] name = "soroban-env-macros" version = "0.0.6" -source = "git+https://github.com/stellar/rs-soroban-env?rev=91cf595#91cf595508d475877f855619ad5baeb5f45a3885" +source = "git+https://github.com/stellar/rs-soroban-env?rev=4f2f3a2d#4f2f3a2da58dd869b559f41311815b20d1552ce5" dependencies = [ "itertools", "proc-macro2", @@ -747,7 +930,7 @@ dependencies = [ [[package]] name = "soroban-native-sdk-macros" version = "0.0.6" -source = "git+https://github.com/stellar/rs-soroban-env?rev=91cf595#91cf595508d475877f855619ad5baeb5f45a3885" +source = "git+https://github.com/stellar/rs-soroban-env?rev=4f2f3a2d#4f2f3a2da58dd869b559f41311815b20d1552ce5" dependencies = [ "itertools", "proc-macro2", @@ -864,10 +1047,12 @@ dependencies = [ [[package]] name = "stellar-xdr" version = "0.0.6" -source = "git+https://github.com/stellar/rs-stellar-xdr?rev=5cca712b#5cca712b64a928574bc6f142a161bd8bdfe42b23" +source = "git+https://github.com/stellar/rs-stellar-xdr?rev=3ba13687#3ba1368786bc222735b09b3f99c0c8e6a71c18ce" dependencies = [ "base64", + "hex", "serde", + "serde_with", ] [[package]] @@ -905,6 +1090,15 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "termcolor" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" +dependencies = [ + "winapi-util", +] + [[package]] name = "test_add_bigint" version = "0.1.0" @@ -995,6 +1189,18 @@ dependencies = [ "syn", ] +[[package]] +name = "time" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d634a985c4d4238ec39cacaed2e7ae552fbd3c476b552c1deac3021b7d7eaf0c" +dependencies = [ + "itoa", + "libc", + "num_threads", + "serde", +] + [[package]] name = "tinyvec" version = "1.6.0" @@ -1022,6 +1228,12 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcc811dc4066ac62f84f11307873c4850cb653bfa9b1719cee2bd2204a4bc5dd" +[[package]] +name = "unicode-width" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" + [[package]] name = "unicode-xid" version = "0.2.4" @@ -1046,6 +1258,60 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasm-bindgen" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" + [[package]] name = "wasmparser" version = "0.88.0" @@ -1080,6 +1346,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" diff --git a/Cargo.toml b/Cargo.toml index fb95d3cc2..9d79105ac 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,12 +23,12 @@ soroban-sdk = { path = "soroban-sdk" } soroban-auth = { path = "soroban-auth" } soroban-spec = { path = "soroban-spec" } soroban-sdk-macros = { path = "soroban-sdk-macros" } -soroban-env-common = { git = "https://github.com/stellar/rs-soroban-env", rev = "91cf595" } -soroban-env-guest = { git = "https://github.com/stellar/rs-soroban-env", rev = "91cf595" } -soroban-env-host = { git = "https://github.com/stellar/rs-soroban-env", rev = "91cf595" } -soroban-env-macros = { git = "https://github.com/stellar/rs-soroban-env", rev = "91cf595" } -soroban-native-sdk-macros = { git = "https://github.com/stellar/rs-soroban-env", rev = "91cf595" } -stellar-xdr = { git = "https://github.com/stellar/rs-stellar-xdr", rev = "5cca712b" } +soroban-env-common = { git = "https://github.com/stellar/rs-soroban-env", rev = "4f2f3a2d" } +soroban-env-guest = { git = "https://github.com/stellar/rs-soroban-env", rev = "4f2f3a2d" } +soroban-env-host = { git = "https://github.com/stellar/rs-soroban-env", rev = "4f2f3a2d" } +soroban-env-macros = { git = "https://github.com/stellar/rs-soroban-env", rev = "4f2f3a2d" } +soroban-native-sdk-macros = { git = "https://github.com/stellar/rs-soroban-env", rev = "4f2f3a2d" } +stellar-xdr = { git = "https://github.com/stellar/rs-stellar-xdr", rev = "3ba13687" } wasmi = { package = "soroban-wasmi", git = "https://github.com/stellar/wasmi", rev = "d1ec0036" } # soroban-env-common = { path = "../rs-soroban-env/soroban-env-common" } diff --git a/soroban-sdk-macros/src/derive_enum.rs b/soroban-sdk-macros/src/derive_enum.rs index df39d40ad..692085a50 100644 --- a/soroban-sdk-macros/src/derive_enum.rs +++ b/soroban-sdk-macros/src/derive_enum.rs @@ -5,7 +5,7 @@ use soroban_env_common::Symbol; use syn::{spanned::Spanned, DataEnum, Error, Ident, Path}; use stellar_xdr::{ - ScSpecEntry, ScSpecTypeDef, ScSpecUdtUnionCaseV0, ScSpecUdtUnionV0, VecM, WriteXdr, + ScSpecEntry, ScSpecTypeDef, ScSpecUdtUnionCaseV0, ScSpecUdtUnionV0, StringM, WriteXdr, }; use crate::map_type::map_type; @@ -55,7 +55,7 @@ pub fn derive_type_enum( }; if let Some(f) = field { let spec_case = ScSpecUdtUnionCaseV0 { - name: name.try_into().unwrap_or_else(|_| VecM::default()), + name: name.try_into().unwrap_or_else(|_| StringM::default()), type_: Some(match map_type(&f.ty) { Ok(t) => t, Err(e) => { @@ -86,7 +86,7 @@ pub fn derive_type_enum( (spec_case, discriminant_const, try_from, into, try_from_xdr, into_xdr) } else { let spec_case = ScSpecUdtUnionCaseV0 { - name: name.try_into().unwrap_or_else(|_| VecM::default()), + name: name.try_into().unwrap_or_else(|_| StringM::default()), type_: None, }; let try_from = quote! { diff --git a/soroban-sdk-macros/src/derive_enum_int.rs b/soroban-sdk-macros/src/derive_enum_int.rs index 9c9d1ae51..ce2977887 100644 --- a/soroban-sdk-macros/src/derive_enum_int.rs +++ b/soroban-sdk-macros/src/derive_enum_int.rs @@ -1,10 +1,10 @@ use itertools::MultiUnzip; use proc_macro2::TokenStream as TokenStream2; use quote::{format_ident, quote}; -use stellar_xdr::ScSpecUdtEnumV0; +use stellar_xdr::{ScSpecUdtEnumV0, StringM}; use syn::{spanned::Spanned, DataEnum, Error, ExprLit, Ident, Lit, Path}; -use stellar_xdr::{ScSpecEntry, ScSpecUdtEnumCaseV0, VecM, WriteXdr}; +use stellar_xdr::{ScSpecEntry, ScSpecUdtEnumCaseV0, WriteXdr}; // TODO: Add conversions to/from ScVal types. @@ -44,7 +44,7 @@ pub fn derive_type_enum_int( 0 }; let spec_case = ScSpecUdtEnumCaseV0 { - name: name.try_into().unwrap_or_else(|_| VecM::default()), + name: name.try_into().unwrap_or_else(|_| StringM::default()), value: discriminant, }; let try_from = quote! { #discriminant => Self::#ident }; diff --git a/soroban-sdk-macros/src/derive_error_enum_int.rs b/soroban-sdk-macros/src/derive_error_enum_int.rs index ce4946d32..497c636a9 100644 --- a/soroban-sdk-macros/src/derive_error_enum_int.rs +++ b/soroban-sdk-macros/src/derive_error_enum_int.rs @@ -1,7 +1,7 @@ use itertools::MultiUnzip; use proc_macro2::TokenStream as TokenStream2; use quote::{format_ident, quote}; -use stellar_xdr::{ScSpecEntry, ScSpecUdtErrorEnumCaseV0, ScSpecUdtErrorEnumV0, VecM, WriteXdr}; +use stellar_xdr::{ScSpecEntry, ScSpecUdtErrorEnumCaseV0, ScSpecUdtErrorEnumV0, StringM, WriteXdr}; use syn::{spanned::Spanned, DataEnum, Error, ExprLit, Ident, Lit, Path}; pub fn derive_type_error_enum_int( @@ -40,7 +40,7 @@ pub fn derive_type_error_enum_int( 0 }; let spec_case = ScSpecUdtErrorEnumCaseV0 { - name: name.try_into().unwrap_or_else(|_| VecM::default()), + name: name.try_into().unwrap_or_else(|_| StringM::default()), value: discriminant, }; let try_from = quote! { #discriminant => Self::#ident }; diff --git a/soroban-sdk-macros/src/derive_fn.rs b/soroban-sdk-macros/src/derive_fn.rs index dc62ae657..141fb87a1 100644 --- a/soroban-sdk-macros/src/derive_fn.rs +++ b/soroban-sdk-macros/src/derive_fn.rs @@ -2,7 +2,7 @@ use itertools::MultiUnzip; use proc_macro2::TokenStream as TokenStream2; use quote::{format_ident, quote}; use stellar_xdr::{ - ScSpecEntry, ScSpecFunctionInputV0, ScSpecFunctionV0, ScSpecTypeDef, VecM, WriteXdr, + ScSpecEntry, ScSpecFunctionInputV0, ScSpecFunctionV0, ScSpecTypeDef, StringM, VecM, WriteXdr, }; use syn::{ punctuated::Punctuated, @@ -66,7 +66,7 @@ pub fn derive_fn( let name = name.try_into().unwrap_or_else(|_| { const MAX: u32 = 30; errors.push(Error::new(ident.span(), format!("argument name too long, max length {} characters", MAX))); - VecM::<_, MAX>::default() + StringM::::default() }); ScSpecFunctionInputV0{ name, type_ } }, @@ -148,7 +148,7 @@ pub fn derive_fn( MAX, ), )); - VecM::<_, MAX>::default() + StringM::::default() }), inputs: spec_args.try_into().unwrap_or_else(|_| { const MAX: u32 = 10; diff --git a/soroban-sdk-macros/src/derive_struct.rs b/soroban-sdk-macros/src/derive_struct.rs index c21999532..7a045c3c8 100644 --- a/soroban-sdk-macros/src/derive_struct.rs +++ b/soroban-sdk-macros/src/derive_struct.rs @@ -5,7 +5,7 @@ use soroban_env_common::Symbol; use syn::{spanned::Spanned, DataStruct, Error, Ident, Path}; use stellar_xdr::{ - ScSpecEntry, ScSpecTypeDef, ScSpecUdtStructFieldV0, ScSpecUdtStructV0, VecM, WriteXdr, + ScSpecEntry, ScSpecTypeDef, ScSpecUdtStructFieldV0, ScSpecUdtStructV0, StringM, WriteXdr, }; use crate::map_type::map_type; @@ -43,7 +43,7 @@ pub fn derive_type_struct( errors.push(Error::new(ident.span(), format!("struct field name {}", e))); } let spec_field = ScSpecUdtStructFieldV0 { - name: name.clone().try_into().unwrap_or_else(|_| VecM::default()), + name: name.clone().try_into().unwrap_or_else(|_| StringM::default()), type_: match map_type(&f.ty) { Ok(t) => t, Err(e) => { diff --git a/soroban-sdk-macros/src/derive_struct_tuple.rs b/soroban-sdk-macros/src/derive_struct_tuple.rs index f7923f1ab..845d3ee90 100644 --- a/soroban-sdk-macros/src/derive_struct_tuple.rs +++ b/soroban-sdk-macros/src/derive_struct_tuple.rs @@ -4,7 +4,7 @@ use quote::{format_ident, quote}; use syn::{spanned::Spanned, DataStruct, Error, Ident, Path}; use stellar_xdr::{ - ScSpecEntry, ScSpecTypeDef, ScSpecUdtStructFieldV0, ScSpecUdtStructV0, VecM, WriteXdr, + ScSpecEntry, ScSpecTypeDef, ScSpecUdtStructFieldV0, ScSpecUdtStructV0, StringM, WriteXdr, }; use crate::map_type::map_type; @@ -37,7 +37,7 @@ pub fn derive_type_struct_tuple( let ident = Literal::usize_unsuffixed(i); let name = format!("{}", i); let spec_field = ScSpecUdtStructFieldV0 { - name: name.try_into().unwrap_or_else(|_| VecM::default()), + name: name.try_into().unwrap_or_else(|_| StringM::default()), type_: match map_type(&f.ty) { Ok(t) => t, Err(e) => { diff --git a/soroban-sdk/src/accounts.rs b/soroban-sdk/src/accounts.rs index bc322b553..5575fc573 100644 --- a/soroban-sdk/src/accounts.rs +++ b/soroban-sdk/src/accounts.rs @@ -472,7 +472,7 @@ impl Accounts { account_id: id.clone(), balance: 0, flags: 0, - home_domain: xdr::VecM::default(), + home_domain: xdr::StringM::default(), inflation_dest: None, num_sub_entries: 0, seq_num: xdr::SequenceNumber(0),