Skip to content

Commit

Permalink
Wasm friendly tx script evaluator (#90)
Browse files Browse the repository at this point in the history
* make tx script evaluator wasm friendly

* change utxo type to include script ver

* fix evaluator with version

* uncomment basic test for tx eval

* bump version

* chore: fix linting

---------

Co-authored-by: TW <[email protected]>
Co-authored-by: twwu123 <[email protected]>
Co-authored-by: SIDANWhatever <[email protected]>
  • Loading branch information
4 people authored Oct 9, 2024
1 parent 10fecf5 commit 101fbd8
Show file tree
Hide file tree
Showing 16 changed files with 509 additions and 1,607 deletions.
396 changes: 80 additions & 316 deletions package-lock.json

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions packages/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 packages/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[workspace]
version = "0.8.7"
version = "0.9.0"
resolver = "2"
members = [
"sidan-csl-rs",
Expand Down
18 changes: 9 additions & 9 deletions packages/sidan-csl-rs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sidan-csl-rs"
version = "0.8.7"
version = "0.9.0"
edition = "2021"
license = "Apache-2.0"
description = "Wrapper around the cardano-serialization-lib for easier transaction building, heavily inspired by cardano-cli APIs"
Expand All @@ -22,26 +22,26 @@ schemars = "0.8.8"
[target.'cfg(not(all(target_arch = "wasm32", not(target_os = "emscripten"))))'.dependencies]
# uplc = { version = "=1.0.26-alpha", default-features = false, features = ["native-secp256k1"] }
# uplc = "=1.0.26-alpha"
uplc = "=1.1.1"
uplc = "=1.1.4"
wasm-bindgen = { version = "=0.2.92", features = ["serde-serialize"] }
rand_os = "0.1"
noop_proc_macro = "0.3.0"
pallas-codec = { version = "0.30.1", features = ["num-bigint"] }
pallas-primitives = "0.30.1"
pallas-traverse = "0.30.1"
pallas-codec = { version = "0.30.2", features = ["num-bigint"] }
pallas-primitives = "0.30.2"
pallas-traverse = "0.30.2"

# wasm
[target.'cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))'.dependencies]
serde-wasm-bindgen = "0.4.5"
# uplc = { version = "=1.0.26-alpha", default-features = false, features = ["native-secp256k1"] }
uplc = "=1.1.1"
uplc = "=1.1.4"
wasm-bindgen = { version = "=0.2.92", features = ["serde-serialize"] }
rand_os = { version = "0.1", features = ["wasm-bindgen"] }
js-sys = "=0.3.61"
wasm-bindgen-futures = "=0.4.34"
pallas-codec = { version = "0.30.1", features = ["num-bigint"] }
pallas-primitives = "0.30.1"
pallas-traverse = "0.30.1"
pallas-codec = { version = "0.30.2", features = ["num-bigint"] }
pallas-primitives = "0.30.2"
pallas-traverse = "0.30.2"

[profile.release]
# Tell `rustc` to optimize for small code size.
Expand Down
2 changes: 1 addition & 1 deletion packages/sidan-csl-rs/src/core/utils/certificates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use super::to_bignum;

pub fn to_csl_drep(drep: &DRep) -> Result<csl::DRep, JsError> {
match drep {
DRep::DRepId(drep_id) => Ok(csl::DRep::from_bech32(&drep_id)?),
DRep::DRepId(drep_id) => Ok(csl::DRep::from_bech32(drep_id)?),
DRep::AlwaysAbstain => Ok(csl::DRep::new_always_abstain()),
DRep::AlwaysNoConfidence => Ok(csl::DRep::new_always_no_confidence()),
}
Expand Down
Loading

0 comments on commit 101fbd8

Please sign in to comment.