Skip to content

Commit db4b796

Browse files
serejkaaa512MrWad3r
authored andcommitted
Update tycho-types to 0.3.2
1 parent 60faf96 commit db4b796

File tree

3 files changed

+18
-8
lines changed

3 files changed

+18
-8
lines changed

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ members = [
2020
anyhow = "1.0"
2121
async-trait = "0.1"
2222
ed25519-dalek = "2.1"
23-
tycho-types = { version = "0.2", features = ["tycho", "abi"] }
23+
tycho-types = { version = "0.3.2", features = ["tycho", "abi"] }
2424
futures-util = "0.3"
2525
hex = { version = "0.4" }
2626
num-bigint = "0.4.6"
@@ -39,15 +39,15 @@ proc-macro2 = "1.0"
3939
quote = "1.0"
4040
syn = { version = "2.0", features = ["full"] }
4141

42-
tycho-executor = "0.2"
43-
tycho-vm = "0.2"
42+
tycho-executor = "0.3.2"
43+
tycho-vm = "0.3.2"
4444

4545
# local deps
4646
nekoton-core = { path = "./core" }
4747
nekoton-transport = { path = "./transport" }
4848
nekoton-utils = { path = "./utils" }
4949
nekoton-proc = { path = "./proc" }
5050

51-
#[patch.crates-io]
52-
#everscale-types = { git = "https://github.com/broxus/everscale-types.git" }
5351

52+
#[patch.crates-io]
53+
#tycho-types = { git = "https://github.com/broxus/tycho-types.git", rev = "f9e5dbe1222ee51f3e4f5a6836f95a515dd6cdf1" }

proc/src/generator.rs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,13 +220,13 @@ impl StructGenerator {
220220
} else {
221221
format!("{}FunctionInput", name.to_camel())
222222
};
223-
223+
224224
let struct_name = if name.starts_with("_") {
225225
format!("{f_name}Ext")
226226
} else {
227227
f_name
228228
};
229-
229+
230230
let model = self.generate_model(&struct_name, inputs.clone());
231231

232232
if !self.generated_structs.contains_key(&struct_name) {
@@ -432,6 +432,10 @@ impl StructGenerator {
432432
}
433433
}
434434
AbiType::Ref(a) => self.make_struct_property(name, a.as_ref()),
435+
AbiType::AddressStd => StructProperty::Simple {
436+
name,
437+
type_name: syn::parse_quote!(tycho_types::models::message::StdAddr),
438+
},
435439
}
436440
}
437441
}
@@ -543,6 +547,12 @@ fn quote_abi_type(ty: &AbiType) -> proc_macro2::TokenStream {
543547
tycho_types::abi::AbiType::Ref(std::sync::Arc<#ty>)
544548
}
545549
}
550+
AbiType::AddressStd => {
551+
let ty: syn::Type = syn::parse_quote!(tycho_types::abi::AbiType::AddressStd);
552+
quote! {
553+
#ty
554+
}
555+
}
546556
};
547557
quote
548558
}

proc/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ use std::fs;
66
use std::path::Path;
77
use syn::parse::{Parse, ParseStream};
88
use syn::{parse_macro_input, ItemMod};
9-
use tycho_types::abi::{AbiHeaderType, Contract};
109
use syn::{LitStr, Result};
10+
use tycho_types::abi::{AbiHeaderType, Contract};
1111

1212
use crate::generator::{FunctionDescriptionTokens, StructGenerator};
1313

0 commit comments

Comments
 (0)