From 2c2b09b03848a37499d0382cc5b707d1bd890422 Mon Sep 17 00:00:00 2001 From: Enzo Cioppettini Date: Mon, 18 Mar 2024 13:36:45 -0300 Subject: [PATCH] bump cml dep to 5.2.0 --- Cargo.lock | 46 +++++++++---------- indexer/Cargo.toml | 8 ++-- indexer/reparse/Cargo.toml | 8 ++-- indexer/tasks/Cargo.toml | 8 ++-- indexer/tasks/src/byron/byron_txs.rs | 5 +- .../tasks/src/multiera/multiera_cip25entry.rs | 3 +- .../tasks/src/multiera/multiera_metadata.rs | 3 +- indexer/tasks/src/multiera/multiera_txs.rs | 5 +- .../tasks/src/multiera/utils/cip25_parse.rs | 3 +- 9 files changed, 44 insertions(+), 45 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 290056da..7a78de24 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -584,9 +584,9 @@ dependencies = [ "anyhow", "async-trait", "clap 3.2.25", - "cml-chain 5.0.0", - "cml-core 5.0.0", - "cml-crypto 5.0.0", + "cml-chain 5.2.0", + "cml-core 5.2.0", + "cml-crypto 5.2.0", "cml-multi-era", "ctrlc", "dcspark-blockchain-source", @@ -765,15 +765,15 @@ dependencies = [ [[package]] name = "cml-chain" -version = "5.0.0" +version = "5.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9771caeea0ff074be4d59235eb261806d1e2a33d42dad909396f908eaa8cea81" +checksum = "ec309ed37a653542db58bf506bf31f59f942a5cf269c1709d9555b699a1b302a" dependencies = [ "base64 0.21.7", "bech32 0.7.3", "cbor_event", - "cml-core 5.0.0", - "cml-crypto 5.0.0", + "cml-core 5.2.0", + "cml-crypto 5.2.0", "derivative", "fraction", "getrandom", @@ -820,9 +820,9 @@ dependencies = [ [[package]] name = "cml-core" -version = "5.0.0" +version = "5.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "710010ebd36f8562462929605c5bb5eb472e444f4abee17bc27214f80f1fed52" +checksum = "38c826dd7e8939826e1090ebbef48dce630bbceb2a4a4aadbdccd6b583bb7d02" dependencies = [ "base64 0.13.1", "bech32 0.7.3", @@ -870,15 +870,15 @@ dependencies = [ [[package]] name = "cml-crypto" -version = "5.0.0" +version = "5.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b82642c8b143e7c019fcf73b5f8676825e8f90e7d0b8e3dae6aa3170c3fd0e6" +checksum = "3e79a9a6614c1fce917db76eda4ba44fc9a3d8ee5d43becf66299e89e04a8a0f" dependencies = [ "base64 0.21.7", "bech32 0.7.3", "cbor_event", "cfg-if 1.0.0", - "cml-core 5.0.0", + "cml-core 5.2.0", "cryptoxide", "derivative", "digest 0.9.0", @@ -894,15 +894,15 @@ dependencies = [ [[package]] name = "cml-multi-era" -version = "5.0.0" +version = "5.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8c41a87f93aa47c69a88bf9b7f0b28f13efe8968a0c3fd01412146ce6aab825" +checksum = "e71d10d6eb5afaa9c2befec03827defea3929b455166154ab8bc25d6dc717767" dependencies = [ "bech32 0.7.3", "cbor_event", - "cml-chain 5.0.0", - "cml-core 5.0.0", - "cml-crypto 5.0.0", + "cml-chain 5.2.0", + "cml-core 5.2.0", + "cml-crypto 5.2.0", "derivative", "hex", "linked-hash-map", @@ -2852,9 +2852,9 @@ name = "reparse" version = "0.1.0" dependencies = [ "anyhow", - "cml-chain 5.0.0", - "cml-core 5.0.0", - "cml-crypto 5.0.0", + "cml-chain 5.2.0", + "cml-core 5.2.0", + "cml-crypto 5.2.0", "cml-multi-era", "dotenv", "entity", @@ -3741,9 +3741,9 @@ dependencies = [ "anyhow", "cardano-projected-nft", "cfg-if 1.0.0", - "cml-chain 5.0.0", - "cml-core 5.0.0", - "cml-crypto 5.0.0", + "cml-chain 5.2.0", + "cml-core 5.2.0", + "cml-crypto 5.2.0", "cml-multi-era", "cryptoxide", "entity", diff --git a/indexer/Cargo.toml b/indexer/Cargo.toml index a378edb6..bb80bd68 100644 --- a/indexer/Cargo.toml +++ b/indexer/Cargo.toml @@ -21,10 +21,10 @@ tasks = { path = "tasks" } # [indexer] anyhow = { version = "1.0.69" } async-trait = { version = "0.1.64" } -cml-chain = { version = "5.0.0" } -cml-core = { version = "5.0.0" } -cml-crypto = { version = "5.0.0" } -cml-multi-era = { version = "5.0.0" } +cml-chain = { version = "5.2.0" } +cml-core = { version = "5.2.0" } +cml-crypto = { version = "5.2.0" } +cml-multi-era = { version = "5.2.0" } clap = { version = "3.1", features = ["derive"] } ctrlc = { version = "3.2.4", features = ["termination"] } dotenv = { version = "0.15.0" } diff --git a/indexer/reparse/Cargo.toml b/indexer/reparse/Cargo.toml index 89fe41c7..305c07c3 100644 --- a/indexer/reparse/Cargo.toml +++ b/indexer/reparse/Cargo.toml @@ -10,10 +10,10 @@ entity = { path = "../entity" } # [reparse] anyhow = { version = "1.0.69" } -cml-chain = { version = "5.0.0" } -cml-core = { version = "5.0.0" } -cml-crypto = { version = "5.0.0" } -cml-multi-era = { version = "5.0.0" } +cml-chain = { version = "5.2.0" } +cml-core = { version = "5.2.0" } +cml-crypto = { version = "5.2.0" } +cml-multi-era = { version = "5.2.0" } dotenv = { version = "0.15.0" } futures = { version = "0.3.21" } hex = { version = "0.4.0" } diff --git a/indexer/tasks/Cargo.toml b/indexer/tasks/Cargo.toml index 6adbe901..27e68a44 100644 --- a/indexer/tasks/Cargo.toml +++ b/indexer/tasks/Cargo.toml @@ -12,10 +12,10 @@ entity = { path = "../entity" } # [tasks] anyhow = { version = "1.0.69" } -cml-chain = { version = "5.0.0" } -cml-core = { version = "5.0.0" } -cml-crypto = { version = "5.0.0" } -cml-multi-era = { version = "5.0.0" } +cml-chain = { version = "5.2.0" } +cml-core = { version = "5.2.0" } +cml-crypto = { version = "5.2.0" } +cml-multi-era = { version = "5.2.0" } cardano-projected-nft = { git = "https://github.com/dcSpark/projected-nft-whirlpool.git", rev = "13f81e8666743fefd14c5e1affb1cd828d8c473b" } cfg-if = { version = "1.0.0" } cryptoxide = { version = "0.4.2" } diff --git a/indexer/tasks/src/byron/byron_txs.rs b/indexer/tasks/src/byron/byron_txs.rs index aef93c48..2befec4c 100644 --- a/indexer/tasks/src/byron/byron_txs.rs +++ b/indexer/tasks/src/byron/byron_txs.rs @@ -1,5 +1,6 @@ use crate::{dsl::task_macro::*, era_common::transactions_from_hashes, utils::blake2b256}; use cml_core::serialization::ToBytes; +use cml_crypto::RawBytesEncoding; use cml_multi_era::byron::block::ByronBlock; use cml_multi_era::MultiEraBlock; use entity::sea_orm::Set; @@ -48,7 +49,7 @@ async fn handle_tx( .body .tx_payload .iter() - .map(|tx| tx.byron_tx.hash().to_vec()) + .map(|tx| tx.byron_tx.hash().to_raw_bytes().to_vec()) .collect::>>(), _ => vec![], }; @@ -70,7 +71,7 @@ async fn handle_tx( }; TransactionActiveModel { - hash: Set(tx.byron_tx.hash().to_vec()), + hash: Set(tx.byron_tx.hash().to_raw_bytes().to_vec()), block_id: Set(database_block.id), tx_index: Set(idx as i32), payload: Set(tx_payload), diff --git a/indexer/tasks/src/multiera/multiera_cip25entry.rs b/indexer/tasks/src/multiera/multiera_cip25entry.rs index 6042e100..268a6af4 100644 --- a/indexer/tasks/src/multiera/multiera_cip25entry.rs +++ b/indexer/tasks/src/multiera/multiera_cip25entry.rs @@ -1,8 +1,7 @@ use std::collections::{BTreeMap, BTreeSet}; use crate::config::EmptyConfig::EmptyConfig; -use cml_chain::crypto::ScriptHash; -use cml_core::metadata::TransactionMetadatum; +use cml_chain::{auxdata::TransactionMetadatum, crypto::ScriptHash}; use cml_core::serialization::FromBytes; use entity::{ prelude::*, diff --git a/indexer/tasks/src/multiera/multiera_metadata.rs b/indexer/tasks/src/multiera/multiera_metadata.rs index 4e3663ed..762b3042 100644 --- a/indexer/tasks/src/multiera/multiera_metadata.rs +++ b/indexer/tasks/src/multiera/multiera_metadata.rs @@ -1,5 +1,4 @@ -use cml_chain::auxdata::AuxiliaryData; -use cml_core::metadata::Metadata; +use cml_chain::auxdata::{AuxiliaryData, Metadata}; use cml_core::serialization::Serialize; use std::collections::BTreeMap; diff --git a/indexer/tasks/src/multiera/multiera_txs.rs b/indexer/tasks/src/multiera/multiera_txs.rs index 5d1d1b93..3d6f2374 100644 --- a/indexer/tasks/src/multiera/multiera_txs.rs +++ b/indexer/tasks/src/multiera/multiera_txs.rs @@ -1,4 +1,5 @@ use cml_core::serialization::Serialize; +use cml_crypto::RawBytesEncoding; use std::collections::{BTreeSet, HashSet}; use super::multiera_block::MultieraBlockTask; @@ -45,7 +46,7 @@ async fn handle_tx( .1 .transaction_bodies() .iter() - .map(|tx_body| tx_body.hash().to_vec()) + .map(|tx_body| tx_body.hash().to_raw_bytes().to_vec()) .collect::>() .as_slice(), ) @@ -72,7 +73,7 @@ async fn handle_tx( vec![] }; TransactionActiveModel { - hash: Set(tx.hash().to_vec()), + hash: Set(tx.hash().to_raw_bytes().to_vec()), block_id: Set(database_block.id), tx_index: Set(idx as i32), payload: Set(tx_payload), diff --git a/indexer/tasks/src/multiera/utils/cip25_parse.rs b/indexer/tasks/src/multiera/utils/cip25_parse.rs index ccfffc85..31ff76a5 100644 --- a/indexer/tasks/src/multiera/utils/cip25_parse.rs +++ b/indexer/tasks/src/multiera/utils/cip25_parse.rs @@ -3,8 +3,7 @@ use std::collections::{BTreeMap, BTreeSet}; -use cml_chain::crypto::ScriptHash; -use cml_core::metadata::TransactionMetadatum; +use cml_chain::{auxdata::TransactionMetadatum, crypto::ScriptHash}; use cml_core::serialization::{Serialize, ToBytes}; use super::user_asset::{AssetName, Cip25ParseError, Payload, PolicyId};