store timing config in the proposal datum
.... and mock the value upon creation for now
This commit is contained in:
parent
cf51d47a0d
commit
92c64f8d7a
8 changed files with 68 additions and 2 deletions
|
|
@ -73,6 +73,7 @@ import Sample.Shared (
|
|||
gstUTXORef,
|
||||
minAda,
|
||||
proposalPolicySymbol,
|
||||
proposalTimingConfig,
|
||||
proposalValidatorAddress,
|
||||
signer,
|
||||
signer2,
|
||||
|
|
@ -234,6 +235,7 @@ createProposal =
|
|||
, cosigners = [signer]
|
||||
, thresholds = defaultProposalThresholds
|
||||
, votes = emptyVotesFor effects
|
||||
, timingConfig = proposalTimingConfig
|
||||
}
|
||||
)
|
||||
proposalOutput :: TxOut
|
||||
|
|
@ -408,6 +410,7 @@ mintGATs =
|
|||
, cosigners = [signer, signer2]
|
||||
, thresholds = defaultProposalThresholds
|
||||
, votes = proposalVotes
|
||||
, timingConfig = proposalTimingConfig
|
||||
}
|
||||
proposalInputDatum :: Datum
|
||||
proposalInputDatum = Datum $ toBuiltinData proposalInputDatum'
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ proposalCreation =
|
|||
, cosigners = [signer]
|
||||
, thresholds = defaultProposalThresholds
|
||||
, votes = emptyVotesFor effects
|
||||
, timingConfig = proposalTimingConfig
|
||||
}
|
||||
)
|
||||
|
||||
|
|
@ -167,6 +168,7 @@ cosignProposal newSigners =
|
|||
, cosigners = [signer]
|
||||
, thresholds = defaultProposalThresholds
|
||||
, votes = emptyVotesFor effects
|
||||
, timingConfig = proposalTimingConfig
|
||||
}
|
||||
stakeDatum :: StakeDatum
|
||||
stakeDatum = StakeDatum (Tagged 50_000_000) signer2 []
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ module Sample.Shared (
|
|||
proposalPolicySymbol,
|
||||
proposalValidatorHash,
|
||||
proposalValidatorAddress,
|
||||
proposalTimingConfig,
|
||||
|
||||
-- ** Authority
|
||||
authorityToken,
|
||||
|
|
@ -74,6 +75,9 @@ import Agora.Proposal (
|
|||
Proposal (..),
|
||||
ProposalThresholds (..),
|
||||
)
|
||||
import Agora.Proposal.Time (
|
||||
ProposalTimingConfig (..),
|
||||
)
|
||||
import Agora.Stake (Stake (..))
|
||||
import Agora.Treasury (treasuryValidator)
|
||||
import Agora.Utils (validatorHashToTokenName)
|
||||
|
|
@ -184,6 +188,15 @@ authorityToken = authorityTokenFromGovernor governor
|
|||
authorityTokenSymbol :: CurrencySymbol
|
||||
authorityTokenSymbol = authorityTokenSymbolFromGovernor governor
|
||||
|
||||
proposalTimingConfig :: ProposalTimingConfig
|
||||
proposalTimingConfig =
|
||||
ProposalTimingConfig
|
||||
{ draftTime = 0
|
||||
, votingTime = 1000
|
||||
, lockingTime = 2000
|
||||
, executingTime = 3000
|
||||
}
|
||||
|
||||
------------------------------------------------------------------
|
||||
|
||||
treasuryOut :: TxOut
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue