fix seralization issues
This commit is contained in:
parent
c1c4c919a2
commit
d9a2a467bb
4 changed files with 13 additions and 13 deletions
|
|
@ -65,8 +65,8 @@ tests =
|
||||||
{ proposalId = ProposalId 0
|
{ proposalId = ProposalId 0
|
||||||
, effects =
|
, effects =
|
||||||
AssocMap.fromList
|
AssocMap.fromList
|
||||||
[ (ResultTag 0, [])
|
[ (ResultTag 0, AssocMap.empty)
|
||||||
, (ResultTag 1, [])
|
, (ResultTag 1, AssocMap.empty)
|
||||||
]
|
]
|
||||||
, status = Draft
|
, status = Draft
|
||||||
, cosigners = [signer]
|
, cosigners = [signer]
|
||||||
|
|
@ -74,8 +74,8 @@ tests =
|
||||||
, votes =
|
, votes =
|
||||||
emptyVotesFor $
|
emptyVotesFor $
|
||||||
AssocMap.fromList
|
AssocMap.fromList
|
||||||
[ (ResultTag 0, [])
|
[ (ResultTag 0, AssocMap.empty)
|
||||||
, (ResultTag 1, [])
|
, (ResultTag 1, AssocMap.empty)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -160,8 +160,8 @@ createProposal =
|
||||||
|
|
||||||
effects =
|
effects =
|
||||||
AssocMap.fromList
|
AssocMap.fromList
|
||||||
[ (ResultTag 0, [])
|
[ (ResultTag 0, AssocMap.empty)
|
||||||
, (ResultTag 1, [])
|
, (ResultTag 1, AssocMap.empty)
|
||||||
]
|
]
|
||||||
proposalDatum :: Datum
|
proposalDatum :: Datum
|
||||||
proposalDatum =
|
proposalDatum =
|
||||||
|
|
@ -313,8 +313,8 @@ mintGATs =
|
||||||
|
|
||||||
effects =
|
effects =
|
||||||
AssocMap.fromList
|
AssocMap.fromList
|
||||||
[ (ResultTag 0, [])
|
[ (ResultTag 0, AssocMap.empty)
|
||||||
, (ResultTag 1, [(mockEffectHash, toDatumHash mockEffectOutputDatum)])
|
, (ResultTag 1, AssocMap.singleton mockEffectHash $ toDatumHash mockEffectOutputDatum)
|
||||||
]
|
]
|
||||||
proposalVotes :: ProposalVotes
|
proposalVotes :: ProposalVotes
|
||||||
proposalVotes =
|
proposalVotes =
|
||||||
|
|
|
||||||
|
|
@ -60,8 +60,8 @@ proposalCreation =
|
||||||
let st = Value.singleton proposalPolicySymbol "" 1 -- Proposal ST
|
let st = Value.singleton proposalPolicySymbol "" 1 -- Proposal ST
|
||||||
effects =
|
effects =
|
||||||
AssocMap.fromList
|
AssocMap.fromList
|
||||||
[ (ResultTag 0, [])
|
[ (ResultTag 0, AssocMap.empty)
|
||||||
, (ResultTag 1, [])
|
, (ResultTag 1, AssocMap.empty)
|
||||||
]
|
]
|
||||||
proposalDatum :: Datum
|
proposalDatum :: Datum
|
||||||
proposalDatum =
|
proposalDatum =
|
||||||
|
|
@ -155,8 +155,8 @@ cosignProposal newSigners =
|
||||||
let st = Value.singleton proposalPolicySymbol "" 1 -- Proposal ST
|
let st = Value.singleton proposalPolicySymbol "" 1 -- Proposal ST
|
||||||
effects =
|
effects =
|
||||||
AssocMap.fromList
|
AssocMap.fromList
|
||||||
[ (ResultTag 0, [])
|
[ (ResultTag 0, AssocMap.empty)
|
||||||
, (ResultTag 1, [])
|
, (ResultTag 1, AssocMap.empty)
|
||||||
]
|
]
|
||||||
proposalBefore :: ProposalDatum
|
proposalBefore :: ProposalDatum
|
||||||
proposalBefore =
|
proposalBefore =
|
||||||
|
|
|
||||||
|
|
@ -178,7 +178,7 @@ data ProposalDatum = ProposalDatum
|
||||||
-- TODO: could we encode this more efficiently?
|
-- TODO: could we encode this more efficiently?
|
||||||
-- This is shaped this way for future proofing.
|
-- This is shaped this way for future proofing.
|
||||||
-- See https://github.com/Liqwid-Labs/agora/issues/39
|
-- See https://github.com/Liqwid-Labs/agora/issues/39
|
||||||
, effects :: AssocMap.Map ResultTag [(ValidatorHash, DatumHash)]
|
, effects :: AssocMap.Map ResultTag (AssocMap.Map ValidatorHash DatumHash)
|
||||||
-- ^ Effect lookup table. First by result, then by effect hash.
|
-- ^ Effect lookup table. First by result, then by effect hash.
|
||||||
, status :: ProposalStatus
|
, status :: ProposalStatus
|
||||||
-- ^ The status the proposal is in.
|
-- ^ The status the proposal is in.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue