diff --git a/catalyst-gateway/bin/Cargo.toml b/catalyst-gateway/bin/Cargo.toml index 32a0293c3736..0e5035208d17 100644 --- a/catalyst-gateway/bin/Cargo.toml +++ b/catalyst-gateway/bin/Cargo.toml @@ -18,9 +18,9 @@ workspace = true cardano-chain-follower = { version = "0.0.5", git = "https://github.com/input-output-hk/catalyst-libs.git", tag = "cardano-chain-follower-v0.0.5" } c509-certificate = { version = "0.0.3", git = "https://github.com/input-output-hk/catalyst-libs.git", tag = "v0.0.3" } -pallas = { version = "0.30.1", git = "https://github.com/input-output-hk/catalyst-pallas.git", rev = "9b5183c8b90b90fe2cc319d986e933e9518957b3" } -pallas-traverse = { version = "0.30.1", git = "https://github.com/input-output-hk/catalyst-pallas.git", rev = "9b5183c8b90b90fe2cc319d986e933e9518957b3" } -#pallas-crypto = { version = "0.30.1", git = "https://github.com/input-output-hk/catalyst-pallas.git", rev = "9b5183c8b90b90fe2cc319d986e933e9518957b3" } +pallas = { version = "0.31.0", git = "https://github.com/input-output-hk/catalyst-pallas.git", rev = "51c0aa752926ecebafbf7b4ba90f62f835b78805" } +pallas-traverse = { version = "0.31.0", git = "https://github.com/input-output-hk/catalyst-pallas.git", rev = "51c0aa752926ecebafbf7b4ba90f62f835b78805" } +#pallas-crypto = { version = "0.31.0", git = "https://github.com/input-output-hk/catalyst-pallas.git", rev = "51c0aa752926ecebafbf7b4ba90f62f835b78805" } clap = { version = "4.5.20", features = ["derive", "env"] } tracing = { version = "0.1.40", features = ["log"] } diff --git a/catalyst-gateway/bin/src/cardano/util.rs b/catalyst-gateway/bin/src/cardano/util.rs index 5383c3690076..8647198e78b4 100644 --- a/catalyst-gateway/bin/src/cardano/util.rs +++ b/catalyst-gateway/bin/src/cardano/util.rs @@ -104,7 +104,7 @@ pub fn extract_stake_credentials_from_certs( StakeCredential::AddrKeyhash(stake_credential) => { stake_credentials.push(hex::encode(stake_credential.as_slice())); }, - StakeCredential::Scripthash(_) => (), + StakeCredential::ScriptHash(_) => (), } }, _ => continue, diff --git a/catalyst-gateway/bin/src/db/index/block/certs.rs b/catalyst-gateway/bin/src/db/index/block/certs.rs index 72b2d8165aef..e9ba2b376a3b 100644 --- a/catalyst-gateway/bin/src/db/index/block/certs.rs +++ b/catalyst-gateway/bin/src/db/index/block/certs.rs @@ -168,7 +168,7 @@ impl CertInsertQuery { // witnessed. (cred.to_vec(), addr.clone(), false) }, - pallas::ledger::primitives::conway::StakeCredential::Scripthash(script) => { + pallas::ledger::primitives::conway::StakeCredential::ScriptHash(script) => { (script.to_vec(), default_addr, true) }, }; @@ -251,8 +251,8 @@ impl CertInsertQuery { /// Index the certificates in a transaction. pub(crate) fn index( - &mut self, txs: &pallas::ledger::traverse::MultiEraTx<'_>, slot_no: u64, txn: i16, - block: &MultiEraBlock, + &mut self, txs: &pallas::ledger::traverse::MultiEraTxWithRawAuxiliary<'_>, slot_no: u64, + txn: i16, block: &MultiEraBlock, ) { #[allow(clippy::match_same_arms)] txs.certs().iter().for_each(|cert| { diff --git a/catalyst-gateway/bin/src/db/index/block/txi.rs b/catalyst-gateway/bin/src/db/index/block/txi.rs index f8ff02da8af6..394ebbb83458 100644 --- a/catalyst-gateway/bin/src/db/index/block/txi.rs +++ b/catalyst-gateway/bin/src/db/index/block/txi.rs @@ -74,7 +74,9 @@ impl TxiInsertQuery { } /// Index the transaction Inputs. - pub(crate) fn index(&mut self, txs: &pallas_traverse::MultiEraTx<'_>, slot_no: u64) { + pub(crate) fn index( + &mut self, txs: &pallas_traverse::MultiEraTxWithRawAuxiliary<'_>, slot_no: u64, + ) { // Index the TXI's. for txi in txs.inputs() { let txn_hash = txi.hash().to_vec(); diff --git a/catalyst-gateway/bin/src/db/index/block/txo/mod.rs b/catalyst-gateway/bin/src/db/index/block/txo/mod.rs index f3f08440e60e..c9f7226a36c9 100644 --- a/catalyst-gateway/bin/src/db/index/block/txo/mod.rs +++ b/catalyst-gateway/bin/src/db/index/block/txo/mod.rs @@ -136,8 +136,8 @@ impl TxoInsertQuery { /// Index the transaction Inputs. pub(crate) fn index( - &mut self, txs: &pallas::ledger::traverse::MultiEraTx<'_>, slot_no: u64, txn_hash: &[u8], - txn: i16, + &mut self, txs: &pallas::ledger::traverse::MultiEraTxWithRawAuxiliary<'_>, slot_no: u64, + txn_hash: &[u8], txn: i16, ) { let txn_id = hex::encode_upper(txn_hash); @@ -159,7 +159,7 @@ impl TxoInsertQuery { txn, txo_index, &address, - txo.lovelace_amount(), + txo.value().coin(), txn_hash, ); @@ -171,13 +171,13 @@ impl TxoInsertQuery { slot_no, txn, &address, - txo.lovelace_amount(), + txo.value().coin(), ); self.unstaked_txo.push(params); } - for asset in txo.non_ada_assets() { + for asset in txo.value().assets() { let policy_id = asset.policy().to_vec(); for policy_asset in asset.assets() { if policy_asset.is_output() {