Skip to content

Commit 1cfa24b

Browse files
authored
Merge pull request #5145 from IntersectMBO/aniketd/multiasset-cddl
Fix MultiAsset CDDL spec in Mary and Alonzo
2 parents deb0945 + 436f484 commit 1cfa24b

File tree

7 files changed

+5
-12
lines changed

7 files changed

+5
-12
lines changed

eras/alonzo/impl/cddl-files/alonzo.cddl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ value = coin/ [coin, multiasset<uint>]
142142

143143
coin = uint
144144

145-
multiasset<a0> = {* policy_id => {* asset_name => a0}}
145+
multiasset<a0> = {* policy_id => {+ asset_name => a0}}
146146

147147
policy_id = script_hash
148148

eras/alonzo/impl/testlib/Test/Cardano/Ledger/Alonzo/CDDL.hs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import Test.Cardano.Ledger.Mary.CDDL hiding (
2323
header,
2424
header_body,
2525
mint,
26-
multiasset,
2726
native_script,
2827
proposed_protocol_parameter_updates,
2928
protocol_param_update,
@@ -437,12 +436,6 @@ network_id = "network_id" =:= int 0 / int 1
437436
auxiliary_data_hash :: Rule
438437
auxiliary_data_hash = "auxiliary_data_hash" =:= hash32
439438

440-
multiasset :: IsType0 a => a -> GRuleCall
441-
multiasset =
442-
binding $ \x ->
443-
"multiasset"
444-
=:= mp [0 <+ asKey policy_id ==> mp [0 <+ asKey asset_name ==> x]]
445-
446439
mint :: Rule
447440
mint = "mint" =:= multiasset int64
448441

eras/babbage/impl/cddl-files/babbage.cddl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ value = coin/ [coin, multiasset<uint>]
147147

148148
coin = uint
149149

150-
multiasset<a0> = {* policy_id => {* asset_name => a0}}
150+
multiasset<a0> = {* policy_id => {+ asset_name => a0}}
151151

152152
policy_id = script_hash
153153

eras/babbage/impl/testlib/Test/Cardano/Ledger/Babbage/CDDL.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import Test.Cardano.Ledger.Alonzo.CDDL hiding (
2323
header,
2424
header_body,
2525
language,
26-
multiasset,
2726
operational_cert,
2827
plutus_data,
2928
plutus_script,

eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/CDDL.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import Test.Cardano.Ledger.Babbage.CDDL hiding (
3636
metadata,
3737
mint,
3838
multi_host_name,
39+
multiasset,
3940
native_script,
4041
nonempty_set,
4142
plutus_v1_script,

eras/mary/impl/cddl-files/mary.cddl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ value = coin/ [coin, multiasset<uint>]
118118

119119
coin = uint
120120

121-
multiasset<a0> = {+ policy_id => {+ asset_name => a0}}
121+
multiasset<a0> = {* policy_id => {+ asset_name => a0}}
122122

123123
policy_id = script_hash
124124

eras/mary/impl/testlib/Test/Cardano/Ledger/Mary/CDDL.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ multiasset :: IsType0 a => a -> GRuleCall
3737
multiasset =
3838
binding $ \x ->
3939
"multiasset"
40-
=:= mp [1 <+ asKey policy_id ==> mp [1 <+ asKey asset_name ==> x]]
40+
=:= mp [0 <+ asKey policy_id ==> mp [1 <+ asKey asset_name ==> x]]
4141

4242
policy_id :: Rule
4343
policy_id = "policy_id" =:= script_hash

0 commit comments

Comments
 (0)