diff --git a/crates/tx3-lang/src/cardano.rs b/crates/tx3-lang/src/cardano.rs index 036ab79f..877aaca3 100644 --- a/crates/tx3-lang/src/cardano.rs +++ b/crates/tx3-lang/src/cardano.rs @@ -711,9 +711,18 @@ impl IntoLower for CardanoPublishBlockField { ctx: &crate::lowering::Context, ) -> Result { match self { - CardanoPublishBlockField::To(x) => Ok(("to".to_string(), x.into_lower(ctx)?)), - CardanoPublishBlockField::Amount(x) => Ok(("amount".to_string(), x.into_lower(ctx)?)), - CardanoPublishBlockField::Datum(x) => Ok(("datum".to_string(), x.into_lower(ctx)?)), + CardanoPublishBlockField::To(x) => { + let ctx = ctx.enter_address_expr(); + Ok(("to".to_string(), x.into_lower(&ctx)?)) + } + CardanoPublishBlockField::Amount(x) => { + let ctx = ctx.enter_asset_expr(); + Ok(("amount".to_string(), x.into_lower(&ctx)?)) + } + CardanoPublishBlockField::Datum(x) => { + let ctx = ctx.enter_datum_expr(); + Ok(("datum".to_string(), x.into_lower(&ctx)?)) + } CardanoPublishBlockField::Version(x) => Ok(("version".to_string(), x.into_lower(ctx)?)), CardanoPublishBlockField::Script(x) => Ok(("script".to_string(), x.into_lower(ctx)?)), }