cardano-serialization-lib
cardano-serialization-lib copied to clipboard
legacy min_ada_required() is giving low values in CSL 11.0.
If I compare the two values given by CSL 10.0.04 with CSL 11 i get two different values, the 11.0 being lower my code:
const asset = [
{
unit: "1579f5df1ff81b2a69c402d92dd5fe95bf8cb7129e4a0765ed64095e69726f6e6f726520202d203236333520",
quantity: "1",
},
{
unit: "1579f5df1ff81b2a69c402d92dd5fe95bf8cb7129e4a0765ed64095e69726f6e6f726520202d2037343220",
quantity: "1",
},
];
const min = wasm.min_ada_required(
amountToValue(wasm, asset),
true,
wasm.BigNum.from_str(
${protocolParameters.coinsPerUtxoWord }
)
);
I am not sure if it is an issue, because in testnet it correctly works, but in mainnet it does not. Is min_ada_required going down with Vasil HF?
Yes, min_ada_required got changed to a new protocol parameter that gives a lower value. Be sure to change what value you use for the protocol parameter value as well when updating. This is only for Vasil as Alonzo (mainnet) still requires the larger value
@alice1989123 , this has been fixed in the later 11.*
versions, please switch to using the latest version and it will work on both network versions.