This is a library, written in Rust, for serialization & deserialization of data structures used in Cardano's Haskell implementation of Alonzo along with useful utility functions.
Other
231
stars
125
forks
source link
PPViewHashesDontMatch when attempting to receive an NFT locked to a smart contract. #601
I tried to send a transaction that receives an NFT locked to a smart contract and was unable to send it with the following error
failed to submit tx: AxiosError: Request failed with status code 400. error details: "transaction submit error ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError [UtxowFailure (FromAlonzoUtxowFail (PPViewHashesDontMatch (SJust (SafeHash \"44578482edc5ccb278921278163278a0184cdeb92a3a68bcbf4d5a3003622b61\")) (SJust (SafeHash \"590ee4faabbcc7c5a1571e282d185a6cd266c0c670a0dcfb51c2696237704261\"))))])"
After checking, I realized that the cost_model in ProtocolParameter is incorrect.
Therefore, we obtained the latest ProtocolParameter from blockfrost's api and used it.
I tried to send a transaction that receives an NFT locked to a smart contract and was unable to send it with the following error
failed to submit tx: AxiosError: Request failed with status code 400. error details: "transaction submit error ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError [UtxowFailure (FromAlonzoUtxowFail (PPViewHashesDontMatch (SJust (SafeHash \"44578482edc5ccb278921278163278a0184cdeb92a3a68bcbf4d5a3003622b61\")) (SJust (SafeHash \"590ee4faabbcc7c5a1571e282d185a6cd266c0c670a0dcfb51c2696237704261\"))))])"
After checking, I realized that the cost_model in ProtocolParameter is incorrect. Therefore, we obtained the latest ProtocolParameter from blockfrost's api and used it.
Before fix
After fix
use PlutusV1 value obtained from blockfrost
With this fix, transactions are now sent correctly. I always get an error when I use the library CostModel as I did before the fix. Is my fix correct?