Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add wasm functions to get txid for genesis utxos #372

Merged
merged 1 commit into from
Jan 24, 2025

Conversation

SebastienGllmt
Copy link
Contributor

I need these utility functions to easily query utxorpc on genesis utxo data

@SebastienGllmt SebastienGllmt merged commit 26a0d5e into develop Jan 24, 2025
@SebastienGllmt SebastienGllmt deleted the export-genesis-txid branch January 24, 2025 01:49
Copy link
Contributor

@rooooooooob rooooooooob left a comment

Choose a reason for hiding this comment

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

LGTM besides the one small comment but it's already been merged so it's not really worth changing as its just a minor overhead


#[wasm_bindgen]
pub fn genesis_txid_shelley(address: &crate::address::Address) -> TransactionHash {
TransactionHash::from(cml_chain::genesis::shelley::parse::redeem_address_to_txid(&address.clone().into()))
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can do address.as_ref() and avoid the clone()/into().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants