Skip to content

Commit

Permalink
fix: pass tx hashes to balius
Browse files Browse the repository at this point in the history
  • Loading branch information
SupernaviX committed Jan 22, 2025
1 parent 921492a commit 5a481e8
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 10 deletions.
6 changes: 3 additions & 3 deletions 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 firefly-balius/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
repository = "https://github.com/blockfrost/firefly-cardano"

[dependencies]
balius-sdk = { git = "https://github.com/txpipe/balius.git", rev = "e54ec4d" }
balius-sdk = { git = "https://github.com/txpipe/balius.git", rev = "dd56cd0" }
hex = "0.4"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
2 changes: 1 addition & 1 deletion firefly-cardanoconnect/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ aide = { version = "0.14", features = ["axum", "axum-json", "axum-query"] }
anyhow = "1"
async-trait = "0.1"
axum = { version = "0.8", features = ["macros", "ws"] }
balius-runtime = { git = "https://github.com/txpipe/balius.git", rev = "e54ec4d" }
balius-runtime = { git = "https://github.com/txpipe/balius.git", rev = "dd56cd0" }
blockfrost = { git = "https://github.com/SupernaviX/blockfrost-rust.git", rev = "cfa7a5e", default-features = false, features = ["rustls-tls"] }
blockfrost-openapi = "0.1.69"
clap = { version = "4", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion firefly-cardanoconnect/src/contracts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ impl ContractListener {
for runtime in &self.runtimes {
let mut lock = runtime.lock().await;
if let Err(error) = lock.apply(rollbacks, block).await {
error!("could not gather events for new blocks: {error}");
error!("could not gather events for new blocks: {error:#}");
}
}
}
Expand Down
8 changes: 7 additions & 1 deletion firefly-cardanoconnect/src/contracts/u5c.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use pallas_crypto::hash::Hasher;
use pallas_primitives::conway;
use pallas_traverse::ComputeHash as _;
use utxorpc_spec::utxorpc::v1alpha::cardano;
Expand Down Expand Up @@ -93,7 +94,12 @@ fn convert_tx(bytes: &[u8]) -> cardano::Tx {
use pallas_primitives::{alonzo, conway};

let real_tx: conway::Tx = minicbor::decode(bytes).unwrap();
let mut tx = cardano::Tx::default();
let mut tx = cardano::Tx {
hash: Hasher::<256>::hash_cbor(&real_tx.transaction_body)
.to_vec()
.into(),
..cardano::Tx::default()
};
for real_output in real_tx.transaction_body.outputs {
let mut output = cardano::TxOutput::default();
match real_output {
Expand Down
4 changes: 2 additions & 2 deletions wasm/simple-tx/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 wasm/simple-tx/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
repository = "https://github.com/SundaeSwap-finance/firefly-cardano"

[dependencies]
balius-sdk = { git = "https://github.com/txpipe/balius.git", rev = "e54ec4d" }
balius-sdk = { git = "https://github.com/txpipe/balius.git", rev = "dd56cd0" }
firefly-balius = { path = "../../firefly-balius" }
hex = "0.4"
pallas-addresses = "0.32.0"
Expand Down

0 comments on commit 5a481e8

Please sign in to comment.