Merge branch 'master' into connor/governor

This commit is contained in:
fanghr 2022-05-14 00:40:26 +08:00
commit cbf14337ff
No known key found for this signature in database
GPG key ID: 35CD9A71CD5D5870
18 changed files with 1103 additions and 8 deletions

View file

@ -11,6 +11,8 @@ module Agora.AuthorityToken (
AuthorityToken (..),
) where
--------------------------------------------------------------------------------
import Plutarch.Api.V1 (
PAddress (..),
PCredential (..),
@ -28,7 +30,9 @@ import Plutarch.Api.V1.Value (PValue (PValue))
import Plutarch.Builtin (pforgetData)
import Plutus.V1.Ledger.Value (AssetClass (AssetClass))
import Prelude
--------------------------------------------------------------------------------
import GHC.Generics qualified as GHC
--------------------------------------------------------------------------------
@ -53,6 +57,7 @@ newtype AuthorityToken = AuthorityToken
{ authority :: AssetClass
-- ^ Token that must move in order for minting this to be valid.
}
deriving stock (GHC.Generic)
--------------------------------------------------------------------------------

View file

@ -106,6 +106,7 @@ data Governor = Governor
-- ^ Arbitrary limit for maximum amount of cosigners on a proposal.
-- See `Agora.Proposal.proposalDatumValid`.
}
deriving stock (GHC.Generic)
--------------------------------------------------------------------------------

View file

@ -81,7 +81,7 @@ newtype ProposalId = ProposalId {proposalTag :: Integer}
@
-}
newtype ResultTag = ResultTag {getResultTag :: Integer}
deriving stock (Eq, Show, Ord)
deriving stock (Eq, Show, Ord, GHC.Generic)
deriving newtype (PlutusTx.ToData, PlutusTx.FromData, PlutusTx.UnsafeFromData)
{- | The "status" of the proposal. This is only useful for state transitions that
@ -246,7 +246,7 @@ data Proposal = Proposal
, maximumCosigners :: Integer
-- ^ Arbitrary limit for maximum amount of cosigners on a proposal.
}
deriving stock (Show, Eq)
deriving stock (Show, Eq, GHC.Generic)
--------------------------------------------------------------------------------
-- Plutarch-land

View file

@ -82,6 +82,7 @@ data Stake = Stake
-- ^ Used when inlining the AssetClass of a 'PDiscrete' in the script code.
, proposalSTClass :: AssetClass
}
deriving stock (GHC.Generic)
{- | A lock placed on a Stake datum in order to prevent
depositing and withdrawing when votes are in place.