Actions
module Ledger.Dijkstra.Foreign.Gov.Actions where
open import Data.Rational using (ℚ)
open import Foreign.Convertible
open import Foreign.Convertible.Deriving
open import Foreign.HaskellTypes
open import Foreign.HaskellTypes.Deriving
open import Ledger.Prelude
open import Ledger.Prelude.Foreign.HSTypes
open import Ledger.Dijkstra.Foreign.HSStructures
open import Ledger.Dijkstra.Foreign.PParams
open import Ledger.Core.Foreign.Address
open import Ledger.Core.Specification.ProtocolVersion
data GovAction' : Type where
NoConfidence : GovAction'
UpdateCommittee : (Credential ⇀ Epoch) → ℙ Credential → ℚ → GovAction'
NewConstitution : ADHash → Maybe ScriptHash → GovAction'
TriggerHardFork : ProtVer → GovAction'
ChangePParams : PParamsUpdate → GovAction'
TreasuryWithdrawal : (RewardAddress ⇀ Treasury) → GovAction'
Info : GovAction'
instance
mkGovAction' : Convertible GovAction GovAction'
mkGovAction' = λ where
.to $\begin{pmatrix} \,\href{Ledger.Dijkstra.Specification.Gov.Actions.html#1049}{\htmlId{1308}{\htmlClass{InductiveConstructor}{\text{NoConfidence}}}}\, \\ \,\htmlId{1330}{\htmlClass{Symbol}{\text{\_}}}\, \end{pmatrix}$ → NoConfidence
.to $\begin{pmatrix} \,\href{Ledger.Dijkstra.Specification.Gov.Actions.html#1087}{\htmlId{1371}{\htmlClass{InductiveConstructor}{\text{UpdateCommittee}}}}\, \\ \,\htmlId{1393}{\htmlClass{Symbol}{\text{(}}}\,\,\href{Ledger.Dijkstra.Foreign.Gov.Actions.html#1394}{\htmlId{1394}{\htmlClass{Bound}{\text{m}}}}\, , \,\href{Ledger.Dijkstra.Foreign.Gov.Actions.html#1398}{\htmlId{1398}{\htmlClass{Bound}{\text{s}}}}\, , \,\href{Ledger.Dijkstra.Foreign.Gov.Actions.html#1402}{\htmlId{1402}{\htmlClass{Bound}{\text{q}}}}\,\,\htmlId{1403}{\htmlClass{Symbol}{\text{)}}}\, \end{pmatrix}$ → UpdateCommittee m s q
.to $\begin{pmatrix} \,\href{Ledger.Dijkstra.Specification.Gov.Actions.html#1125}{\htmlId{1443}{\htmlClass{InductiveConstructor}{\text{NewConstitution}}}}\, \\ \,\htmlId{1465}{\htmlClass{Symbol}{\text{(}}}\,\,\href{Ledger.Dijkstra.Foreign.Gov.Actions.html#1466}{\htmlId{1466}{\htmlClass{Bound}{\text{h}}}}\, , \,\href{Ledger.Dijkstra.Foreign.Gov.Actions.html#1470}{\htmlId{1470}{\htmlClass{Bound}{\text{s}}}}\,\,\htmlId{1471}{\htmlClass{Symbol}{\text{)}}}\, \end{pmatrix}$ → NewConstitution h s
.to $\begin{pmatrix} \,\href{Ledger.Dijkstra.Specification.Gov.Actions.html#1163}{\htmlId{1513}{\htmlClass{InductiveConstructor}{\text{TriggerHardFork}}}}\, \\ \,\href{Ledger.Dijkstra.Foreign.Gov.Actions.html#1535}{\htmlId{1535}{\htmlClass{Bound}{\text{v}}}}\, \end{pmatrix}$ → TriggerHardFork v
.to $\begin{pmatrix} \,\href{Ledger.Dijkstra.Specification.Gov.Actions.html#1201}{\htmlId{1581}{\htmlClass{InductiveConstructor}{\text{ChangePParams}}}}\, \\ \,\href{Ledger.Dijkstra.Foreign.Gov.Actions.html#1603}{\htmlId{1603}{\htmlClass{Bound}{\text{u}}}}\, \end{pmatrix}$ → ChangePParams u
.to $\begin{pmatrix} \,\href{Ledger.Dijkstra.Specification.Gov.Actions.html#1239}{\htmlId{1647}{\htmlClass{InductiveConstructor}{\text{TreasuryWithdrawal}}}}\, \\ \,\href{Ledger.Dijkstra.Foreign.Gov.Actions.html#1669}{\htmlId{1669}{\htmlClass{Bound}{\text{w}}}}\, \end{pmatrix}$ → TreasuryWithdrawal w
.to $\begin{pmatrix} \,\href{Ledger.Dijkstra.Specification.Gov.Actions.html#1277}{\htmlId{1718}{\htmlClass{InductiveConstructor}{\text{Info}}}}\, \\ \,\htmlId{1740}{\htmlClass{Symbol}{\text{\_}}}\, \end{pmatrix}$ → Info
.from NoConfidence → $\begin{pmatrix} \,\href{Ledger.Dijkstra.Specification.Gov.Actions.html#1049}{\htmlId{1803}{\htmlClass{InductiveConstructor}{\text{NoConfidence}}}}\, \\ \,\href{Agda.Builtin.Unit.html#212}{\htmlId{1825}{\htmlClass{InductiveConstructor}{\text{tt}}}}\, \end{pmatrix}$
.from (UpdateCommittee m s q) → $\begin{pmatrix} \,\href{Ledger.Dijkstra.Specification.Gov.Actions.html#1087}{\htmlId{1881}{\htmlClass{InductiveConstructor}{\text{UpdateCommittee}}}}\, \\ \,\htmlId{1903}{\htmlClass{Symbol}{\text{(}}}\,\,\href{Ledger.Dijkstra.Foreign.Gov.Actions.html#1868}{\htmlId{1904}{\htmlClass{Bound}{\text{m}}}}\, , \,\href{Ledger.Dijkstra.Foreign.Gov.Actions.html#1870}{\htmlId{1908}{\htmlClass{Bound}{\text{s}}}}\, , \,\href{Ledger.Dijkstra.Foreign.Gov.Actions.html#1872}{\htmlId{1912}{\htmlClass{Bound}{\text{q}}}}\,\,\htmlId{1913}{\htmlClass{Symbol}{\text{)}}}\, \end{pmatrix}$
.from (NewConstitution h s) → $\begin{pmatrix} \,\href{Ledger.Dijkstra.Specification.Gov.Actions.html#1125}{\htmlId{1959}{\htmlClass{InductiveConstructor}{\text{NewConstitution}}}}\, \\ \,\htmlId{1981}{\htmlClass{Symbol}{\text{(}}}\,\,\href{Ledger.Dijkstra.Foreign.Gov.Actions.html#1946}{\htmlId{1982}{\htmlClass{Bound}{\text{h}}}}\, , \,\href{Ledger.Dijkstra.Foreign.Gov.Actions.html#1948}{\htmlId{1986}{\htmlClass{Bound}{\text{s}}}}\,\,\htmlId{1987}{\htmlClass{Symbol}{\text{)}}}\, \end{pmatrix}$
.from (TriggerHardFork v) → $\begin{pmatrix} \,\href{Ledger.Dijkstra.Specification.Gov.Actions.html#1163}{\htmlId{2037}{\htmlClass{InductiveConstructor}{\text{TriggerHardFork}}}}\, \\ \,\href{Ledger.Dijkstra.Foreign.Gov.Actions.html#2024}{\htmlId{2059}{\htmlClass{Bound}{\text{v}}}}\, \end{pmatrix}$
.from (ChangePParams u) → $\begin{pmatrix} \,\href{Ledger.Dijkstra.Specification.Gov.Actions.html#1201}{\htmlId{2115}{\htmlClass{InductiveConstructor}{\text{ChangePParams}}}}\, \\ \,\href{Ledger.Dijkstra.Foreign.Gov.Actions.html#2100}{\htmlId{2137}{\htmlClass{Bound}{\text{u}}}}\, \end{pmatrix}$
.from (TreasuryWithdrawal w) → $\begin{pmatrix} \,\href{Ledger.Dijkstra.Specification.Gov.Actions.html#1239}{\htmlId{2193}{\htmlClass{InductiveConstructor}{\text{TreasuryWithdrawal}}}}\, \\ \,\href{Ledger.Dijkstra.Foreign.Gov.Actions.html#2183}{\htmlId{2215}{\htmlClass{Bound}{\text{w}}}}\, \end{pmatrix}$
.from Info → $\begin{pmatrix} \,\href{Ledger.Dijkstra.Specification.Gov.Actions.html#1277}{\htmlId{2271}{\htmlClass{InductiveConstructor}{\text{Info}}}}\, \\ \,\href{Agda.Builtin.Unit.html#212}{\htmlId{2293}{\htmlClass{InductiveConstructor}{\text{tt}}}}\, \end{pmatrix}$
HsTy-GovAction' = autoHsType GovAction' ⊣ withName "GovAction"
Conv-GovAction' = autoConvert GovAction'
HsTy-GovAction = MkHsType GovAction (HsType GovAction')
Conv-GovAction = mkGovAction' ⨾ Conv-GovAction'