Skip to content
13 changes: 13 additions & 0 deletions cmd/crates/soroban-test/tests/it/integration/custom_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ async fn parse() {
enum_2_str(sandbox, id).await;
e_2_s_enum(sandbox, id).await;
asset(sandbox, id).await;
asset_with_alias(sandbox, id).await;
e_2_s_tuple(sandbox, id).await;
e_2_s_strukt(sandbox, id).await;
number_arg(sandbox, id).await;
Expand Down Expand Up @@ -159,6 +160,18 @@ async fn asset(sandbox: &TestEnv, id: &str) {
.await;
}

async fn asset_with_alias(sandbox: &TestEnv, id: &str) {
let res = invoke(
sandbox,
id,
"complex",
&json!({"Asset": ["test", "100"]}).to_string(),
)
.await;
let expected = json!({"Asset": [test_address(sandbox), "100"]}).to_string();
assert_eq!(res, expected);
}

fn complex_tuple() -> serde_json::Value {
json!({"Tuple": [{"a": 42, "b": true, "c": "world"}, "First"]})
}
Expand Down
Loading
Loading