remove purescript-bridge generated files
This commit is contained in:
parent
b354145116
commit
9f98653ca6
8 changed files with 0 additions and 520 deletions
|
|
@ -1,24 +0,0 @@
|
||||||
-- File auto generated by purescript-bridge! --
|
|
||||||
module Agora.AuthorityToken where
|
|
||||||
|
|
||||||
import Prelude
|
|
||||||
|
|
||||||
import Data.Generic.Rep (class Generic)
|
|
||||||
import Data.Lens (Iso', Lens', Prism', iso, prism')
|
|
||||||
import Data.Lens.Iso.Newtype (_Newtype)
|
|
||||||
import Data.Lens.Record (prop)
|
|
||||||
import Data.Maybe (Maybe(..))
|
|
||||||
import Data.Newtype (class Newtype)
|
|
||||||
import PlutusLedgerApi.V1.Value (AssetClass)
|
|
||||||
import Type.Proxy (Proxy(Proxy))
|
|
||||||
|
|
||||||
newtype AuthorityToken = AuthorityToken { authority :: AssetClass }
|
|
||||||
|
|
||||||
derive instance Generic AuthorityToken _
|
|
||||||
|
|
||||||
derive instance Newtype AuthorityToken _
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
_AuthorityToken :: Iso' AuthorityToken {authority :: AssetClass}
|
|
||||||
_AuthorityToken = _Newtype
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
-- File auto generated by purescript-bridge! --
|
|
||||||
module Agora.Effect.GovernorMutation where
|
|
||||||
|
|
||||||
import Prelude
|
|
||||||
|
|
||||||
import Agora.Governor (GovernorDatum)
|
|
||||||
import Data.Generic.Rep (class Generic)
|
|
||||||
import Data.Lens (Iso', Lens', Prism', iso, prism')
|
|
||||||
import Data.Lens.Iso.Newtype (_Newtype)
|
|
||||||
import Data.Lens.Record (prop)
|
|
||||||
import Data.Maybe (Maybe(..))
|
|
||||||
import Data.Newtype (class Newtype)
|
|
||||||
import PlutusLedgerApi.V1.Tx (TxOutRef)
|
|
||||||
import Type.Proxy (Proxy(Proxy))
|
|
||||||
|
|
||||||
newtype MutateGovernorDatum = MutateGovernorDatum
|
|
||||||
{ governorRef :: TxOutRef
|
|
||||||
, newDatum :: GovernorDatum
|
|
||||||
}
|
|
||||||
|
|
||||||
derive instance Generic MutateGovernorDatum _
|
|
||||||
|
|
||||||
derive instance Newtype MutateGovernorDatum _
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
_MutateGovernorDatum :: Iso' MutateGovernorDatum {governorRef :: TxOutRef, newDatum :: GovernorDatum}
|
|
||||||
_MutateGovernorDatum = _Newtype
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
-- File auto generated by purescript-bridge! --
|
|
||||||
module Agora.Effect.TreasuryWithdrawal where
|
|
||||||
|
|
||||||
import Prelude
|
|
||||||
|
|
||||||
import Data.Generic.Rep (class Generic)
|
|
||||||
import Data.Lens (Iso', Lens', Prism', iso, prism')
|
|
||||||
import Data.Lens.Iso.Newtype (_Newtype)
|
|
||||||
import Data.Lens.Record (prop)
|
|
||||||
import Data.Maybe (Maybe(..))
|
|
||||||
import Data.Newtype (class Newtype)
|
|
||||||
import Data.Tuple (Tuple)
|
|
||||||
import PlutusLedgerApi.V1.Credential (Credential)
|
|
||||||
import PlutusLedgerApi.V1.Value (Value)
|
|
||||||
import Type.Proxy (Proxy(Proxy))
|
|
||||||
|
|
||||||
newtype TreasuryWithdrawalDatum = TreasuryWithdrawalDatum
|
|
||||||
{ receivers :: Array (Tuple Credential Value)
|
|
||||||
, treasuries :: Array Credential
|
|
||||||
}
|
|
||||||
|
|
||||||
derive instance Generic TreasuryWithdrawalDatum _
|
|
||||||
|
|
||||||
derive instance Newtype TreasuryWithdrawalDatum _
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
_TreasuryWithdrawalDatum :: Iso' TreasuryWithdrawalDatum {receivers :: Array (Tuple Credential Value), treasuries :: Array Credential}
|
|
||||||
_TreasuryWithdrawalDatum = _Newtype
|
|
||||||
|
|
@ -1,89 +0,0 @@
|
||||||
-- File auto generated by purescript-bridge! --
|
|
||||||
module Agora.Governor where
|
|
||||||
|
|
||||||
import Prelude
|
|
||||||
|
|
||||||
import Agora.Proposal (ProposalId, ProposalThresholds)
|
|
||||||
import Agora.Proposal.Time (MaxTimeRangeWidth, ProposalTimingConfig)
|
|
||||||
import Agora.SafeMoney (GTTag)
|
|
||||||
import Data.Bounded.Generic (genericBottom, genericTop)
|
|
||||||
import Data.Enum (class Enum)
|
|
||||||
import Data.Enum.Generic (genericPred, genericSucc)
|
|
||||||
import Data.Generic.Rep (class Generic)
|
|
||||||
import Data.Lens (Iso', Lens', Prism', iso, prism')
|
|
||||||
import Data.Lens.Iso.Newtype (_Newtype)
|
|
||||||
import Data.Lens.Record (prop)
|
|
||||||
import Data.Maybe (Maybe(..))
|
|
||||||
import Data.Newtype (class Newtype)
|
|
||||||
import Data.Tagged (Tagged)
|
|
||||||
import GHC.Num.Integer (Integer)
|
|
||||||
import PlutusLedgerApi.V1.Tx (TxOutRef)
|
|
||||||
import PlutusLedgerApi.V1.Value (AssetClass)
|
|
||||||
import Type.Proxy (Proxy(Proxy))
|
|
||||||
|
|
||||||
newtype GovernorDatum = GovernorDatum
|
|
||||||
{ proposalThresholds :: ProposalThresholds
|
|
||||||
, nextProposalId :: ProposalId
|
|
||||||
, proposalTimings :: ProposalTimingConfig
|
|
||||||
, createProposalTimeRangeMaxWidth :: MaxTimeRangeWidth
|
|
||||||
}
|
|
||||||
|
|
||||||
derive instance Generic GovernorDatum _
|
|
||||||
|
|
||||||
derive instance Newtype GovernorDatum _
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
_GovernorDatum :: Iso' GovernorDatum {proposalThresholds :: ProposalThresholds, nextProposalId :: ProposalId, proposalTimings :: ProposalTimingConfig, createProposalTimeRangeMaxWidth :: MaxTimeRangeWidth}
|
|
||||||
_GovernorDatum = _Newtype
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
data GovernorRedeemer
|
|
||||||
= CreateProposal
|
|
||||||
| MintGATs
|
|
||||||
| MutateGovernor
|
|
||||||
|
|
||||||
derive instance Generic GovernorRedeemer _
|
|
||||||
|
|
||||||
instance Enum GovernorRedeemer where
|
|
||||||
succ = genericSucc
|
|
||||||
pred = genericPred
|
|
||||||
|
|
||||||
instance Bounded GovernorRedeemer where
|
|
||||||
bottom = genericBottom
|
|
||||||
top = genericTop
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
_CreateProposal :: Prism' GovernorRedeemer Unit
|
|
||||||
_CreateProposal = prism' (const CreateProposal) case _ of
|
|
||||||
CreateProposal -> Just unit
|
|
||||||
_ -> Nothing
|
|
||||||
|
|
||||||
_MintGATs :: Prism' GovernorRedeemer Unit
|
|
||||||
_MintGATs = prism' (const MintGATs) case _ of
|
|
||||||
MintGATs -> Just unit
|
|
||||||
_ -> Nothing
|
|
||||||
|
|
||||||
_MutateGovernor :: Prism' GovernorRedeemer Unit
|
|
||||||
_MutateGovernor = prism' (const MutateGovernor) case _ of
|
|
||||||
MutateGovernor -> Just unit
|
|
||||||
_ -> Nothing
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
newtype Governor = Governor
|
|
||||||
{ gstOutRef :: TxOutRef
|
|
||||||
, gtClassRef :: Tagged GTTag AssetClass
|
|
||||||
, maximumCosigners :: Integer
|
|
||||||
}
|
|
||||||
|
|
||||||
derive instance Generic Governor _
|
|
||||||
|
|
||||||
derive instance Newtype Governor _
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
_Governor :: Iso' Governor {gstOutRef :: TxOutRef, gtClassRef :: Tagged GTTag AssetClass, maximumCosigners :: Integer}
|
|
||||||
_Governor = _Newtype
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
-- File auto generated by purescript-bridge! --
|
|
||||||
module Agora.MultiSig where
|
|
||||||
|
|
||||||
import Prelude
|
|
||||||
|
|
||||||
import Data.Generic.Rep (class Generic)
|
|
||||||
import Data.Lens (Iso', Lens', Prism', iso, prism')
|
|
||||||
import Data.Lens.Iso.Newtype (_Newtype)
|
|
||||||
import Data.Lens.Record (prop)
|
|
||||||
import Data.Maybe (Maybe(..))
|
|
||||||
import Data.Newtype (class Newtype)
|
|
||||||
import GHC.Num.Integer (Integer)
|
|
||||||
import PlutusLedgerApi.V1.Crypto (PubKeyHash)
|
|
||||||
import Type.Proxy (Proxy(Proxy))
|
|
||||||
|
|
||||||
newtype MultiSig = MultiSig
|
|
||||||
{ keys :: Array PubKeyHash
|
|
||||||
, minSigs :: Integer
|
|
||||||
}
|
|
||||||
|
|
||||||
derive instance Generic MultiSig _
|
|
||||||
|
|
||||||
derive instance Newtype MultiSig _
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
_MultiSig :: Iso' MultiSig {keys :: Array PubKeyHash, minSigs :: Integer}
|
|
||||||
_MultiSig = _Newtype
|
|
||||||
|
|
@ -1,188 +0,0 @@
|
||||||
-- File auto generated by purescript-bridge! --
|
|
||||||
module Agora.Proposal where
|
|
||||||
|
|
||||||
import Prelude
|
|
||||||
|
|
||||||
import Agora.Proposal.Time (ProposalStartingTime, ProposalTimingConfig)
|
|
||||||
import Agora.SafeMoney (GTTag)
|
|
||||||
import Data.Bounded.Generic (genericBottom, genericTop)
|
|
||||||
import Data.Enum (class Enum)
|
|
||||||
import Data.Enum.Generic (genericPred, genericSucc)
|
|
||||||
import Data.Generic.Rep (class Generic)
|
|
||||||
import Data.Lens (Iso', Lens', Prism', iso, prism')
|
|
||||||
import Data.Lens.Iso.Newtype (_Newtype)
|
|
||||||
import Data.Lens.Record (prop)
|
|
||||||
import Data.Maybe (Maybe(..))
|
|
||||||
import Data.Newtype (class Newtype)
|
|
||||||
import Data.Tagged (Tagged)
|
|
||||||
import GHC.Num.Integer (Integer)
|
|
||||||
import PlutusLedgerApi.V1.Crypto (PubKeyHash)
|
|
||||||
import PlutusLedgerApi.V1.Scripts (DatumHash, ValidatorHash)
|
|
||||||
import PlutusLedgerApi.V1.Value (AssetClass)
|
|
||||||
import PlutusTx.AssocMap (Map)
|
|
||||||
import Type.Proxy (Proxy(Proxy))
|
|
||||||
|
|
||||||
newtype ProposalId = ProposalId { proposalTag :: Integer }
|
|
||||||
|
|
||||||
derive instance Generic ProposalId _
|
|
||||||
|
|
||||||
derive instance Newtype ProposalId _
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
_ProposalId :: Iso' ProposalId {proposalTag :: Integer}
|
|
||||||
_ProposalId = _Newtype
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
newtype ResultTag = ResultTag { getResultTag :: Integer }
|
|
||||||
|
|
||||||
derive instance Generic ResultTag _
|
|
||||||
|
|
||||||
derive instance Newtype ResultTag _
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
_ResultTag :: Iso' ResultTag {getResultTag :: Integer}
|
|
||||||
_ResultTag = _Newtype
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
data ProposalStatus
|
|
||||||
= Draft
|
|
||||||
| VotingReady
|
|
||||||
| Locked
|
|
||||||
| Finished
|
|
||||||
|
|
||||||
derive instance Generic ProposalStatus _
|
|
||||||
|
|
||||||
instance Enum ProposalStatus where
|
|
||||||
succ = genericSucc
|
|
||||||
pred = genericPred
|
|
||||||
|
|
||||||
instance Bounded ProposalStatus where
|
|
||||||
bottom = genericBottom
|
|
||||||
top = genericTop
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
_Draft :: Prism' ProposalStatus Unit
|
|
||||||
_Draft = prism' (const Draft) case _ of
|
|
||||||
Draft -> Just unit
|
|
||||||
_ -> Nothing
|
|
||||||
|
|
||||||
_VotingReady :: Prism' ProposalStatus Unit
|
|
||||||
_VotingReady = prism' (const VotingReady) case _ of
|
|
||||||
VotingReady -> Just unit
|
|
||||||
_ -> Nothing
|
|
||||||
|
|
||||||
_Locked :: Prism' ProposalStatus Unit
|
|
||||||
_Locked = prism' (const Locked) case _ of
|
|
||||||
Locked -> Just unit
|
|
||||||
_ -> Nothing
|
|
||||||
|
|
||||||
_Finished :: Prism' ProposalStatus Unit
|
|
||||||
_Finished = prism' (const Finished) case _ of
|
|
||||||
Finished -> Just unit
|
|
||||||
_ -> Nothing
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
newtype ProposalThresholds = ProposalThresholds
|
|
||||||
{ countVoting :: Tagged GTTag Integer
|
|
||||||
, create :: Tagged GTTag Integer
|
|
||||||
, startVoting :: Tagged GTTag Integer
|
|
||||||
}
|
|
||||||
|
|
||||||
derive instance Generic ProposalThresholds _
|
|
||||||
|
|
||||||
derive instance Newtype ProposalThresholds _
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
_ProposalThresholds :: Iso' ProposalThresholds {countVoting :: Tagged GTTag Integer, create :: Tagged GTTag Integer, startVoting :: Tagged GTTag Integer}
|
|
||||||
_ProposalThresholds = _Newtype
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
newtype ProposalVotes = ProposalVotes { getProposalVotes :: Map ResultTag Integer }
|
|
||||||
|
|
||||||
derive instance Generic ProposalVotes _
|
|
||||||
|
|
||||||
derive instance Newtype ProposalVotes _
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
_ProposalVotes :: Iso' ProposalVotes {getProposalVotes :: Map ResultTag Integer}
|
|
||||||
_ProposalVotes = _Newtype
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
newtype ProposalDatum = ProposalDatum
|
|
||||||
{ proposalId :: ProposalId
|
|
||||||
, effects :: Map ResultTag (Map ValidatorHash DatumHash)
|
|
||||||
, status :: ProposalStatus
|
|
||||||
, cosigners :: Array PubKeyHash
|
|
||||||
, thresholds :: ProposalThresholds
|
|
||||||
, votes :: ProposalVotes
|
|
||||||
, timingConfig :: ProposalTimingConfig
|
|
||||||
, startingTime :: ProposalStartingTime
|
|
||||||
}
|
|
||||||
|
|
||||||
derive instance Generic ProposalDatum _
|
|
||||||
|
|
||||||
derive instance Newtype ProposalDatum _
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
_ProposalDatum :: Iso' ProposalDatum {proposalId :: ProposalId, effects :: Map ResultTag (Map ValidatorHash DatumHash), status :: ProposalStatus, cosigners :: Array PubKeyHash, thresholds :: ProposalThresholds, votes :: ProposalVotes, timingConfig :: ProposalTimingConfig, startingTime :: ProposalStartingTime}
|
|
||||||
_ProposalDatum = _Newtype
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
data ProposalRedeemer
|
|
||||||
= Vote ResultTag
|
|
||||||
| Cosign (Array PubKeyHash)
|
|
||||||
| Unlock ResultTag
|
|
||||||
| AdvanceProposal
|
|
||||||
|
|
||||||
derive instance Generic ProposalRedeemer _
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
_Vote :: Prism' ProposalRedeemer ResultTag
|
|
||||||
_Vote = prism' Vote case _ of
|
|
||||||
(Vote a) -> Just a
|
|
||||||
_ -> Nothing
|
|
||||||
|
|
||||||
_Cosign :: Prism' ProposalRedeemer (Array PubKeyHash)
|
|
||||||
_Cosign = prism' Cosign case _ of
|
|
||||||
(Cosign a) -> Just a
|
|
||||||
_ -> Nothing
|
|
||||||
|
|
||||||
_Unlock :: Prism' ProposalRedeemer ResultTag
|
|
||||||
_Unlock = prism' Unlock case _ of
|
|
||||||
(Unlock a) -> Just a
|
|
||||||
_ -> Nothing
|
|
||||||
|
|
||||||
_AdvanceProposal :: Prism' ProposalRedeemer Unit
|
|
||||||
_AdvanceProposal = prism' (const AdvanceProposal) case _ of
|
|
||||||
AdvanceProposal -> Just unit
|
|
||||||
_ -> Nothing
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
newtype Proposal = Proposal
|
|
||||||
{ governorSTAssetClass :: AssetClass
|
|
||||||
, stakeSTAssetClass :: AssetClass
|
|
||||||
, maximumCosigners :: Integer
|
|
||||||
}
|
|
||||||
|
|
||||||
derive instance Generic Proposal _
|
|
||||||
|
|
||||||
derive instance Newtype Proposal _
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
_Proposal :: Iso' Proposal {governorSTAssetClass :: AssetClass, stakeSTAssetClass :: AssetClass, maximumCosigners :: Integer}
|
|
||||||
_Proposal = _Newtype
|
|
||||||
|
|
@ -1,103 +0,0 @@
|
||||||
-- File auto generated by purescript-bridge! --
|
|
||||||
module Agora.Stake where
|
|
||||||
|
|
||||||
import Prelude
|
|
||||||
|
|
||||||
import Agora.Proposal (ProposalId, ResultTag)
|
|
||||||
import Agora.SafeMoney (GTTag)
|
|
||||||
import Data.Generic.Rep (class Generic)
|
|
||||||
import Data.Lens (Iso', Lens', Prism', iso, prism')
|
|
||||||
import Data.Lens.Iso.Newtype (_Newtype)
|
|
||||||
import Data.Lens.Record (prop)
|
|
||||||
import Data.Maybe (Maybe(..))
|
|
||||||
import Data.Newtype (class Newtype)
|
|
||||||
import Data.Tagged (Tagged)
|
|
||||||
import GHC.Num.Integer (Integer)
|
|
||||||
import PlutusLedgerApi.V1.Crypto (PubKeyHash)
|
|
||||||
import PlutusLedgerApi.V1.Value (AssetClass)
|
|
||||||
import Type.Proxy (Proxy(Proxy))
|
|
||||||
|
|
||||||
newtype Stake = Stake
|
|
||||||
{ gtClassRef :: Tagged GTTag AssetClass
|
|
||||||
, proposalSTClass :: AssetClass
|
|
||||||
}
|
|
||||||
|
|
||||||
derive instance Generic Stake _
|
|
||||||
|
|
||||||
derive instance Newtype Stake _
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
_Stake :: Iso' Stake {gtClassRef :: Tagged GTTag AssetClass, proposalSTClass :: AssetClass}
|
|
||||||
_Stake = _Newtype
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
newtype ProposalLock = ProposalLock
|
|
||||||
{ vote :: ResultTag
|
|
||||||
, proposalId :: ProposalId
|
|
||||||
}
|
|
||||||
|
|
||||||
derive instance Generic ProposalLock _
|
|
||||||
|
|
||||||
derive instance Newtype ProposalLock _
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
_ProposalLock :: Iso' ProposalLock {vote :: ResultTag, proposalId :: ProposalId}
|
|
||||||
_ProposalLock = _Newtype
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
data StakeRedeemer
|
|
||||||
= DepositWithdraw (Tagged GTTag Integer)
|
|
||||||
| Destroy
|
|
||||||
| PermitVote ProposalLock
|
|
||||||
| RetractVotes (Array ProposalLock)
|
|
||||||
| WitnessStake
|
|
||||||
|
|
||||||
derive instance Generic StakeRedeemer _
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
_DepositWithdraw :: Prism' StakeRedeemer (Tagged GTTag Integer)
|
|
||||||
_DepositWithdraw = prism' DepositWithdraw case _ of
|
|
||||||
(DepositWithdraw a) -> Just a
|
|
||||||
_ -> Nothing
|
|
||||||
|
|
||||||
_Destroy :: Prism' StakeRedeemer Unit
|
|
||||||
_Destroy = prism' (const Destroy) case _ of
|
|
||||||
Destroy -> Just unit
|
|
||||||
_ -> Nothing
|
|
||||||
|
|
||||||
_PermitVote :: Prism' StakeRedeemer ProposalLock
|
|
||||||
_PermitVote = prism' PermitVote case _ of
|
|
||||||
(PermitVote a) -> Just a
|
|
||||||
_ -> Nothing
|
|
||||||
|
|
||||||
_RetractVotes :: Prism' StakeRedeemer (Array ProposalLock)
|
|
||||||
_RetractVotes = prism' RetractVotes case _ of
|
|
||||||
(RetractVotes a) -> Just a
|
|
||||||
_ -> Nothing
|
|
||||||
|
|
||||||
_WitnessStake :: Prism' StakeRedeemer Unit
|
|
||||||
_WitnessStake = prism' (const WitnessStake) case _ of
|
|
||||||
WitnessStake -> Just unit
|
|
||||||
_ -> Nothing
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
newtype StakeDatum = StakeDatum
|
|
||||||
{ stakedAmount :: Tagged GTTag Integer
|
|
||||||
, owner :: PubKeyHash
|
|
||||||
, lockedBy :: Array ProposalLock
|
|
||||||
}
|
|
||||||
|
|
||||||
derive instance Generic StakeDatum _
|
|
||||||
|
|
||||||
derive instance Newtype StakeDatum _
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
_StakeDatum :: Iso' StakeDatum {stakedAmount :: Tagged GTTag Integer, owner :: PubKeyHash, lockedBy :: Array ProposalLock}
|
|
||||||
_StakeDatum = _Newtype
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
||||||
-- File auto generated by purescript-bridge! --
|
|
||||||
module Agora.Treasury where
|
|
||||||
|
|
||||||
import Prelude
|
|
||||||
|
|
||||||
import Data.Bounded.Generic (genericBottom, genericTop)
|
|
||||||
import Data.Enum (class Enum)
|
|
||||||
import Data.Enum.Generic (genericPred, genericSucc)
|
|
||||||
import Data.Generic.Rep (class Generic)
|
|
||||||
import Data.Lens (Iso', Lens', Prism', iso, prism')
|
|
||||||
import Data.Lens.Iso.Newtype (_Newtype)
|
|
||||||
import Data.Lens.Record (prop)
|
|
||||||
import Data.Maybe (Maybe(..))
|
|
||||||
import Type.Proxy (Proxy(Proxy))
|
|
||||||
|
|
||||||
data TreasuryRedeemer = SpendTreasuryGAT
|
|
||||||
|
|
||||||
derive instance Generic TreasuryRedeemer _
|
|
||||||
|
|
||||||
instance Enum TreasuryRedeemer where
|
|
||||||
succ = genericSucc
|
|
||||||
pred = genericPred
|
|
||||||
|
|
||||||
instance Bounded TreasuryRedeemer where
|
|
||||||
bottom = genericBottom
|
|
||||||
top = genericTop
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
_SpendTreasuryGAT :: Iso' TreasuryRedeemer Unit
|
|
||||||
_SpendTreasuryGAT = iso (const unit) (const SpendTreasuryGAT)
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue