<p>You probably need to update your version of the Serialization Lib, the latest currently is <a href="https://github.com/Emurgo/cardano-serialization-lib/releases/tag/11.0.0-rc.6" rel="nofollow noreferrer">11.0.0-rc.6</a> <em>(on npm <a href="https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-nodejs/v/11.0.0-rc.6" rel="nofollow noreferrer">here</a>)</em>.</p>
<p>Plenty of changes making it babbage compatible: <a href="https://github.com/Emurgo/cardano-serialization-lib/pull/478" rel="nofollow noreferrer">https://github.com/Emurgo/cardano-serialization-lib/pull/478</a></p>

CC BY-SA 4.0
2022-07-17T10:47:14.543Z
2022-07-17T10:47:14.543Z
sean
<p>For solving the issue: <strong>Update CSL to 11</strong> then change pp code with this one:</p>
<pre><code>    const costModel = wasm.TxBuilderConstants.plutus_vasil_cost_models().get(
  wasm.Language.new_plutus_v1()
);

const costModels = wasm.Costmdls.new();
costModels.insert(wasm.Language.new_plutus_v1(), costModel);



const scriptDataHash = wasm.hash_script_data(redeemers, costModels, datums);
txBody.set_script_data_hash(scriptDataHash);
</code></pre>

CC BY-SA 4.0
2022-07-20T03:01:00.533Z
2022-07-20T13:06:02.957Z
2022-07-20T13:06:02.957Z
Alicia Basilio
<p>PPViewHashesDontMatch error means that Protocol Parameters hash does not match. Simply deleting your old protocol.json and replacing it with a new one (babbage era) should solve the problem.</p>
<p><code>cardano-cli query protocol-parameters --testnet-magic 1097911063</code></p>

CC BY-SA 4.0
2022-07-20T02:37:30.270Z
I am afraid in CSL is a little bit more difficult than in Cli. But i hope i can post an answer with detailed code in the next hours.. just in case it helps someone else
Alicia Basilio
CC BY-SA 4.0
2022-07-19T10:30:35.800Z
2022-07-19T10:31:16.850Z
2022-07-19T10:31:16.850Z
Mantas Andriuska
<p>I’ll 10/10 recommend bringing this up to the IOG discord in case it turns out to be the effect of some breaking change somewhere. Probably best to ping Becky Hopwood, she’s the Technical community lead in the discord and responds super fast.</p>

CC BY-SA 4.0
2022-07-17T10:24:16.627Z
Already asked there, i will try to look for Becky Hopwood as you suggested, thank you!
Alicia Basilio
CC BY-SA 4.0
2022-07-17T07:27:57.323Z
2022-07-17T07:27:57.323Z
Pizza Knight
<p>have you solved the issue? After the HF the cardano-cli transaction build command should include --babbage-era. Adding this, I was able to spend smart contract utxo.</p>

CC BY-SA 4.0
2022-07-20T13:04:23.933Z
Yes I solved using the code i auto answered :) and updating to CSL 11
Alicia Basilio
CC BY-SA 4.0
2022-07-20T04:40:44.130Z
2022-07-20T04:40:44.130Z
Fourzin
<p>My smart contracts deployed in testnet stoped working after the Vasil Hardfork. i get this error:</p>
<blockquote>
<p>&quot;&quot;transaction submit error ShelleyTxValidationError
ShelleyBasedEraBabbage (ApplyTxError [UtxowFailure
(FromAlonzoUtxowFail (WrappedShelleyEraFailure
(ExtraneousScriptWitnessesUTXOW (fromList [ScriptHash
&quot;84017e78c2e887e8fac3fdf270110464aebd67f9cfc73453714b62f6&quot;])))),UtxowFailure
(FromAlonzoUtxowFail (WrappedShelleyEraFailure
(MissingScriptWitnessesUTXOW (fromList [ScriptHash
&quot;9e9807f4d1532b1f6853ad9e9cbea957727c8c0c3b5e89fae60961f9&quot;])))),UtxowFailure
(FromAlonzoUtxowFail (NonOutputSupplimentaryDatums (fromList [SafeHash
&quot;1c48b6a92c64e2c4ac4408620c5a33df9a456b0e58ed422cc7eee51f5ee356b3&quot;])
(fromList [SafeHash
&quot;07e6205f926822d79c530e7e331de123d9050c44afe292a0167fdc9fa943a481&quot;]))),UtxowFailure
(FromAlonzoUtxowFail (ExtraRedeemers [RdmrPtr Spend 24])),UtxowFailure
(FromAlonzoUtxowFail (PPViewHashesDontMatch (SJust (SafeHash
&quot;9835cece923eb8a48e0018bb9ad0901aea26b0575a64a15df1817328ef466620&quot;))
(SJust (SafeHash
&quot;3f52ec17e7d530f1730cc6d5c3bb83f397af30ed16ece7af1fc4314f2ab2d36b&quot;))))])&quot;&quot;</p>
</blockquote>
<p>I think that the relevant part is</p>
<blockquote>
<p>PPViewHashesDontMatch (SJust (SafeHash
&quot;9835cece923eb8a48e0018bb9ad0901aea26b0575a64a15df1817328ef466620&quot;))
(SJust (SafeHash
&quot;3f52ec17e7d530f1730cc6d5c3bb83f397af30ed16ece7af1fc4314f2ab2d36b&quot;))))])&quot;</p>
</blockquote>
<p>wich has to do with Protocol Parameters, I am using Cardano serialization Lib. and I use 10.04 and I think the problem might be in my cost models now:</p>
<pre><code>const cost_model_vals = [
</code></pre>
<p>197209, 0, 1, 1, 396231, 621, 0, 1, 150000, 1000, 0, 1, 150000, 32, 2477736,
29175, 4, 29773, 100, 29773, 100, 29773, 100, 29773, 100, 29773, 100, 29773,
100, 100, 100, 29773, 100, 150000, 32, 150000, 32, 150000, 32, 150000, 1000,
0, 1, 150000, 32, 150000, 1000, 0, 8, 148000, 425507, 118, 0, 1, 1, 150000,
1000, 0, 8, 150000, 112536, 247, 1, 150000, 10000, 1, 136542, 1326, 1, 1000,
150000, 1000, 1, 150000, 32, 150000, 32, 150000, 32, 1, 1, 150000, 1, 150000,
4, 103599, 248, 1, 103599, 248, 1, 145276, 1366, 1, 179690, 497, 1, 150000,
32, 150000, 32, 150000, 32, 150000, 32, 150000, 32, 150000, 32, 148000,
425507, 118, 0, 1, 1, 61516, 11218, 0, 1, 150000, 32, 148000, 425507, 118, 0,
1, 1, 148000, 425507, 118, 0, 1, 1, 2477736, 29175, 4, 0, 82363, 4, 150000,
5000, 0, 1, 150000, 32, 197209, 0, 1, 1, 150000, 32, 150000, 32, 150000, 32,
150000, 32, 150000, 32, 150000, 32, 150000, 32, 3345831, 1, 1,
];</p>
<p>Then :</p>
<pre><code>const costModel = wasm.CostModel.new();
cost_model_vals.forEach((x, i) =&gt; costModel.set(i, wasm.Int.new_i32(x)));

const costModels = wasm.Costmdls.new();
costModels.insert(wasm.Language.new_plutus_v1(), costModel);

const scriptDataHash = wasm.hash_script_data(redeemers, costModels, datums);
txBody.set_script_data_hash(scriptDataHash);  
</code></pre>
<p>Now all my smart contracts do not work anymore.. has anyone solved this issue in CSL ?</p>

<plutus><smart-contract><cardano-serialization-lib><vasil-hard-fork>
Smart contract is not working after Vasil Hardfork in testnet
# Smart contract is not working after Vasil Hardfork in testnet

(Asked by: username_0 on 2022-07-17)

My smart contracts deployed in testnet stoped working after the Vasil Hardfork. i get this error:

""transaction submit error ShelleyTxValidationError
ShelleyBasedEraBabbage (ApplyTxError [UtxowFailure
(FromAlonzoUtxowFail (WrappedShelleyEraFailure
(ExtraneousScriptWitnessesUTXOW (fromList [ScriptHash
"84017e78c2e887e8fac3fdf270110464aebd67f9cfc73453714b62f6"])))),UtxowFailure
(FromAlonzoUtxowFail (WrappedShelleyEraFailure
(MissingScriptWitnessesUTXOW (fromList [ScriptHash
"9e9807f4d1532b1f6853ad9e9cbea957727c8c0c3b5e89fae60961f9"])))),UtxowFailure
(FromAlonzoUtxowFail (NonOutputSupplimentaryDatums (fromList [SafeHash
"1c48b6a92c64e2c4ac4408620c5a33df9a456b0e58ed422cc7eee51f5ee356b3"])
(fromList [SafeHash
"07e6205f926822d79c530e7e331de123d9050c44afe292a0167fdc9fa943a481"]))),UtxowFailure
(FromAlonzoUtxowFail (ExtraRedeemers [RdmrPtr Spend 24])),UtxowFailure
(FromAlonzoUtxowFail (PPViewHashesDontMatch (SJust (SafeHash
"9835cece923eb8a48e0018bb9ad0901aea26b0575a64a15df1817328ef466620"))
(SJust (SafeHash
"3f52ec17e7d530f1730cc6d5c3bb83f397af30ed16ece7af1fc4314f2ab2d36b"))))])""

I think that the relevant part is

PPViewHashesDontMatch (SJust (SafeHash
"9835cece923eb8a48e0018bb9ad0901aea26b0575a64a15df1817328ef466620"))
(SJust (SafeHash
"3f52ec17e7d530f1730cc6d5c3bb83f397af30ed16ece7af1fc4314f2ab2d36b"))))])"

wich has to do with Protocol Parameters, I am using Cardano serialization Lib. and I use 10.04 and I think the problem might be in my cost models now:
const cost_model_vals = [

197209, 0, 1, 1, 396231, 621, 0, 1, 150000, 1000, 0, 1, 150000, 32, 2477736,
29175, 4, 29773, 100, 29773, 100, 29773, 100, 29773, 100, 29773, 100, 29773,
100, 100, 100, 29773, 100, 150000, 32, 150000, 32, 150000, 32, 150000, 1000,
0, 1, 150000, 32, 150000, 1000, 0, 8, 148000, 425507, 118, 0, 1, 1, 150000,
1000, 0, 8, 150000, 112536, 247, 1, 150000, 10000, 1, 136542, 1326, 1, 1000,
150000, 1000, 1, 150000, 32, 150000, 32, 150000, 32, 1, 1, 150000, 1, 150000,
4, 103599, 248, 1, 103599, 248, 1, 145276, 1366, 1, 179690, 497, 1, 150000,
32, 150000, 32, 150000, 32, 150000, 32, 150000, 32, 150000, 32, 148000,
425507, 118, 0, 1, 1, 61516, 11218, 0, 1, 150000, 32, 148000, 425507, 118, 0,
1, 1, 148000, 425507, 118, 0, 1, 1, 2477736, 29175, 4, 0, 82363, 4, 150000,
5000, 0, 1, 150000, 32, 197209, 0, 1, 1, 150000, 32, 150000, 32, 150000, 32,
150000, 32, 150000, 32, 150000, 32, 150000, 32, 3345831, 1, 1,
];
Then :
const costModel = wasm.CostModel.new();
cost_model_vals.forEach((x, i) => costModel.set(i, wasm.Int.new_i32(x)));

const costModels = wasm.Costmdls.new();
costModels.insert(wasm.Language.new_plutus_v1(), costModel);

const scriptDataHash = wasm.hash_script_data(redeemers, costModels, datums);
txBody.set_script_data_hash(scriptDataHash);  

Now all my smart contracts do not work anymore.. has anyone solved this issue in CSL ?

**Tags:** plutus, smart-contract, cardano-serialization-lib, vasil-hard-fork

---

## 5 answers

### Answer by username_1 on 2022-07-17. Score: 2

You probably need to update your version of the Serialization Lib, the latest currently is [11.0.0-rc.6](https://github.com/Emurgo/cardano-serialization-lib/releases/tag/11.0.0-rc.6) *(on npm [here](https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-nodejs/v/11.0.0-rc.6))*.

Plenty of changes making it babbage compatible: <https://github.com/Emurgo/cardano-serialization-lib/pull/478>


---

### Answer by username_0 on 2022-07-20. Score: 1

For solving the issue: Update CSL to 11 then change pp code with this one:
    const costModel = wasm.TxBuilderConstants.plutus_vasil_cost_models().get(
  wasm.Language.new_plutus_v1()
);

const costModels = wasm.Costmdls.new();
costModels.insert(wasm.Language.new_plutus_v1(), costModel);



const scriptDataHash = wasm.hash_script_data(redeemers, costModels, datums);
txBody.set_script_data_hash(scriptDataHash);


---

### Answer by username_2 on 2022-07-19. Score: 1

PPViewHashesDontMatch error means that Protocol Parameters hash does not match. Simply deleting your old protocol.json and replacing it with a new one (babbage era) should solve the problem.

`cardano-cli query protocol-parameters --testnet-magic 1097911063`

> **Comments:**
> **username_0**: I am afraid in CSL is a little bit more difficult than in Cli. But i hope i can post an answer with detailed code in the next hours.. just in case it helps someone else  

---

### Answer by username_3 on 2022-07-17. Score: 1

I’ll 10/10 recommend bringing this up to the IOG discord in case it turns out to be the effect of some breaking change somewhere. Probably best to ping Becky Hopwood, she’s the Technical community lead in the discord and responds super fast.

> **Comments:**
> **username_0**: Already asked there, i will try to look for Becky Hopwood as you suggested, thank you!  

---

### Answer by username_4 on 2022-07-20. Score: 0

have you solved the issue? After the HF the cardano-cli transaction build command should include --babbage-era. Adding this, I was able to spend smart contract utxo.

> **Comments:**
> **username_0**: Yes I solved using the code i auto answered :) and updating to CSL 11  

---

