{-# LANGUAGE ImportQualifiedPost #-}
{-# LANGUAGE OverloadedLists #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE NoImplicitPrelude #-}
module Test.Cardano.Ledger.Conway.CDDL (
module Test.Cardano.Ledger.Babbage.CDDL,
conwayCDDL,
certificate,
drep,
anchor,
gov_action_id,
hard_fork_initiation_action,
treasury_withdrawals_action,
no_confidence,
update_committee,
new_constitution,
info_action,
policy_hash,
voting_procedures,
pool_voting_thresholds,
drep_voting_thresholds,
plutus_v3_script,
potential_languages,
transaction_input,
shelley_transaction_output,
withdrawals,
mint,
ex_unit_prices,
maybe_tagged_set,
maybe_tagged_nonempty_set,
maybe_tagged_oset,
maybe_tagged_nonempty_oset,
) where
import Cardano.Ledger.Conway (ConwayEra)
import Codec.CBOR.Cuddle.Comments ((//-))
import Codec.CBOR.Cuddle.Huddle
import Data.Function (($))
import Data.Semigroup ((<>))
import Data.Text qualified as T
import Data.Word (Word64)
import GHC.Num (Integer)
import Test.Cardano.Ledger.Babbage.CDDL hiding (
certificate,
ex_unit_prices,
mint,
multiasset,
redeemers,
required_signers,
transaction_input,
untagged_set,
value,
withdrawals,
)
import Text.Heredoc
drep_credential :: Rule
drep_credential :: Rule
drep_credential = Text
"drep_credential" Text -> Rule -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= Rule
credential
committee_cold_credential :: Rule
committee_cold_credential :: Rule
committee_cold_credential = Text
"committee_cold_credential" Text -> Rule -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= Rule
credential
committee_hot_credential :: Rule
committee_hot_credential :: Rule
committee_hot_credential = Text
"committee_hot_credential" Text -> Rule -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= Rule
credential
drep :: Rule
drep :: Rule
drep =
Text
"drep"
Text -> Array -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= ArrayChoice -> ArrayChoice
arr [Item ArrayChoice
ArrayEntry
0, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
addr_keyhash]
ArrayChoice -> ArrayChoice -> Array
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Item ArrayChoice
ArrayEntry
1, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
script_hash]
Array -> ArrayChoice -> Array
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Item ArrayChoice
ArrayEntry
2]
Array -> ArrayChoice -> Array
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Item ArrayChoice
ArrayEntry
3]
anchor :: Rule
anchor :: Rule
anchor = Text
"anchor" Text -> ArrayChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= ArrayChoice -> ArrayChoice
arr [Key
"anchor_url" Key -> Rule -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
url128, Key
"anchor_data_hash" Key -> Rule -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
hash32]
dns_name128 :: Rule
dns_name128 :: Rule
dns_name128 = Text
"dns_name" Text -> Constrained -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= Value Text
VText Value Text -> (Word64, Word64) -> Constrained
forall c a s.
(IsSizeable a, IsSize s, IsConstrainable c a) =>
c -> s -> Constrained
`sized` (Word64
0 :: Word64, Word64
128 :: Word64)
url128 :: Rule
url128 :: Rule
url128 = Text
"url" Text -> Constrained -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= Value Text
VText Value Text -> (Word64, Word64) -> Constrained
forall c a s.
(IsSizeable a, IsSize s, IsConstrainable c a) =>
c -> s -> Constrained
`sized` (Word64
0 :: Word64, Word64
128 :: Word64)
conwayCDDL :: Huddle
conwayCDDL :: Huddle
conwayCDDL =
[HuddleItem] -> Huddle
collectFromInit ([HuddleItem] -> Huddle) -> [HuddleItem] -> Huddle
forall a b. (a -> b) -> a -> b
$
[ Rule -> HuddleItem
HIRule Rule
block
, Rule -> HuddleItem
HIRule Rule
transaction
, Rule -> HuddleItem
HIRule Rule
kes_signature
, Rule -> HuddleItem
HIRule Rule
language
, Rule -> HuddleItem
HIRule Rule
potential_languages
, Rule -> HuddleItem
HIRule Rule
signkey_kes
, Rule -> HuddleItem
HIRule Rule
certificate
]
[HuddleItem] -> [HuddleItem] -> [HuddleItem]
forall a. Semigroup a => a -> a -> a
<> [HuddleItem]
conwayPoolRules
block :: Rule
block :: Rule
block =
Text -> Rule -> Rule
forall a. HasField' "description" a (Maybe Text) => Text -> a -> a
comment
Text
[str|Valid blocks must also satisfy the following two constraints:
|1. the length of transaction_bodies and transaction_witness_sets
| must be the same
|2. every transaction_index must be strictly smaller than the
| length of transaction_bodies
|]
(Rule -> Rule) -> Rule -> Rule
forall a b. (a -> b) -> a -> b
$ Text
"block"
Text -> ArrayChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= ArrayChoice -> ArrayChoice
arr
[ Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
header
, Key
"transaction_bodies" Key -> ArrayChoice -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> ArrayChoice -> ArrayChoice
arr [Word64
0 Word64 -> ArrayEntry -> ArrayEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
transaction_body]
, Key
"transaction_witness_sets"
Key -> ArrayChoice -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> ArrayChoice -> ArrayChoice
arr [Word64
0 Word64 -> ArrayEntry -> ArrayEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
transaction_witness_set]
, Key
"auxiliary_data_set"
Key -> MapChoice -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> MapChoice -> MapChoice
mp [Word64
0 Word64 -> MapEntry -> MapEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Rule -> Key
forall r. IsType0 r => r -> Key
asKey Rule
transaction_index Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
auxiliary_data]
, Key
"invalid_transactions" Key -> ArrayChoice -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> ArrayChoice -> ArrayChoice
arr [Word64
0 Word64 -> ArrayEntry -> ArrayEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
transaction_index]
]
transaction :: Rule
transaction :: Rule
transaction =
Text
"transaction"
Text -> ArrayChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= ArrayChoice -> ArrayChoice
arr
[ Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
transaction_body
, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
transaction_witness_set
, Value Bool -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Value Bool
VBool
, Choice Type2 -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a (Rule
auxiliary_data Rule -> Value Void -> Choice Type2
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ Value Void
VNil)
]
header :: Rule
=
Text
"header"
Text -> ArrayChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= ArrayChoice -> ArrayChoice
arr
[ Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
header_body
, Key
"body_signature" Key -> Rule -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
kes_signature
]
header_body :: Rule
header_body :: Rule
header_body =
Text
"header_body"
Text -> ArrayChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= ArrayChoice -> ArrayChoice
arr
[ Key
"block_number" Key -> Rule -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
block_number
, Key
"slot" Key -> Rule -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
slot
, Key
"prev_hash" Key -> Choice Type2 -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> (Rule
hash32 Rule -> Value Void -> Choice Type2
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ Value Void
VNil)
, Key
"issuer_vkey" Key -> Rule -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
vkey
, Key
"vrf_vkey" Key -> Rule -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
vrf_vkey
, Key
"vrf_result" Key -> Rule -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
vrf_cert
, Key
"block_body_size" Key -> Constrained -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> (Value Int
VUInt Value Int -> Word64 -> Constrained
forall c a s.
(IsSizeable a, IsSize s, IsConstrainable c a) =>
c -> s -> Constrained
`sized` (Word64
4 :: Word64))
, Key
"block_body_hash" Key -> Rule -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
hash32
, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
operational_cert
, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a (forall era. Era era => Rule
protocol_version @ConwayEra)
]
transaction_body :: Rule
transaction_body :: Rule
transaction_body =
Text
"transaction_body"
Text -> MapChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= MapChoice -> MapChoice
mp
[ Word64 -> Key
idx Word64
0 Key -> GRuleCall -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule -> GRuleCall
forall a. IsType0 a => a -> GRuleCall
maybe_tagged_set Rule
transaction_input
, Word64 -> Key
idx Word64
1 Key -> ArrayChoice -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> ArrayChoice -> ArrayChoice
arr [Word64
0 Word64 -> ArrayEntry -> ArrayEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
transaction_output]
, Word64 -> Key
idx Word64
2 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
coin
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
3 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
slot)
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
4 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
certificates)
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
5 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
withdrawals)
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
7 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
auxiliary_data_hash)
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
8 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
slot)
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
9 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
mint)
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
11 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
script_data_hash)
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
13 Key -> GRuleCall -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule -> GRuleCall
forall a. IsType0 a => a -> GRuleCall
maybe_tagged_nonempty_set Rule
transaction_input)
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
14 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
required_signers)
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
15 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
network_id)
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
16 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
transaction_output)
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
17 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
coin)
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
18 Key -> GRuleCall -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule -> GRuleCall
forall a. IsType0 a => a -> GRuleCall
maybe_tagged_nonempty_set Rule
transaction_input)
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
19 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
voting_procedures)
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
20 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
proposal_procedures)
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
21 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
coin)
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
22 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
positive_coin)
]
voting_procedures :: Rule
voting_procedures :: Rule
voting_procedures =
Text
"voting_procedures"
Text -> MapChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= MapChoice -> MapChoice
mp [Word64
1 Word64 -> MapEntry -> MapEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Rule -> Key
forall r. IsType0 r => r -> Key
asKey Rule
voter Key -> MapChoice -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> MapChoice -> MapChoice
mp [Word64
1 Word64 -> MapEntry -> MapEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Rule -> Key
forall r. IsType0 r => r -> Key
asKey Rule
gov_action_id Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
voting_procedure]]
voting_procedure :: Rule
voting_procedure :: Rule
voting_procedure = Text
"voting_procedure" Text -> ArrayChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= ArrayChoice -> ArrayChoice
arr [Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
vote, Choice Type2 -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a (Rule
anchor Rule -> Value Void -> Choice Type2
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ Value Void
VNil)]
proposal_procedure :: Rule
proposal_procedure :: Rule
proposal_procedure =
Text
"proposal_procedure"
Text -> ArrayChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= ArrayChoice -> ArrayChoice
arr
[ Key
"deposit" Key -> Rule -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
coin
, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
reward_account
, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
gov_action
, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
anchor
]
proposal_procedures :: Rule
proposal_procedures :: Rule
proposal_procedures = Text
"proposal_procedures" Text -> GRuleCall -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= Rule -> GRuleCall
forall a. IsType0 a => a -> GRuleCall
maybe_tagged_nonempty_oset Rule
proposal_procedure
certificates :: Rule
certificates :: Rule
certificates = Text
"certificates" Text -> GRuleCall -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= Rule -> GRuleCall
forall a. IsType0 a => a -> GRuleCall
maybe_tagged_nonempty_oset Rule
certificate
gov_action :: Rule
gov_action :: Rule
gov_action =
Text
"gov_action"
Text -> Array -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= ArrayChoice -> ArrayChoice
arr [Named Group -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
parameter_change_action]
ArrayChoice -> ArrayChoice -> Array
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Named Group -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
hard_fork_initiation_action]
Array -> ArrayChoice -> Array
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Named Group -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
treasury_withdrawals_action]
Array -> ArrayChoice -> Array
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Named Group -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
no_confidence]
Array -> ArrayChoice -> Array
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Named Group -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
update_committee]
Array -> ArrayChoice -> Array
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Named Group -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
new_constitution]
Array -> ArrayChoice -> Array
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
info_action]
policy_hash :: Rule
policy_hash :: Rule
policy_hash = Text
"policy_hash" Text -> Rule -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= Rule
script_hash
parameter_change_action :: Named Group
parameter_change_action :: Named Group
parameter_change_action =
Text
"parameter_change_action"
Text -> Group -> Named Group
=:~ Group -> Group
grp
[ Item Group
ArrayEntry
0
, Choice Type2 -> Item Group
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a (Choice Type2 -> Item Group) -> Choice Type2 -> Item Group
forall a b. (a -> b) -> a -> b
$ Rule
gov_action_id Rule -> Value Void -> Choice Type2
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ Value Void
VNil
, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
protocol_param_update
, Choice Type2 -> Item Group
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a (Choice Type2 -> Item Group) -> Choice Type2 -> Item Group
forall a b. (a -> b) -> a -> b
$ Rule
policy_hash Rule -> Value Void -> Choice Type2
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ Value Void
VNil
]
hard_fork_initiation_action :: Named Group
hard_fork_initiation_action :: Named Group
hard_fork_initiation_action =
Text
"hard_fork_initiation_action"
Text -> Group -> Named Group
=:~ Group -> Group
grp [Item Group
ArrayEntry
1, Choice Type2 -> Item Group
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a (Choice Type2 -> Item Group) -> Choice Type2 -> Item Group
forall a b. (a -> b) -> a -> b
$ Rule
gov_action_id Rule -> Value Void -> Choice Type2
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ Value Void
VNil, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a (forall era. Era era => Rule
protocol_version @ConwayEra)]
treasury_withdrawals_action :: Named Group
treasury_withdrawals_action :: Named Group
treasury_withdrawals_action =
Text
"treasury_withdrawals_action"
Text -> Group -> Named Group
=:~ Group -> Group
grp [Item Group
ArrayEntry
2, MapChoice -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a (MapChoice -> MapChoice
mp [Word64
0 Word64 -> MapEntry -> MapEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Rule -> Key
forall r. IsType0 r => r -> Key
asKey Rule
reward_account Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
coin]), Choice Type2 -> Item Group
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a (Choice Type2 -> Item Group) -> Choice Type2 -> Item Group
forall a b. (a -> b) -> a -> b
$ Rule
policy_hash Rule -> Value Void -> Choice Type2
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ Value Void
VNil]
no_confidence :: Named Group
no_confidence :: Named Group
no_confidence = Text
"no_confidence" Text -> Group -> Named Group
=:~ Group -> Group
grp [Item Group
ArrayEntry
3, Choice Type2 -> Item Group
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a (Choice Type2 -> Item Group) -> Choice Type2 -> Item Group
forall a b. (a -> b) -> a -> b
$ Rule
gov_action_id Rule -> Value Void -> Choice Type2
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ Value Void
VNil]
update_committee :: Named Group
update_committee :: Named Group
update_committee =
Text
"update_committee"
Text -> Group -> Named Group
=:~ Group -> Group
grp
[ Item Group
ArrayEntry
4
, Choice Type2 -> Item Group
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a (Choice Type2 -> Item Group) -> Choice Type2 -> Item Group
forall a b. (a -> b) -> a -> b
$ Rule
gov_action_id Rule -> Value Void -> Choice Type2
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ Value Void
VNil
, GRuleCall -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a (Rule -> GRuleCall
forall a. IsType0 a => a -> GRuleCall
maybe_tagged_set Rule
committee_cold_credential)
, MapChoice -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a (MapChoice -> MapChoice
mp [Word64
0 Word64 -> MapEntry -> MapEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Rule -> Key
forall r. IsType0 r => r -> Key
asKey Rule
committee_cold_credential Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
epoch])
, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
unit_interval
]
new_constitution :: Named Group
new_constitution :: Named Group
new_constitution =
Text
"new_constitution"
Text -> Group -> Named Group
=:~ Group -> Group
grp [Item Group
ArrayEntry
5, Choice Type2 -> Item Group
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a (Choice Type2 -> Item Group) -> Choice Type2 -> Item Group
forall a b. (a -> b) -> a -> b
$ Rule
gov_action_id Rule -> Value Void -> Choice Type2
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ Value Void
VNil, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
constitution]
constitution :: Rule
constitution :: Rule
constitution =
Text
"constitution"
Text -> ArrayChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= ArrayChoice -> ArrayChoice
arr
[ Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
anchor
, Choice Type2 -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a (Rule
script_hash Rule -> Value Void -> Choice Type2
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ Value Void
VNil)
]
info_action :: Rule
info_action :: Rule
info_action = Text
"info_action" Text -> Literal -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= Integer -> Literal
int Integer
6
voter :: Rule
voter :: Rule
voter =
Text
"voter"
Text -> Array -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= (ArrayChoice -> ArrayChoice
arr [Item ArrayChoice
ArrayEntry
0, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
addr_keyhash] ArrayChoice -> Comment -> ArrayChoice
forall a. HasComment a => a -> Comment -> a
//- Comment
"constitutional committee hot key hash")
ArrayChoice -> ArrayChoice -> Array
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ (ArrayChoice -> ArrayChoice
arr [Item ArrayChoice
ArrayEntry
1, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
script_hash] ArrayChoice -> Comment -> ArrayChoice
forall a. HasComment a => a -> Comment -> a
//- Comment
"consitutional committee script hash")
Array -> ArrayChoice -> Array
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ (ArrayChoice -> ArrayChoice
arr [Item ArrayChoice
ArrayEntry
2, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
addr_keyhash] ArrayChoice -> Comment -> ArrayChoice
forall a. HasComment a => a -> Comment -> a
//- Comment
"drep keyhash")
Array -> ArrayChoice -> Array
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ (ArrayChoice -> ArrayChoice
arr [Item ArrayChoice
ArrayEntry
3, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
script_hash] ArrayChoice -> Comment -> ArrayChoice
forall a. HasComment a => a -> Comment -> a
//- Comment
"drep script hash")
Array -> ArrayChoice -> Array
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ (ArrayChoice -> ArrayChoice
arr [Item ArrayChoice
ArrayEntry
4, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
addr_keyhash] ArrayChoice -> Comment -> ArrayChoice
forall a. HasComment a => a -> Comment -> a
//- Comment
"staking pool key hash")
vote :: Rule
vote :: Rule
vote = Text
"vote" Text -> Ranged -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= (Integer
0 :: Integer) Integer -> Integer -> Ranged
forall a b. (IsRangeBound a, IsRangeBound b) => a -> b -> Ranged
... (Integer
2 :: Integer)
gov_action_id :: Rule
gov_action_id :: Rule
gov_action_id =
Text
"gov_action_id"
Text -> ArrayChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= ArrayChoice -> ArrayChoice
arr
[ Key
"transaction_id" Key -> Rule -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
transaction_id
, Key
"gov_action_index" Key -> Constrained -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> (Value Int
VUInt Value Int -> Word64 -> Constrained
forall c a s.
(IsSizeable a, IsSize s, IsConstrainable c a) =>
c -> s -> Constrained
`sized` (Word64
2 :: Word64))
]
required_signers :: Rule
required_signers :: Rule
required_signers = Text
"required_signers" Text -> GRuleCall -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= Rule -> GRuleCall
forall a. IsType0 a => a -> GRuleCall
maybe_tagged_nonempty_set Rule
addr_keyhash
transaction_input :: Rule
transaction_input :: Rule
transaction_input =
Text
"transaction_input"
Text -> ArrayChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= ArrayChoice -> ArrayChoice
arr
[ Key
"transaction_id" Key -> Rule -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
transaction_id
, Key
"index" Key -> Constrained -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> (Value Int
VUInt Value Int -> Word64 -> Constrained
forall c a s.
(IsSizeable a, IsSize s, IsConstrainable c a) =>
c -> s -> Constrained
`sized` (Word64
2 :: Word64))
]
transaction_output :: Rule
transaction_output :: Rule
transaction_output =
Text -> Rule -> Rule
forall a. HasField' "description" a (Maybe Text) => Text -> a -> a
comment
Text
[str|Both of the Alonzo and Babbage style TxOut formats are equally valid
|and can be used interchangeably
|]
(Rule -> Rule) -> Rule -> Rule
forall a b. (a -> b) -> a -> b
$ Text
"transaction_output"
Text -> Choice Type2 -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= Rule
shelley_transaction_output
Rule -> Rule -> Choice Type2
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ Rule -> Rule
babbage_transaction_output Rule
conway_script
shelley_transaction_output :: Rule
shelley_transaction_output :: Rule
shelley_transaction_output =
Text -> Rule -> Rule
forall a. HasField' "description" a (Maybe Text) => Text -> a -> a
comment
Text
[str|hash32: datum_hash
|]
(Rule -> Rule) -> Rule -> Rule
forall a b. (a -> b) -> a -> b
$ Text
"shelley_transaction_output"
Text -> ArrayChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= ArrayChoice -> ArrayChoice
arr [Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
address, Key
"amount" Key -> Rule -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
value, Item ArrayChoice -> Item ArrayChoice
forall a. CanQuantify a => a -> a
opt (Item ArrayChoice -> Item ArrayChoice)
-> Item ArrayChoice -> Item ArrayChoice
forall a b. (a -> b) -> a -> b
$ Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
hash32]
script_data_hash :: Rule
script_data_hash :: Rule
script_data_hash =
Text -> Rule -> Rule
forall a. HasField' "description" a (Maybe Text) => Text -> a -> a
comment
Text
[str|This is a hash of data which may affect evaluation of a script.
|This data consists of:
| - The redeemers from the transaction_witness_set (the value of field 5).
| - The datums from the transaction_witness_set (the value of field 4).
| - The value in the cost_models map corresponding to the script's language
| (in field 18 of protocol_param_update.)
|(In the future it may contain additional protocol parameters.)
|
|Since this data does not exist in contiguous form inside a transaction, it needs
|to be independently constructed by each recipient.
|
|The bytestring which is hashed is the concatenation of three things:
| redeemers || datums || language views
|The redeemers are exactly the data present in the transaction witness set.
|Similarly for the datums, if present. If no datums are provided, the middle
|field is omitted (i.e. it is the empty/null bytestring).
|
|language views CDDL:
|{ * language => script_integrity_data }
|
|This must be encoded canonically, using the same scheme as in
|RFC7049 section 3.9:
| - Maps, strings, and bytestrings must use a definite-length encoding
| - Integers must be as small as possible.
| - The expressions for map length, string length, and bytestring length
| must be as short as possible.
| - The keys in the map must be sorted as follows:
| - If two keys have different lengths, the shorter one sorts earlier.
| - If two keys have the same length, the one with the lower value
| in (byte-wise) lexical order sorts earlier.
|
|For PlutusV1 (language id 0), the language view is the following:
| - the value of cost_models map at key 0 (in other words, the script_integrity_data)
| is encoded as an indefinite length list and the result is encoded as a bytestring.
| (our apologies)
| For example, the script_integrity_data corresponding to the all zero costmodel for V1
| would be encoded as (in hex):
| 58a89f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ff
| - the language ID tag is also encoded twice. first as a uint then as
| a bytestring. (our apologies)
| Concretely, this means that the language version for V1 is encoded as
| 4100 in hex.
|For PlutusV2 (language id 1), the language view is the following:
| - the value of cost_models map at key 1 is encoded as an definite length list.
| For example, the script_integrity_data corresponding to the all zero costmodel for V2
| would be encoded as (in hex):
| 98af0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
| - the language ID tag is encoded as expected.
| Concretely, this means that the language version for V2 is encoded as
| 01 in hex.
|For PlutusV3 (language id 2), the language view is the following:
| - the value of cost_models map at key 2 is encoded as a definite length list.
|
|Note that each Plutus language represented inside a transaction must have
|a cost model in the cost_models protocol parameter in order to execute,
|regardless of what the script integrity data is.
|
|Finally, note that in the case that a transaction includes datums but does not
|include the redeemers field, the script data format becomes (in hex):
|[ A0 | datums | A0 ]
|corresponding to a CBOR empty map and an empty map for language view.
|This empty redeeemer case has changed from the previous eras, since default
|representation for redeemers has been changed to a map. Also whenever redeemers are
|supplied either as a map or as an array they must contain at least one element,
|therefore there is no way to override this behavior by providing a custom
|representation for empty redeemers.
|]
(Rule -> Rule) -> Rule -> Rule
forall a b. (a -> b) -> a -> b
$ Text
"script_data_hash" Text -> Rule -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= Rule
hash32
certificate :: Rule
certificate :: Rule
certificate =
Text
"certificate"
Text -> Array -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= ArrayChoice -> ArrayChoice
arr [Named Group -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
account_registration_cert]
ArrayChoice -> ArrayChoice -> Array
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Named Group -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
account_unregistration_cert]
Array -> ArrayChoice -> Array
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Named Group -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
delegation_to_stake_pool_cert]
Array -> ArrayChoice -> Array
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Named Group -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
pool_registration_cert]
Array -> ArrayChoice -> Array
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Named Group -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
pool_retirement_cert]
Array -> ArrayChoice -> Array
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Named Group -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
account_registration_deposit_cert]
Array -> ArrayChoice -> Array
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Named Group -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
account_unregistration_deposit_cert]
Array -> ArrayChoice -> Array
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Named Group -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
delegation_to_drep_cert]
Array -> ArrayChoice -> Array
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Named Group -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
delegation_to_stake_pool_and_drep_cert]
Array -> ArrayChoice -> Array
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Named Group -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
account_registration_delegation_to_stake_pool_cert]
Array -> ArrayChoice -> Array
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Named Group -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
account_registration_delegation_to_drep_cert]
Array -> ArrayChoice -> Array
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Named Group -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
account_registration_delegation_to_stake_pool_and_drep_cert]
Array -> ArrayChoice -> Array
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Named Group -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
committee_authorization_cert]
Array -> ArrayChoice -> Array
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Named Group -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
committee_resignation_cert]
Array -> ArrayChoice -> Array
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Named Group -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
drep_registration_cert]
Array -> ArrayChoice -> Array
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Named Group -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
drep_unregistration_cert]
Array -> ArrayChoice -> Array
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Named Group -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
drep_update_cert]
pool_registration_cert :: Named Group
pool_retirement_cert :: Named Group
conwayPoolRules :: [HuddleItem]
(Named Group
pool_registration_cert, Named Group
pool_retirement_cert, [HuddleItem]
conwayPoolRules) = Rule -> Rule -> (Named Group, Named Group, [HuddleItem])
mkPoolRules Rule
dns_name128 Rule
url128
account_registration_deposit_cert :: Named Group
account_registration_deposit_cert :: Named Group
account_registration_deposit_cert = Text
"account_registration_deposit_cert" Text -> Group -> Named Group
=:~ Group -> Group
grp [Item Group
ArrayEntry
7, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
stake_credential, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
coin]
account_unregistration_deposit_cert :: Named Group
account_unregistration_deposit_cert :: Named Group
account_unregistration_deposit_cert = Text
"account_unregistration_deposit_cert" Text -> Group -> Named Group
=:~ Group -> Group
grp [Item Group
ArrayEntry
8, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
stake_credential, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
coin]
delegation_to_drep_cert :: Named Group
delegation_to_drep_cert :: Named Group
delegation_to_drep_cert = Text
"delegation_to_drep_cert" Text -> Group -> Named Group
=:~ Group -> Group
grp [Item Group
ArrayEntry
9, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
stake_credential, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
drep]
delegation_to_stake_pool_and_drep_cert :: Named Group
delegation_to_stake_pool_and_drep_cert :: Named Group
delegation_to_stake_pool_and_drep_cert =
Text
"delegation_to_stake_pool_and_drep_cert" Text -> Group -> Named Group
=:~ Group -> Group
grp [Item Group
ArrayEntry
10, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
stake_credential, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
pool_keyhash, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
drep]
account_registration_delegation_to_stake_pool_cert :: Named Group
account_registration_delegation_to_stake_pool_cert :: Named Group
account_registration_delegation_to_stake_pool_cert =
Text
"account_registration_delegation_to_stake_pool_cert"
Text -> Group -> Named Group
=:~ Group -> Group
grp [Item Group
ArrayEntry
11, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
stake_credential, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
pool_keyhash, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
coin]
account_registration_delegation_to_drep_cert :: Named Group
account_registration_delegation_to_drep_cert :: Named Group
account_registration_delegation_to_drep_cert =
Text
"account_registration_delegation_to_drep_cert" Text -> Group -> Named Group
=:~ Group -> Group
grp [Item Group
ArrayEntry
12, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
stake_credential, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
drep, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
coin]
account_registration_delegation_to_stake_pool_and_drep_cert :: Named Group
account_registration_delegation_to_stake_pool_and_drep_cert :: Named Group
account_registration_delegation_to_stake_pool_and_drep_cert =
Text
"account_registration_delegation_to_stake_pool_and_drep_cert"
Text -> Group -> Named Group
=:~ Group -> Group
grp [Item Group
ArrayEntry
13, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
stake_credential, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
pool_keyhash, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
drep, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
coin]
committee_authorization_cert :: Named Group
committee_authorization_cert :: Named Group
committee_authorization_cert =
Text -> Named Group -> Named Group
forall a. HasField' "description" a (Maybe Text) => Text -> a -> a
comment Text
"Authorize committee hot key for cold key" (Named Group -> Named Group) -> Named Group -> Named Group
forall a b. (a -> b) -> a -> b
$
Text
"committee_authorization_cert"
Text -> Group -> Named Group
=:~ Group -> Group
grp [Item Group
ArrayEntry
14, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
committee_cold_credential, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
committee_hot_credential]
committee_resignation_cert :: Named Group
committee_resignation_cert :: Named Group
committee_resignation_cert =
Text -> Named Group -> Named Group
forall a. HasField' "description" a (Maybe Text) => Text -> a -> a
comment Text
"Resign from committee with cold key" (Named Group -> Named Group) -> Named Group -> Named Group
forall a b. (a -> b) -> a -> b
$
Text
"committee_resignation_cert"
Text -> Group -> Named Group
=:~ Group -> Group
grp [Item Group
ArrayEntry
15, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
committee_cold_credential, Choice Type2 -> Item Group
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a (Choice Type2 -> Item Group) -> Choice Type2 -> Item Group
forall a b. (a -> b) -> a -> b
$ Rule
anchor Rule -> Value Void -> Choice Type2
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ Value Void
VNil]
drep_registration_cert :: Named Group
drep_registration_cert :: Named Group
drep_registration_cert = Text
"drep_registration_cert" Text -> Group -> Named Group
=:~ Group -> Group
grp [Item Group
ArrayEntry
16, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
drep_credential, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
coin, Choice Type2 -> Item Group
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a (Choice Type2 -> Item Group) -> Choice Type2 -> Item Group
forall a b. (a -> b) -> a -> b
$ Rule
anchor Rule -> Value Void -> Choice Type2
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ Value Void
VNil]
drep_unregistration_cert :: Named Group
drep_unregistration_cert :: Named Group
drep_unregistration_cert = Text
"drep_unregistration_cert" Text -> Group -> Named Group
=:~ Group -> Group
grp [Item Group
ArrayEntry
17, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
drep_credential, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
coin]
drep_update_cert :: Named Group
drep_update_cert :: Named Group
drep_update_cert = Text
"drep_update_cert" Text -> Group -> Named Group
=:~ Group -> Group
grp [Item Group
ArrayEntry
18, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
drep_credential, Choice Type2 -> Item Group
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a (Choice Type2 -> Item Group) -> Choice Type2 -> Item Group
forall a b. (a -> b) -> a -> b
$ Rule
anchor Rule -> Value Void -> Choice Type2
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ Value Void
VNil]
withdrawals :: Rule
withdrawals :: Rule
withdrawals = Text
"withdrawals" Text -> MapChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= MapChoice -> MapChoice
mp [Word64
1 Word64 -> MapEntry -> MapEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Rule -> Key
forall r. IsType0 r => r -> Key
asKey Rule
reward_account Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
coin]
protocol_param_update :: Rule
protocol_param_update :: Rule
protocol_param_update =
Text
"protocol_param_update"
Text -> MapChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= MapChoice -> MapChoice
mp
[ MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
0 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
coin) MapEntry -> Comment -> MapEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"minfeeA"
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
1 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
coin) MapEntry -> Comment -> MapEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"minfeeB"
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
2 Key -> Constrained -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> (Value Int
VUInt Value Int -> Word64 -> Constrained
forall c a s.
(IsSizeable a, IsSize s, IsConstrainable c a) =>
c -> s -> Constrained
`sized` (Word64
4 :: Word64))) MapEntry -> Comment -> MapEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"max block body size"
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
3 Key -> Constrained -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> (Value Int
VUInt Value Int -> Word64 -> Constrained
forall c a s.
(IsSizeable a, IsSize s, IsConstrainable c a) =>
c -> s -> Constrained
`sized` (Word64
4 :: Word64))) MapEntry -> Comment -> MapEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"max transaction size"
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
4 Key -> Constrained -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> (Value Int
VUInt Value Int -> Word64 -> Constrained
forall c a s.
(IsSizeable a, IsSize s, IsConstrainable c a) =>
c -> s -> Constrained
`sized` (Word64
2 :: Word64))) MapEntry -> Comment -> MapEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"max block header size"
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
5 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
coin) MapEntry -> Comment -> MapEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"key deposit"
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
6 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
coin) MapEntry -> Comment -> MapEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"pool deposit"
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
7 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
epoch_interval) MapEntry -> Comment -> MapEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"maximum epoch"
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
8 Key -> Constrained -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> (Value Int
VUInt Value Int -> Word64 -> Constrained
forall c a s.
(IsSizeable a, IsSize s, IsConstrainable c a) =>
c -> s -> Constrained
`sized` (Word64
2 :: Word64))) MapEntry -> Comment -> MapEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"n_opt: desired number of stake pools"
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
9 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
nonnegative_interval) MapEntry -> Comment -> MapEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"pool pledge influence"
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
10 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
unit_interval) MapEntry -> Comment -> MapEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"expansion rate"
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
11 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
unit_interval) MapEntry -> Comment -> MapEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"treasury growth rate"
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
16 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
coin) MapEntry -> Comment -> MapEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"min pool cost"
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
17 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
coin) MapEntry -> Comment -> MapEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"ada per utxo byte"
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
18 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
cost_models) MapEntry -> Comment -> MapEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"cost models for script languages"
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
19 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
ex_unit_prices) MapEntry -> Comment -> MapEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"execution costs"
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
20 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
ex_units) MapEntry -> Comment -> MapEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"max tx ex units"
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
21 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
ex_units) MapEntry -> Comment -> MapEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"max block ex units"
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
22 Key -> Constrained -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> (Value Int
VUInt Value Int -> Word64 -> Constrained
forall c a s.
(IsSizeable a, IsSize s, IsConstrainable c a) =>
c -> s -> Constrained
`sized` (Word64
4 :: Word64))) MapEntry -> Comment -> MapEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"max value size"
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
23 Key -> Constrained -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> (Value Int
VUInt Value Int -> Word64 -> Constrained
forall c a s.
(IsSizeable a, IsSize s, IsConstrainable c a) =>
c -> s -> Constrained
`sized` (Word64
2 :: Word64))) MapEntry -> Comment -> MapEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"collateral percentage"
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
24 Key -> Constrained -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> (Value Int
VUInt Value Int -> Word64 -> Constrained
forall c a s.
(IsSizeable a, IsSize s, IsConstrainable c a) =>
c -> s -> Constrained
`sized` (Word64
2 :: Word64))) MapEntry -> Comment -> MapEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"max collateral inputs"
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
25 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
pool_voting_thresholds) MapEntry -> Comment -> MapEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"pool voting thresholds"
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
26 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
drep_voting_thresholds) MapEntry -> Comment -> MapEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"drep voting thresholds"
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
27 Key -> Constrained -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> (Value Int
VUInt Value Int -> Word64 -> Constrained
forall c a s.
(IsSizeable a, IsSize s, IsConstrainable c a) =>
c -> s -> Constrained
`sized` (Word64
2 :: Word64))) MapEntry -> Comment -> MapEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"min committee size"
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
28 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
epoch_interval) MapEntry -> Comment -> MapEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"committee term limit"
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
29 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
epoch_interval) MapEntry -> Comment -> MapEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"goveranance action validity period"
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
30 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
coin) MapEntry -> Comment -> MapEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"governance action deposit"
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
31 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
coin) MapEntry -> Comment -> MapEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"drep deposit"
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
32 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
epoch_interval) MapEntry -> Comment -> MapEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"drep inactivity period"
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
33 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
nonnegative_interval) MapEntry -> Comment -> MapEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"minfee refscriptcoinsperbyte"
]
pool_voting_thresholds :: Rule
pool_voting_thresholds :: Rule
pool_voting_thresholds =
Text
"pool_voting_thresholds"
Text -> ArrayChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= ArrayChoice -> ArrayChoice
arr
[ Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
unit_interval ArrayEntry -> Comment -> ArrayEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"motion no confidence"
, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
unit_interval ArrayEntry -> Comment -> ArrayEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"committee normal"
, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
unit_interval ArrayEntry -> Comment -> ArrayEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"committee no confidence"
, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
unit_interval ArrayEntry -> Comment -> ArrayEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"hard fork initiation"
, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
unit_interval ArrayEntry -> Comment -> ArrayEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"security relevant parameter voting threshold"
]
drep_voting_thresholds :: Rule
drep_voting_thresholds :: Rule
drep_voting_thresholds =
Text
"drep_voting_thresholds"
Text -> ArrayChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= ArrayChoice -> ArrayChoice
arr
[ Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
unit_interval ArrayEntry -> Comment -> ArrayEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"motion no confidence"
, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
unit_interval ArrayEntry -> Comment -> ArrayEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"committee normal"
, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
unit_interval ArrayEntry -> Comment -> ArrayEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"committee no confidence"
, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
unit_interval ArrayEntry -> Comment -> ArrayEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"update constitution"
, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
unit_interval ArrayEntry -> Comment -> ArrayEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"hard fork initiation"
, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
unit_interval ArrayEntry -> Comment -> ArrayEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"PP network group"
, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
unit_interval ArrayEntry -> Comment -> ArrayEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"PP economic group"
, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
unit_interval ArrayEntry -> Comment -> ArrayEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"PP technical group"
, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
unit_interval ArrayEntry -> Comment -> ArrayEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"PP governance group"
, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
unit_interval ArrayEntry -> Comment -> ArrayEntry
forall a. HasComment a => a -> Comment -> a
//- Comment
"treasury withdrawal"
]
transaction_witness_set :: Rule
transaction_witness_set :: Rule
transaction_witness_set =
Text
"transaction_witness_set"
Text -> MapChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= MapChoice -> MapChoice
mp
[ Item MapChoice -> Item MapChoice
forall a. CanQuantify a => a -> a
opt (Item MapChoice -> Item MapChoice)
-> Item MapChoice -> Item MapChoice
forall a b. (a -> b) -> a -> b
$ Word64 -> Key
idx Word64
0 Key -> GRuleCall -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule -> GRuleCall
forall a. IsType0 a => a -> GRuleCall
maybe_tagged_nonempty_set Rule
vkeywitness
, Item MapChoice -> Item MapChoice
forall a. CanQuantify a => a -> a
opt (Item MapChoice -> Item MapChoice)
-> Item MapChoice -> Item MapChoice
forall a b. (a -> b) -> a -> b
$ Word64 -> Key
idx Word64
1 Key -> GRuleCall -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule -> GRuleCall
forall a. IsType0 a => a -> GRuleCall
maybe_tagged_nonempty_set Rule
allegra_native_script
, Item MapChoice -> Item MapChoice
forall a. CanQuantify a => a -> a
opt (Item MapChoice -> Item MapChoice)
-> Item MapChoice -> Item MapChoice
forall a b. (a -> b) -> a -> b
$ Word64 -> Key
idx Word64
2 Key -> GRuleCall -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule -> GRuleCall
forall a. IsType0 a => a -> GRuleCall
maybe_tagged_nonempty_set Rule
bootstrap_witness
, Item MapChoice -> Item MapChoice
forall a. CanQuantify a => a -> a
opt (Item MapChoice -> Item MapChoice)
-> Item MapChoice -> Item MapChoice
forall a b. (a -> b) -> a -> b
$ Word64 -> Key
idx Word64
3 Key -> GRuleCall -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule -> GRuleCall
forall a. IsType0 a => a -> GRuleCall
maybe_tagged_nonempty_set Rule
plutus_v1_script
, Item MapChoice -> Item MapChoice
forall a. CanQuantify a => a -> a
opt (Item MapChoice -> Item MapChoice)
-> Item MapChoice -> Item MapChoice
forall a b. (a -> b) -> a -> b
$ Word64 -> Key
idx Word64
4 Key -> GRuleCall -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule -> GRuleCall
forall a. IsType0 a => a -> GRuleCall
maybe_tagged_nonempty_set Rule
plutus_data
, Item MapChoice -> Item MapChoice
forall a. CanQuantify a => a -> a
opt (Item MapChoice -> Item MapChoice)
-> Item MapChoice -> Item MapChoice
forall a b. (a -> b) -> a -> b
$ Word64 -> Key
idx Word64
5 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule -> Rule
redeemers Rule
conway_redeemer_tag
, Item MapChoice -> Item MapChoice
forall a. CanQuantify a => a -> a
opt (Item MapChoice -> Item MapChoice)
-> Item MapChoice -> Item MapChoice
forall a b. (a -> b) -> a -> b
$ Word64 -> Key
idx Word64
6 Key -> GRuleCall -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule -> GRuleCall
forall a. IsType0 a => a -> GRuleCall
maybe_tagged_nonempty_set Rule
plutus_v2_script
, Item MapChoice -> Item MapChoice
forall a. CanQuantify a => a -> a
opt (Item MapChoice -> Item MapChoice)
-> Item MapChoice -> Item MapChoice
forall a b. (a -> b) -> a -> b
$ Word64 -> Key
idx Word64
7 Key -> GRuleCall -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule -> GRuleCall
forall a. IsType0 a => a -> GRuleCall
maybe_tagged_nonempty_set Rule
plutus_v3_script
]
plutus_v3_script :: Rule
plutus_v3_script :: Rule
plutus_v3_script =
Text -> Rule -> Rule
forall a. HasField' "description" a (Maybe Text) => Text -> a -> a
comment
Text
[str|Conway introduces Plutus V3 with support for new governance features.
|
|Note: distinct VBytes ensures uniqueness in test generation.
|The cddl tool we use for roundtrip testing doesn't generate
|distinct collections, so we use sized variants to ensure uniqueness.
|]
(Rule -> Rule) -> Rule -> Rule
forall a b. (a -> b) -> a -> b
$ Text
"plutus_v3_script" Text -> Rule -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= Value ByteString -> Rule
forall s. IsSizeable s => Value s -> Rule
distinct Value ByteString
VBytes
redeemers :: Rule -> Rule
redeemers :: Rule -> Rule
redeemers Rule
redeemer_tag =
Text -> Rule -> Rule
forall a. HasField' "description" a (Maybe Text) => Text -> a -> a
comment
Text
[str|Flat Array support is included for backwards compatibility and
|will be removed in the next era. It is recommended for tools to
|adopt using a Map instead of Array going forward.
|]
(Rule -> Rule) -> Rule -> Rule
forall a b. (a -> b) -> a -> b
$ Text
"redeemers"
Text -> Choice Type2 -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= ArrayChoice -> Seal Array
sarr
[ Word64
1
Word64 -> ArrayEntry -> ArrayEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ ArrayChoice -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a
( ArrayChoice -> ArrayChoice
arr
[ Key
"tag" Key -> Rule -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
redeemer_tag
, Key
"index" Key -> Constrained -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> (Value Int
VUInt Value Int -> Word64 -> Constrained
forall c a s.
(IsSizeable a, IsSize s, IsConstrainable c a) =>
c -> s -> Constrained
`sized` (Word64
4 :: Word64))
, Key
"data" Key -> Rule -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
plutus_data
, Key
"ex_units" Key -> Rule -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
ex_units
]
)
]
Seal Array -> Seal Map -> Choice Type2
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ MapChoice -> Seal Map
smp
[ Word64
1
Word64 -> MapEntry -> MapEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ ArrayChoice -> Key
forall r. IsType0 r => r -> Key
asKey
( ArrayChoice -> ArrayChoice
arr
[ Key
"tag" Key -> Rule -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
redeemer_tag
, Key
"index" Key -> Constrained -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> (Value Int
VUInt Value Int -> Word64 -> Constrained
forall c a s.
(IsSizeable a, IsSize s, IsConstrainable c a) =>
c -> s -> Constrained
`sized` (Word64
4 :: Word64))
]
)
Key -> ArrayChoice -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> ArrayChoice -> ArrayChoice
arr [Key
"data" Key -> Rule -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
plutus_data, Key
"ex_units" Key -> Rule -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
ex_units]
]
conway_redeemer_tag :: Rule
conway_redeemer_tag :: Rule
conway_redeemer_tag =
Text
"redeemer_tag"
Text -> Choice Type2 -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= (Integer -> Literal
int Integer
0 Literal -> Comment -> Literal
forall a. HasComment a => a -> Comment -> a
//- Comment
"spend")
Literal -> Literal -> Choice Type2
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ (Integer -> Literal
int Integer
1 Literal -> Comment -> Literal
forall a. HasComment a => a -> Comment -> a
//- Comment
"mint")
Choice Type2 -> Literal -> Choice Type2
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ (Integer -> Literal
int Integer
2 Literal -> Comment -> Literal
forall a. HasComment a => a -> Comment -> a
//- Comment
"cert")
Choice Type2 -> Literal -> Choice Type2
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ (Integer -> Literal
int Integer
3 Literal -> Comment -> Literal
forall a. HasComment a => a -> Comment -> a
//- Comment
"reward")
Choice Type2 -> Literal -> Choice Type2
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ (Integer -> Literal
int Integer
4 Literal -> Comment -> Literal
forall a. HasComment a => a -> Comment -> a
//- Comment
"voting")
Choice Type2 -> Literal -> Choice Type2
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ (Integer -> Literal
int Integer
5 Literal -> Comment -> Literal
forall a. HasComment a => a -> Comment -> a
//- Comment
"proposing")
ex_unit_prices :: Rule
ex_unit_prices :: Rule
ex_unit_prices =
Text
"ex_unit_prices"
Text -> ArrayChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= ArrayChoice -> ArrayChoice
arr
[ Key
"mem_price" Key -> Rule -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
nonnegative_interval
, Key
"step_price" Key -> Rule -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
nonnegative_interval
]
language :: Rule
language :: Rule
language =
Text
"language"
Text -> Choice Type2 -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= Integer -> Literal
int Integer
0
Literal -> Literal -> Choice Type2
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ Integer -> Literal
int Integer
1
Choice Type2 -> Literal -> Choice Type2
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ Integer -> Literal
int Integer
2
potential_languages :: Rule
potential_languages :: Rule
potential_languages = Text
"potential_languages" Text -> Ranged -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= (Integer
0 :: Integer) Integer -> Integer -> Ranged
forall a b. (IsRangeBound a, IsRangeBound b) => a -> b -> Ranged
... (Integer
255 :: Integer)
cost_models :: Rule
cost_models :: Rule
cost_models =
Text -> Rule -> Rule
forall a. HasField' "description" a (Maybe Text) => Text -> a -> a
comment
Text
[str|The format for cost_models is flexible enough to allow adding
|Plutus built-ins and language versions in the future.
|
|Plutus v1: only 166 integers are used, but more are accepted (and ignored)
|Plutus v2: only 175 integers are used, but more are accepted (and ignored)
|Plutus v3: only 223 integers are used, but more are accepted (and ignored)
|
|Any 8-bit unsigned number can be used as a key.
|]
(Rule -> Rule) -> Rule -> Rule
forall a b. (a -> b) -> a -> b
$ Text
"cost_models"
Text -> MapChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= MapChoice -> MapChoice
mp
[ Item MapChoice -> Item MapChoice
forall a. CanQuantify a => a -> a
opt (Item MapChoice -> Item MapChoice)
-> Item MapChoice -> Item MapChoice
forall a b. (a -> b) -> a -> b
$ Word64 -> Key
idx Word64
0 Key -> ArrayChoice -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> ArrayChoice -> ArrayChoice
arr [Word64
0 Word64 -> ArrayEntry -> ArrayEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
int64]
, Item MapChoice -> Item MapChoice
forall a. CanQuantify a => a -> a
opt (Item MapChoice -> Item MapChoice)
-> Item MapChoice -> Item MapChoice
forall a b. (a -> b) -> a -> b
$ Word64 -> Key
idx Word64
1 Key -> ArrayChoice -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> ArrayChoice -> ArrayChoice
arr [Word64
0 Word64 -> ArrayEntry -> ArrayEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
int64]
, Item MapChoice -> Item MapChoice
forall a. CanQuantify a => a -> a
opt (Item MapChoice -> Item MapChoice)
-> Item MapChoice -> Item MapChoice
forall a b. (a -> b) -> a -> b
$ Word64 -> Key
idx Word64
2 Key -> ArrayChoice -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> ArrayChoice -> ArrayChoice
arr [Word64
0 Word64 -> ArrayEntry -> ArrayEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
int64]
, Word64
0 Word64 -> MapEntry -> MapEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Ranged -> Key
forall r. IsType0 r => r -> Key
asKey ((Integer
3 :: Integer) Integer -> Integer -> Ranged
forall a b. (IsRangeBound a, IsRangeBound b) => a -> b -> Ranged
... (Integer
255 :: Integer)) Key -> ArrayChoice -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> ArrayChoice -> ArrayChoice
arr [Word64
0 Word64 -> ArrayEntry -> ArrayEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
int64]
]
auxiliary_data_map :: Rule
auxiliary_data_map :: Rule
auxiliary_data_map =
Text
"auxiliary_data_map"
Text -> Tagged MapChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= Word64 -> MapChoice -> Tagged MapChoice
forall a. Word64 -> a -> Tagged a
tag
Word64
259
( MapChoice -> MapChoice
mp
[ MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
0 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
metadata)
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
1 Key -> ArrayChoice -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> ArrayChoice -> ArrayChoice
arr [Word64
0 Word64 -> ArrayEntry -> ArrayEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
allegra_native_script])
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
2 Key -> ArrayChoice -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> ArrayChoice -> ArrayChoice
arr [Word64
0 Word64 -> ArrayEntry -> ArrayEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
plutus_v1_script])
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
3 Key -> ArrayChoice -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> ArrayChoice -> ArrayChoice
arr [Word64
0 Word64 -> ArrayEntry -> ArrayEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
plutus_v2_script])
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
4 Key -> ArrayChoice -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> ArrayChoice -> ArrayChoice
arr [Word64
0 Word64 -> ArrayEntry -> ArrayEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
plutus_v3_script])
]
)
auxiliary_data :: Rule
auxiliary_data :: Rule
auxiliary_data =
Text -> Rule -> Rule
forall a. HasField' "description" a (Maybe Text) => Text -> a -> a
comment
Text
[str|auxiliary_data supports three serialization formats:
| 1. metadata (raw) - Supported since Shelley
| 2. auxiliary_data_array - Array format, introduced in Allegra
| 3. auxiliary_data_map - Tagged map format, introduced in Alonzo
| Conway adds plutus_v3_script support at index 4
|]
(Rule -> Rule) -> Rule -> Rule
forall a b. (a -> b) -> a -> b
$ Text
"auxiliary_data"
Text -> Choice Type2 -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= Rule
metadata
Rule -> Rule -> Choice Type2
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ Rule
auxiliary_data_array
Choice Type2 -> Rule -> Choice Type2
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ Rule
auxiliary_data_map
multiasset :: IsType0 a => a -> GRuleCall
multiasset :: forall a. IsType0 a => a -> GRuleCall
multiasset = (GRef -> Rule) -> a -> GRuleCall
forall t0. IsType0 t0 => (GRef -> Rule) -> t0 -> GRuleCall
binding ((GRef -> Rule) -> a -> GRuleCall)
-> (GRef -> Rule) -> a -> GRuleCall
forall a b. (a -> b) -> a -> b
$ \GRef
x ->
Text
"multiasset"
Text -> MapChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= MapChoice -> MapChoice
mp [Word64
0 Word64 -> MapEntry -> MapEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Rule -> Key
forall r. IsType0 r => r -> Key
asKey Rule
policy_id Key -> MapChoice -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> MapChoice -> MapChoice
mp [Word64
1 Word64 -> MapEntry -> MapEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Rule -> Key
forall r. IsType0 r => r -> Key
asKey Rule
asset_name Key -> GRef -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> GRef
x]]
value :: Rule
value :: Rule
value = Text
"value" Text -> Choice Type2 -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= Rule
coin Rule -> Seal Array -> Choice Type2
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> Seal Array
sarr [Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
coin, GRuleCall -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a (Rule -> GRuleCall
forall a. IsType0 a => a -> GRuleCall
multiasset Rule
positive_coin)]
mint :: Rule
mint :: Rule
mint = Text
"mint" Text -> MapChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= MapChoice -> MapChoice
mp [Word64
1 Word64 -> MapEntry -> MapEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Rule -> Key
forall r. IsType0 r => r -> Key
asKey Rule
policy_id Key -> MapChoice -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> MapChoice -> MapChoice
mp [Word64
1 Word64 -> MapEntry -> MapEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Rule -> Key
forall r. IsType0 r => r -> Key
asKey Rule
asset_name Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
nonzero_int64]]
conway_script :: Rule
conway_script :: Rule
conway_script =
Text -> Rule -> Rule
forall a. HasField' "description" a (Maybe Text) => Text -> a -> a
comment
Text
[str|Conway supports four script types:
| 0: Native scripts (timelock) - unchanged from Allegra
| 1: Plutus V1 scripts
| 2: Plutus V2 scripts
| 3: Plutus V3 scripts (NEW)
|]
(Rule -> Rule) -> Rule -> Rule
forall a b. (a -> b) -> a -> b
$ Text
"script"
Text -> Array -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= ArrayChoice -> ArrayChoice
arr [Item ArrayChoice
ArrayEntry
0, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
allegra_native_script]
ArrayChoice -> ArrayChoice -> Array
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Item ArrayChoice
ArrayEntry
1, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
plutus_v1_script]
Array -> ArrayChoice -> Array
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Item ArrayChoice
ArrayEntry
2, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
plutus_v2_script]
Array -> ArrayChoice -> Array
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Item ArrayChoice
ArrayEntry
3, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
plutus_v3_script]
mkMaybeTaggedSet :: IsType0 a => T.Text -> Word64 -> a -> GRuleCall
mkMaybeTaggedSet :: forall a. IsType0 a => Text -> Word64 -> a -> GRuleCall
mkMaybeTaggedSet Text
label Word64
n = (GRef -> Rule) -> a -> GRuleCall
forall t0. IsType0 t0 => (GRef -> Rule) -> t0 -> GRuleCall
binding ((GRef -> Rule) -> a -> GRuleCall)
-> (GRef -> Rule) -> a -> GRuleCall
forall a b. (a -> b) -> a -> b
$ \GRef
x -> Text
label Text -> Choice Type2 -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= Word64 -> ArrayChoice -> Tagged ArrayChoice
forall a. Word64 -> a -> Tagged a
tag Word64
258 (ArrayChoice -> ArrayChoice
arr [Word64
n Word64 -> ArrayEntry -> ArrayEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ GRef -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a GRef
x]) Tagged ArrayChoice -> Seal Array -> Choice Type2
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> Seal Array
sarr [Word64
n Word64 -> ArrayEntry -> ArrayEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ GRef -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a GRef
x]
maybe_tagged_set :: IsType0 a => a -> GRuleCall
maybe_tagged_set :: forall a. IsType0 a => a -> GRuleCall
maybe_tagged_set = Text -> Word64 -> a -> GRuleCall
forall a. IsType0 a => Text -> Word64 -> a -> GRuleCall
mkMaybeTaggedSet Text
"set" Word64
0
maybe_tagged_nonempty_set :: IsType0 a => a -> GRuleCall
maybe_tagged_nonempty_set :: forall a. IsType0 a => a -> GRuleCall
maybe_tagged_nonempty_set = Text -> Word64 -> a -> GRuleCall
forall a. IsType0 a => Text -> Word64 -> a -> GRuleCall
mkMaybeTaggedSet Text
"nonempty_set" Word64
1
maybe_tagged_oset :: IsType0 a => a -> GRuleCall
maybe_tagged_oset :: forall a. IsType0 a => a -> GRuleCall
maybe_tagged_oset = Text -> Word64 -> a -> GRuleCall
forall a. IsType0 a => Text -> Word64 -> a -> GRuleCall
mkMaybeTaggedSet Text
"oset" Word64
0
maybe_tagged_nonempty_oset :: IsType0 a => a -> GRuleCall
maybe_tagged_nonempty_oset :: forall a. IsType0 a => a -> GRuleCall
maybe_tagged_nonempty_oset = Text -> Word64 -> a -> GRuleCall
forall a. IsType0 a => Text -> Word64 -> a -> GRuleCall
mkMaybeTaggedSet Text
"nonempty_oset" Word64
1