{-# OPTIONS_GHC -Wno-deprecations #-}
module Lorentz.Contracts.UpgradeableCounterSdu
( CounterSduV
, Parameter(..)
, Storage
, Permanent (..)
, upgradeableCounterContractSdu
, mkEmptyStorage
) where
import Lorentz
import Lorentz.Contracts.Upgradeable.Common
data CounterSduV (v :: Nat) :: VersionKind
data Permanent
= GetCounter (Void_ () Integer)
| GetNothing Empty
deriving stock (forall x. Permanent -> Rep Permanent x)
-> (forall x. Rep Permanent x -> Permanent) -> Generic Permanent
forall x. Rep Permanent x -> Permanent
forall x. Permanent -> Rep Permanent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Permanent x -> Permanent
$cfrom :: forall x. Permanent -> Rep Permanent x
Generic
deriving anyclass (WellTypedToT Permanent
WellTypedToT Permanent
-> (Permanent -> Value (ToT Permanent))
-> (Value (ToT Permanent) -> Permanent)
-> IsoValue Permanent
Value (ToT Permanent) -> Permanent
Permanent -> Value (ToT Permanent)
forall a.
WellTypedToT a
-> (a -> Value (ToT a)) -> (Value (ToT a) -> a) -> IsoValue a
fromVal :: Value (ToT Permanent) -> Permanent
$cfromVal :: Value (ToT Permanent) -> Permanent
toVal :: Permanent -> Value (ToT Permanent)
$ctoVal :: Permanent -> Value (ToT Permanent)
$cp1IsoValue :: WellTypedToT Permanent
IsoValue, AnnOptions
FollowEntrypointFlag -> Notes (ToT Permanent)
(FollowEntrypointFlag -> Notes (ToT Permanent))
-> AnnOptions -> HasAnnotation Permanent
forall a.
(FollowEntrypointFlag -> Notes (ToT a))
-> AnnOptions -> HasAnnotation a
annOptions :: AnnOptions
$cannOptions :: AnnOptions
getAnnotation :: FollowEntrypointFlag -> Notes (ToT Permanent)
$cgetAnnotation :: FollowEntrypointFlag -> Notes (ToT Permanent)
HasAnnotation)
instance ParameterHasEntrypoints Permanent where
type ParameterEntrypointsDerivation Permanent = EpdPlain
instance TypeHasDoc Permanent where
typeDocMdDescription :: Markdown
typeDocMdDescription = Markdown
"Parameter for permanent entrypoints."
deriving via (EmptyContractVersion Permanent)
instance KnownContractVersion (CounterSduV 0)
upgradeableCounterContractSdu :: UpgradeableContract (CounterSduV 0)
upgradeableCounterContractSdu :: UpgradeableContract (CounterSduV 0)
upgradeableCounterContractSdu = UpgradeableContract (CounterSduV 0)
forall (ver :: VersionKind).
(NiceVersion ver, NiceParameterFull (Parameter ver)) =>
UpgradeableContract ver
upgradeableContract