Trying to access values in a dict that are something else than of the PlutusData type Map leads to deserialization errors during runtime. The code compiles fine although.
Example to reproduce:
type RoyaltyToken {
policy_id: PolicyId,
asset_name: AssetName,
}
let m =
dict.new()
|> dict.insert(
#[1, 2, 3],
RoyaltyToken { policy_id: #[1, 2, 3], asset_name: #[3, 4, 5] },
)
let r = dict.get(m, #[1, 2, 3])
Error during runtime (Aiken or Haskell Plutus core runtime yield the same result):
Trying to access values in a
dict
that are something else than of the PlutusData typeMap
leads to deserialization errors during runtime. The code compiles fine although.Example to reproduce:
Error during runtime (Aiken or Haskell Plutus core runtime yield the same result):