dcSpark / cardano-multiplatform-lib

Rust implementation of Cardano
MIT License
98 stars 36 forks source link

MissingScriptWitnessUTXOW & PPViewHashesDontMatch even when using mem and step from prior used scripts on cardanoscan #215

Closed DorienP closed 1 year ago

DorienP commented 1 year ago
"transaction submit error ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError [UtxowFailure (FromAlonzoUtxowFail 
(WrappedShelleyEraFailure (MissingScriptWitnessesUTXOW (fromList [ScriptHash \"79dc2cb93b706af32fe1ef3b3fb014b98ef83be6b5c1a0c6e9aa8f83\"])))),UtxowFailure (FromAlonzoUtxowFail 
(PPViewHashesDontMatch (SJust (SafeHash \"8f2eb3a7b5ad1450bab819e063a6c174943c4544d8ca03d18f3d13b0b34e2a96\")) SNothing))])"

I've tried the hash_script_data as well as calc_script_data_hash. but still no dice. Is there a better way? calc_script_data_hash is no longer apart of transactionbuilder, and I can only set it after I build out to transactionbody

DorienP commented 1 year ago

I realize now that these are two separate errors here.

  1. MissingScriptWitnessesUTXOW (fromList [ScriptHash "79dc2cb93b706af32fe1ef3b3fb014b98ef83be6b5c1a0c6e9aa8f83\"

    • Im not sure how to fix this error im using cip30 to sign the transaction and fill the TransactionWitnessSet
  2. PPViewHashesDontMatch SJust SafeHash "8f2eb3a7b5ad1450bab819e063a6c174943c4544d8ca03d18f3d13b0b34e2a96\" SNothing

    • I added the exunit mem and step from the contract posted on cardanoscan to build out the correct hash with TxRedeemerBuilder.set_exunits()
    • for some reason cant get the ogmios evaluate Tx to send back anything other than an empty object, which makes me think something is missing, I use draftTx() to build what it can to be evaluated by the ogmios api

@SebastienGllmt