apply formatting

This commit is contained in:
Emily Martins 2022-10-31 13:43:32 +01:00
parent e9adfc6386
commit ffd1c8c8ba
5 changed files with 18 additions and 11 deletions

View file

@ -616,7 +616,8 @@ mkInTimeTimeRange advanceFrom =
+ (def :: ProposalTimingConfig).draftTime
+ (def :: ProposalTimingConfig).votingTime
+ (def :: ProposalTimingConfig).lockingTime
+ (def :: ProposalTimingConfig).executingTime - 1
+ (def :: ProposalTimingConfig).executingTime
- 1
)
Finished -> error "Cannot advance 'Finished' proposal"
@ -632,7 +633,8 @@ mkTooLateTimeRange advanceFrom =
(proposalStartingTime + (def :: ProposalTimingConfig).draftTime + 1)
( proposalStartingTime
+ (def :: ProposalTimingConfig).draftTime
+ (def :: ProposalTimingConfig).votingTime - 1
+ (def :: ProposalTimingConfig).votingTime
- 1
)
-- [S + D + V + L + 1, S + D + V + L + E -1]
VotingReady ->
@ -682,7 +684,8 @@ compPerStakeGTsForDraft :: NumStake -> Tagged GTTag Integer
compPerStakeGTsForDraft nCosigners =
Tagged $
untag (def :: ProposalThresholds).toVoting
`div` fromIntegral nCosigners + 1
`div` fromIntegral nCosigners
+ 1
dummyDatum :: ()
dummyDatum = ()
@ -948,7 +951,8 @@ mkInsufficientCosignsBundle nCosigners nEffects =
insuffcientPerStakeGTs =
Tagged $
untag (def :: ProposalThresholds).toVoting
`div` fromIntegral nCosigners - 1
`div` fromIntegral nCosigners
- 1
template = mkValidToNextStateBundle nCosigners nEffects False Draft
-- * From VotingReady

View file

@ -294,7 +294,8 @@ cosign ps = builder
closedBoundedInterval
(coerce proposalInputDatum.startingTime + 1)
( coerce proposalInputDatum.startingTime
+ proposalInputDatum.timingConfig.draftTime - 1
+ proposalInputDatum.timingConfig.draftTime
- 1
)
sig =

View file

@ -348,7 +348,8 @@ unlock ps = builder
in closedBoundedInterval (lb + 1) (ub - 1)
AfterVoting ->
let lb =
s + (def :: ProposalTimingConfig).draftTime
s
+ (def :: ProposalTimingConfig).draftTime
+ (def :: ProposalTimingConfig).votingTime
ub = lb + (def :: ProposalTimingConfig).lockingTime
in closedBoundedInterval (lb + 1) (ub - 1)

View file

@ -45,8 +45,8 @@ specs =
, inputCollateral 10
, inputTreasury 1 (asset1 10)
]
$ outputTreasury 1 (asset1 7) :
buildReceiversOutputFromDatum datum1
$ outputTreasury 1 (asset1 7)
: buildReceiversOutputFromDatum datum1
)
, effectSucceedsWith
"Simple with multiple treasuries "
@ -120,8 +120,8 @@ specs =
, inputCollateral 10
, inputTreasury 999 (asset1 20)
]
$ outputTreasury 999 (asset1 17) :
buildReceiversOutputFromDatum datum3
$ outputTreasury 999 (asset1 17)
: buildReceiversOutputFromDatum datum3
)
, effectFailsWith
"Prevent transactions besides the withdrawal"

View file

@ -152,7 +152,8 @@ stakePolicy =
PPair mintedST burntST <-
pmatchC $
pfromJust #$ psymbolValueOf'
pfromJust
#$ psymbolValueOf'
# ownSymbol
# txInfoF.mint