Skip to content

Commit

Permalink
feat: adding parsing input
Browse files Browse the repository at this point in the history
  • Loading branch information
HinsonSIDAN committed Mar 27, 2024
1 parent c5218a3 commit 9242cf3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sidan-csl-rs"
version = "0.2.6-beta4"
version = "0.2.6-beta5"
edition = "2021"
license = "MIT"
description = "Wrapper around the cardano-serialization-lib for easier transaction building, heavily inspired by cardano-cli APIs"
Expand Down
15 changes: 6 additions & 9 deletions rust/src/core/tx_parser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,12 @@ fn csl_output_to_mesh_output(output: csl::TransactionOutput) -> Output {
}

// TODO: Handle datum hash case
let datum: Option<Datum> = match output.plutus_data() {
Some(csl_datum) => Some(Datum {
type_: "Inline".to_string(),
data: csl_datum
.to_json(csl::plutus::PlutusDatumSchema::DetailedSchema)
.unwrap(),
}),
None => None,
};
let datum: Option<Datum> = output.plutus_data().map(|csl_datum| Datum {
type_: "Inline".to_string(),
data: csl_datum
.to_json(csl::plutus::PlutusDatumSchema::DetailedSchema)
.unwrap(),
});

let reference_script: Option<ProvidedScriptSource> = match output.script_ref() {
Some(csl_script_ref) => {
Expand Down

0 comments on commit 9242cf3

Please sign in to comment.