apply formatting
This commit is contained in:
parent
bf8290be46
commit
914098655d
5 changed files with 18 additions and 11 deletions
|
|
@ -616,7 +616,8 @@ mkInTimeTimeRange advanceFrom =
|
||||||
+ (def :: ProposalTimingConfig).draftTime
|
+ (def :: ProposalTimingConfig).draftTime
|
||||||
+ (def :: ProposalTimingConfig).votingTime
|
+ (def :: ProposalTimingConfig).votingTime
|
||||||
+ (def :: ProposalTimingConfig).lockingTime
|
+ (def :: ProposalTimingConfig).lockingTime
|
||||||
+ (def :: ProposalTimingConfig).executingTime - 1
|
+ (def :: ProposalTimingConfig).executingTime
|
||||||
|
- 1
|
||||||
)
|
)
|
||||||
Finished -> error "Cannot advance 'Finished' proposal"
|
Finished -> error "Cannot advance 'Finished' proposal"
|
||||||
|
|
||||||
|
|
@ -632,7 +633,8 @@ mkTooLateTimeRange advanceFrom =
|
||||||
(proposalStartingTime + (def :: ProposalTimingConfig).draftTime + 1)
|
(proposalStartingTime + (def :: ProposalTimingConfig).draftTime + 1)
|
||||||
( proposalStartingTime
|
( proposalStartingTime
|
||||||
+ (def :: ProposalTimingConfig).draftTime
|
+ (def :: ProposalTimingConfig).draftTime
|
||||||
+ (def :: ProposalTimingConfig).votingTime - 1
|
+ (def :: ProposalTimingConfig).votingTime
|
||||||
|
- 1
|
||||||
)
|
)
|
||||||
-- [S + D + V + L + 1, S + D + V + L + E -1]
|
-- [S + D + V + L + 1, S + D + V + L + E -1]
|
||||||
VotingReady ->
|
VotingReady ->
|
||||||
|
|
@ -682,7 +684,8 @@ compPerStakeGTsForDraft :: NumStake -> Tagged GTTag Integer
|
||||||
compPerStakeGTsForDraft nCosigners =
|
compPerStakeGTsForDraft nCosigners =
|
||||||
Tagged $
|
Tagged $
|
||||||
untag (def :: ProposalThresholds).toVoting
|
untag (def :: ProposalThresholds).toVoting
|
||||||
`div` fromIntegral nCosigners + 1
|
`div` fromIntegral nCosigners
|
||||||
|
+ 1
|
||||||
|
|
||||||
dummyDatum :: ()
|
dummyDatum :: ()
|
||||||
dummyDatum = ()
|
dummyDatum = ()
|
||||||
|
|
@ -948,7 +951,8 @@ mkInsufficientCosignsBundle nCosigners nEffects =
|
||||||
insuffcientPerStakeGTs =
|
insuffcientPerStakeGTs =
|
||||||
Tagged $
|
Tagged $
|
||||||
untag (def :: ProposalThresholds).toVoting
|
untag (def :: ProposalThresholds).toVoting
|
||||||
`div` fromIntegral nCosigners - 1
|
`div` fromIntegral nCosigners
|
||||||
|
- 1
|
||||||
template = mkValidToNextStateBundle nCosigners nEffects False Draft
|
template = mkValidToNextStateBundle nCosigners nEffects False Draft
|
||||||
|
|
||||||
-- * From VotingReady
|
-- * From VotingReady
|
||||||
|
|
|
||||||
|
|
@ -294,7 +294,8 @@ cosign ps = builder
|
||||||
closedBoundedInterval
|
closedBoundedInterval
|
||||||
(coerce proposalInputDatum.startingTime + 1)
|
(coerce proposalInputDatum.startingTime + 1)
|
||||||
( coerce proposalInputDatum.startingTime
|
( coerce proposalInputDatum.startingTime
|
||||||
+ proposalInputDatum.timingConfig.draftTime - 1
|
+ proposalInputDatum.timingConfig.draftTime
|
||||||
|
- 1
|
||||||
)
|
)
|
||||||
|
|
||||||
sig =
|
sig =
|
||||||
|
|
|
||||||
|
|
@ -348,7 +348,8 @@ unlock ps = builder
|
||||||
in closedBoundedInterval (lb + 1) (ub - 1)
|
in closedBoundedInterval (lb + 1) (ub - 1)
|
||||||
AfterVoting ->
|
AfterVoting ->
|
||||||
let lb =
|
let lb =
|
||||||
s + (def :: ProposalTimingConfig).draftTime
|
s
|
||||||
|
+ (def :: ProposalTimingConfig).draftTime
|
||||||
+ (def :: ProposalTimingConfig).votingTime
|
+ (def :: ProposalTimingConfig).votingTime
|
||||||
ub = lb + (def :: ProposalTimingConfig).lockingTime
|
ub = lb + (def :: ProposalTimingConfig).lockingTime
|
||||||
in closedBoundedInterval (lb + 1) (ub - 1)
|
in closedBoundedInterval (lb + 1) (ub - 1)
|
||||||
|
|
|
||||||
|
|
@ -45,8 +45,8 @@ specs =
|
||||||
, inputCollateral 10
|
, inputCollateral 10
|
||||||
, inputTreasury 1 (asset1 10)
|
, inputTreasury 1 (asset1 10)
|
||||||
]
|
]
|
||||||
$ outputTreasury 1 (asset1 7) :
|
$ outputTreasury 1 (asset1 7)
|
||||||
buildReceiversOutputFromDatum datum1
|
: buildReceiversOutputFromDatum datum1
|
||||||
)
|
)
|
||||||
, effectSucceedsWith
|
, effectSucceedsWith
|
||||||
"Simple with multiple treasuries "
|
"Simple with multiple treasuries "
|
||||||
|
|
@ -120,8 +120,8 @@ specs =
|
||||||
, inputCollateral 10
|
, inputCollateral 10
|
||||||
, inputTreasury 999 (asset1 20)
|
, inputTreasury 999 (asset1 20)
|
||||||
]
|
]
|
||||||
$ outputTreasury 999 (asset1 17) :
|
$ outputTreasury 999 (asset1 17)
|
||||||
buildReceiversOutputFromDatum datum3
|
: buildReceiversOutputFromDatum datum3
|
||||||
)
|
)
|
||||||
, effectFailsWith
|
, effectFailsWith
|
||||||
"Prevent transactions besides the withdrawal"
|
"Prevent transactions besides the withdrawal"
|
||||||
|
|
|
||||||
|
|
@ -152,7 +152,8 @@ stakePolicy =
|
||||||
|
|
||||||
PPair mintedST burntST <-
|
PPair mintedST burntST <-
|
||||||
pmatchC $
|
pmatchC $
|
||||||
pfromJust #$ psymbolValueOf'
|
pfromJust
|
||||||
|
#$ psymbolValueOf'
|
||||||
# ownSymbol
|
# ownSymbol
|
||||||
# txInfoF.mint
|
# txInfoF.mint
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue