Safe Haskell | None |
---|---|
Language | Haskell2010 |
A buggy implementation of Unsafe ledger, returns balances multiplied by 2
Synopsis
- data UnsafeLedgerV1 :: VersionKind
- type Interface = ["transfer" ?: TransferParams, "getTotalSupply" ?: Void_ () Natural, "getBalance" ?: Void_ Address (Maybe Natural)]
- migrate :: '[UStore_] :-> '[UStore_]
- unsafeLedgerContract :: UContractRouter UnsafeLedgerV1
- data UStoreTemplate
- type UStoreV1 = UStore UStoreTemplate
- type TransferParams = (Address, Natural)
- transfer :: '[TransferParams, UStoreV1] :-> '[([Operation], UStoreV1)]
- getTotalSupply :: '[Void_ () Natural, UStoreV1] :-> '[([Operation], UStoreV1)]
Documentation
data UnsafeLedgerV1 :: VersionKind Source #
Instances
KnownContractVersion UnsafeLedgerV1 Source # | |
Defined in Lorentz.Contracts.UpgradeableUnsafeLedger.V1 type VerInterface UnsafeLedgerV1 :: [EntrypointKind] Source # | |
type VerInterface UnsafeLedgerV1 Source # | |
Defined in Lorentz.Contracts.UpgradeableUnsafeLedger.V1 | |
type VerUStoreTemplate UnsafeLedgerV1 Source # | |
type VerPermanent UnsafeLedgerV1 Source # | |
Defined in Lorentz.Contracts.UpgradeableUnsafeLedger.V1 |
type Interface = ["transfer" ?: TransferParams, "getTotalSupply" ?: Void_ () Natural, "getBalance" ?: Void_ Address (Maybe Natural)] Source #
migrate :: '[UStore_] :-> '[UStore_] Source #
Like in UpgradeableCounter, this function populates the empty UStore_ with entries and initial values for each field. The result is expected to adhere to V1.UStoreTemplate
data UStoreTemplate Source #
Instances
Eq UStoreTemplate Source # | |
Defined in Lorentz.Contracts.UpgradeableUnsafeLedger.V1 (==) :: UStoreTemplate -> UStoreTemplate -> Bool # (/=) :: UStoreTemplate -> UStoreTemplate -> Bool # | |
Generic UStoreTemplate Source # | |
Defined in Lorentz.Contracts.UpgradeableUnsafeLedger.V1 type Rep UStoreTemplate :: Type -> Type # from :: UStoreTemplate -> Rep UStoreTemplate x # to :: Rep UStoreTemplate x -> UStoreTemplate # | |
type Rep UStoreTemplate Source # | |
Defined in Lorentz.Contracts.UpgradeableUnsafeLedger.V1 type Rep UStoreTemplate = D1 ('MetaData "UStoreTemplate" "Lorentz.Contracts.UpgradeableUnsafeLedger.V1" "morley-upgradeable-0.3-inplace" 'False) (C1 ('MetaCons "UStoreTemplate" 'PrefixI 'True) (S1 ('MetaSel ('Just "ledger") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Address |~> Natural)) :*: S1 ('MetaSel ('Just "totalSupply") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (UStoreField Natural)))) |
type UStoreV1 = UStore UStoreTemplate Source #
type TransferParams = (Address, Natural) Source #