diff --git a/cardano_chain_sync/Cargo.toml b/cardano_chain_sync/Cargo.toml index 3110d5f..20f3567 100644 --- a/cardano_chain_sync/Cargo.toml +++ b/cardano_chain_sync/Cargo.toml @@ -10,10 +10,11 @@ async-trait = "0.1.68" bytes = "1.4.0" error-stack = {version="0.4.0", features=["std","anyhow","hooks"]} hex = "0.4.3" -pallas = "0.18.1" -pallas-primitives = "0.18.1" -pallas-traverse = "0.18.1" -pallas_network = { git = "https://github.com/OlofBlomqvist/pallas", branch="feat-win-pipes", package="pallas-network" } +pallas = "0.22.0" +pallas-primitives = "0.22.0" +pallas-traverse = "0.22.0" +pallas-network ={ version="0.22.0"} +#pallas_network = { git = "https://github.com/OlofBlomqvist/pallas", branch="feat-win-pipes", package="pallas-network" } #pallas-network = { path = "C:/Users/oblink/Documents/GitHub/pallas/pallas-network" } #pallas_network = { git = "https://github.com/txpipe/pallas.git", branch = "main", package = "pallas-network" } diff --git a/marlowe_indexer/Cargo.toml b/marlowe_indexer/Cargo.toml index 55e236a..4c39ebb 100644 --- a/marlowe_indexer/Cargo.toml +++ b/marlowe_indexer/Cargo.toml @@ -10,9 +10,9 @@ cardano_chain_sync = { path = "../cardano_chain_sync" } tokio = { version ="1.28.0", features = ["full"] } anyhow = { version ="1.0.71" } error-stack = {version="0.4.0", features=["std","anyhow","hooks"]} -pallas = "0.18.1" -pallas-primitives = "0.18.1" -pallas-traverse = "0.18.1" +pallas = "0.22.0" +pallas-primitives = "0.22.0" +pallas-traverse = "0.22.0" pallas-crypto = "*" #pallas-network = { path = "C:/Users/oblink/Documents/GitHub/pallas/pallas-network" } #pallas_network = { git = "https://github.com/OlofBlomqvist/pallas", branch="feat-win-pipes", package="pallas-network" } @@ -23,18 +23,18 @@ tonic = "*" #marlowe_lang = { path = "../../marlowe_rust",features=["unstable","utils"] } marlowe_lang = { git = "https://github.com/OlofBlomqvist/marlowe_lang",features=["unstable","utils"] } hex = "0.4.3" -async-graphql = "6.0.4" -async-graphql-warp = "6.0.4" +async-graphql = "7.0.1" +async-graphql-warp = "7.0.1" async-trait = "0.1.68" serde_json = "1.0.96" -env_logger = "0.10.0" +env_logger = "0.11.1" bs58 = "*" ctrlc = "3.1" reqwest = "*" crossterm = "*" clap = "4.3.21" structopt = "0.3.26" -strum_macros = "0.25.2" +strum_macros = "0.26.1" futures-timer = "3.0.2" serde = "1.0.183" diff --git a/marlowe_indexer/src/worker.rs b/marlowe_indexer/src/worker.rs index 8405299..e1016c7 100644 --- a/marlowe_indexer/src/worker.rs +++ b/marlowe_indexer/src/worker.rs @@ -227,7 +227,9 @@ impl MarloweSyncWorker { } - if let Some(redeemers) = transaction.redeemers() { + let redeemers = transaction.redeemers(); + + if redeemers.len() > 0 { let redeemer_plutus_data = &redeemers.iter().find(|r|r.index as usize ==index_of_input_in_this_tx) .expect("because this transaction consumes an utxo from the marlowe validator, there MUST be a redeemer here.").data; @@ -292,7 +294,7 @@ impl MarloweSyncWorker { // in case of a tx closing the contract, there does not need to be a datum let (datum_hash, datum,utxo_id,_original_datum_bytes) = if let Some(o) = out_to_marlowe.first() { - let rr = read_marlowe_info_from_utxo(&o.1,&datums) ; + let rr = read_marlowe_info_from_utxo(&o.1,datums) ; match rr { Ok(d) => { match d { @@ -456,7 +458,7 @@ impl MarloweSyncWorker { let tx_datums = transaction.plutus_data(); - for d in &tx_datums { + for d in tx_datums { datums.insert( d.original_hash(), d.raw_cbor() @@ -637,7 +639,7 @@ pub enum MarloweDatumRes { Raw(String,marlowe_lang::types::marlowe::MarloweDatum,Vec) } -fn read_marlowe_info_from_utxo(o:&MultiEraOutput,datums:&[&pallas::codec::utils::KeepRaw<'_, pallas_primitives::babbage::PlutusData>]) -> Result { +fn read_marlowe_info_from_utxo(o:&MultiEraOutput,datums:&[pallas::codec::utils::KeepRaw<'_, pallas_primitives::babbage::PlutusData>]) -> Result { match o.datum() { Some(x) => { match x { diff --git a/schema.sdl b/schema.sdl index 4dddd3b..b12e1e6 100644 --- a/schema.sdl +++ b/schema.sdl @@ -269,6 +269,8 @@ input TransitionFilter { issuesMatch: String } +directive @include(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT +directive @skip(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT schema { query: QueryRoot subscription: SubscriptionRoot