fix linter errors

This commit is contained in:
Emily Martins 2022-04-19 11:07:11 +02:00
parent 862e9b6079
commit 5649f27d24
5 changed files with 12 additions and 11 deletions

View file

@ -127,7 +127,7 @@ proposalCreation =
, status = Draft , status = Draft
, cosigners = [signer] , cosigners = [signer]
, thresholds = propThresholds , thresholds = propThresholds
, votes = ProposalVotes $ AssocMap.empty , votes = ProposalVotes AssocMap.empty
} }
) )
@ -156,7 +156,7 @@ proposalCreation =
[ TxInInfo [ TxInInfo
(TxOutRef "0b2086cbf8b6900f8cb65e012de4516cb66b5cb08a9aaba12a8b88be" 1) (TxOutRef "0b2086cbf8b6900f8cb65e012de4516cb66b5cb08a9aaba12a8b88be" 1)
TxOut TxOut
{ txOutAddress = Address (ScriptCredential $ validatorHash validator) Nothing { txOutAddress = Address (ScriptCredential $ validatorHash govValidator) Nothing
, txOutValue = Value.assetClassValue proposal.governorSTAssetClass 1 , txOutValue = Value.assetClassValue proposal.governorSTAssetClass 1
, txOutDatumHash = Just (toDatumHash govBefore) , txOutDatumHash = Just (toDatumHash govBefore)
} }

View file

@ -60,6 +60,7 @@ common lang
NamedFieldPuns NamedFieldPuns
NamedWildCards NamedWildCards
NumericUnderscores NumericUnderscores
OverloadedLabels
OverloadedStrings OverloadedStrings
PartialTypeSignatures PartialTypeSignatures
PatternGuards PatternGuards
@ -78,7 +79,6 @@ common lang
UndecidableInstances UndecidableInstances
ViewPatterns ViewPatterns
OverloadedRecordDot OverloadedRecordDot
OverloadedLabels
QualifiedDo QualifiedDo
default-language: Haskell2010 default-language: Haskell2010
@ -130,10 +130,10 @@ library
Agora.MultiSig Agora.MultiSig
Agora.Proposal Agora.Proposal
Agora.Proposal.Time Agora.Proposal.Time
Agora.Record
Agora.SafeMoney Agora.SafeMoney
Agora.Stake Agora.Stake
Agora.Treasury Agora.Treasury
Agora.Record
other-modules: other-modules:
Agora.Utils Agora.Utils
@ -159,11 +159,11 @@ test-suite agora-test
Spec.AuthorityToken Spec.AuthorityToken
Spec.Effect.TreasuryWithdrawal Spec.Effect.TreasuryWithdrawal
Spec.Model.MultiSig Spec.Model.MultiSig
Spec.Proposal
Spec.Sample.Effect.TreasuryWithdrawal Spec.Sample.Effect.TreasuryWithdrawal
Spec.Sample.Proposal
Spec.Sample.Stake Spec.Sample.Stake
Spec.Stake Spec.Stake
Spec.Sample.Proposal
Spec.Proposal
Spec.Util Spec.Util
build-depends: agora build-depends: agora

View file

@ -239,7 +239,7 @@ PlutusTx.makeIsDataIndexed
] ]
-- | Parameters that identify the Proposal validator script. -- | Parameters that identify the Proposal validator script.
data Proposal = Proposal newtype Proposal = Proposal
{ governorSTAssetClass :: AssetClass { governorSTAssetClass :: AssetClass
} }
deriving stock (Show, Eq) deriving stock (Show, Eq)

View file

@ -61,7 +61,7 @@ infixr 6 .&
(a :: [PLabeledType]) (a :: [PLabeledType])
(b :: [PLabeledType]) (b :: [PLabeledType])
(c :: [PLabeledType]). (c :: [PLabeledType]).
(RecordMorphism s b c) -> RecordMorphism s b c ->
(RecordMorphism s a b) -> RecordMorphism s a b ->
(RecordMorphism s a c) RecordMorphism s a c
(.&) = (.) (.&) = (.)

View file

@ -415,7 +415,8 @@ ptokenSpent =
plam $ \tokenClass inputs -> plam $ \tokenClass inputs ->
0 0
#< pfoldr @PBuiltinList #< pfoldr @PBuiltinList
# ( plam $ \txInInfo' acc -> P.do # plam
( \txInInfo' acc -> P.do
PTxInInfo txInInfo <- pmatch (pfromData txInInfo') PTxInInfo txInInfo <- pmatch (pfromData txInInfo')
PTxOut txOut' <- pmatch $ pfromData $ pfield @"resolved" # txInInfo PTxOut txOut' <- pmatch $ pfromData $ pfield @"resolved" # txInInfo
txOut <- pletFields @'["value"] txOut' txOut <- pletFields @'["value"] txOut'