diff --git a/src/simplified_representation/emitter.rs b/src/simplified_representation/emitter.rs index e096f99..c650f6b 100644 --- a/src/simplified_representation/emitter.rs +++ b/src/simplified_representation/emitter.rs @@ -237,8 +237,8 @@ impl AstConverting for SrEmitter { NodeTypeArgument::TemplateTypeArgument(_) => { unimplemented!(); } - NodeTypeArgument::AddressTypeArgument(_) => { - unimplemented!(); + NodeTypeArgument::AddressTypeArgument(n) => { + n.visit(self)?; } NodeTypeArgument::MapTypeArgument(_, _) => { unimplemented!(); diff --git a/tests/contracts/ByStr.scilla b/tests/contracts/ByStr.scilla index 9a5fe3a..4306b75 100644 --- a/tests/contracts/ByStr.scilla +++ b/tests/contracts/ByStr.scilla @@ -24,3 +24,11 @@ contract AllByStrVariants transition ArbitrageFromXCAD (token : ByStr20 with contract field balances : Map ByStr20 Uint128 end) end + +transition BuyNFTUsername( + username: String, + guardianship: Option ByStr20 with contract field verification_methods: Map String ByStr33 end, + id: String, + tyron: Option Uint128 + ) +end \ No newline at end of file diff --git a/tests/full_contract_tests.rs b/tests/full_contract_tests.rs index 158db83..596d599 100644 --- a/tests/full_contract_tests.rs +++ b/tests/full_contract_tests.rs @@ -118,19 +118,39 @@ fn test_bystr_contract_parse() { ) ]), fields: FieldList::default(), - transitions: TransitionList(vec![Transition::new( - "ArbitrageFromXCAD", - FieldList(vec![Field::new( - "token", - Type::ByStr20With { - type_name: "contract".to_string(), - fields: FieldList(vec![Field::new( - "balances", - Type::Map(Box::new(Type::ByStr20), Box::new(Type::Uint128)) - ),],), - }, - )]), - )]) + transitions: TransitionList(vec![ + Transition::new( + "ArbitrageFromXCAD", + FieldList(vec![Field::new( + "token", + Type::ByStr20With { + type_name: "contract".to_string(), + fields: FieldList(vec![Field::new( + "balances", + Type::Map(Box::new(Type::ByStr20), Box::new(Type::Uint128)) + ),],), + }, + )]), + ), + Transition::new( + "BuyNFTUsername", + FieldList(vec![ + Field::new("username", Type::String), + Field::new( + "guardianship", + Type::Option(Box::new(Type::ByStr20With { + type_name: "contract".to_string(), + fields: FieldList(vec![Field::new( + "verification_methods", + Type::Map(Box::new(Type::String), Box::new(Type::ByStrX(33))) + )]) + })) + ), + Field::new("id", Type::String), + Field::new("tyron", Type::Option(Box::new(Type::Uint128))), + ]) + ) + ]) } ); }