Skip to content

Conversation

@Benja272
Copy link
Contributor

No description provided.

Comment on lines 394 to 395
cardano_payment_part = { "payment_part" ~ "(" ~ data_expr ~ ")" }
cardano_staking_part = { "staking_part" ~ "(" ~ data_expr ~ ")" }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename to cardano_address_payment_part and cardano_address_staking_part

}

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
pub struct CardanoPaymentPart {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename to AddressPaymentPart

}

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
pub struct CardanoStakingPart {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename to AddressStakingPart

NegateOp(NegateOp),
PropertyOp(PropertyOp),
UtxoRef(UtxoRef),
CardanoFunctions(crate::cardano::CardanoFunctions),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add individual functions instead of aggregating as a single enum variant.

Comment on lines 153 to 157
ir::Expression::AdHocDirective(x) => match x.name.as_str() {
"cardano_address_payment_part" => Ok(extract_address_part(&x.data, 1..29)),
"cardano_address_staking_part" => Ok(extract_address_part(&x.data, 29..)),
_ => Ok(().as_data()),
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

relying on byte positions is too risky. Use pallas::ledger::addresses::Address to parse the bytes and return the data fragment we need.

@Benja272 Benja272 requested a review from scarmuega October 21, 2025 20:23
@Proxiweb
Copy link

Proxiweb commented Nov 5, 2025

Sorry for this wrongly approved review. Too much github tabs opened. 😢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

4 participants