morley-upgradeable-0.3: Upgradeability infrastructure based on Morley.
Safe HaskellNone
LanguageHaskell2010

Lorentz.Contracts.UserUpgradeable.V1

Description

The first version of a minimal user-upgradeable ledger. It does not offer common ledger functions like TransferGetTotalSupplyetc. to demonstrate a concept and keep the code consise.

Note that the naming in this module is different from Lorentz.Contracts.Upgradeable: by "migration" here we mean the process of transferring the value from an old contract to the new one rather than applying a transformation to storage. Thus, MigrationScript here is a lambda that forges an operation to migrate user's funds rather than a function that upgrades storage in-place.

Documentation

data Parameter Source #

Constructors

InitiateMigration MigrationTarget

Token admin calls this entrypoint and provides a lambda to forge V2.MigrateFrom operation.

MigrateMyTokens Natural

Users are supposed to call this entrypoint if they want to upgrade their tokens.

GetBalance (View Address Natural)

Returns the balance of a holder.

Instances

Instances details
Generic Parameter Source # 
Instance details

Defined in Lorentz.Contracts.UserUpgradeable.V1

Associated Types

type Rep Parameter :: Type -> Type #

ParameterHasEntrypoints Parameter Source # 
Instance details

Defined in Lorentz.Contracts.UserUpgradeable.V1

IsoValue Parameter Source # 
Instance details

Defined in Lorentz.Contracts.UserUpgradeable.V1

Associated Types

type ToT Parameter :: T #

type Rep Parameter Source # 
Instance details

Defined in Lorentz.Contracts.UserUpgradeable.V1

type Rep Parameter = D1 ('MetaData "Parameter" "Lorentz.Contracts.UserUpgradeable.V1" "morley-upgradeable-0.3-inplace" 'False) (C1 ('MetaCons "InitiateMigration" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 MigrationTarget)) :+: (C1 ('MetaCons "MigrateMyTokens" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Natural)) :+: C1 ('MetaCons "GetBalance" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (View Address Natural)))))
type ParameterEntrypointsDerivation Parameter Source # 
Instance details

Defined in Lorentz.Contracts.UserUpgradeable.V1

type ToT Parameter Source # 
Instance details

Defined in Lorentz.Contracts.UserUpgradeable.V1

data Storage Source #

Instances

Instances details
Generic Storage Source # 
Instance details

Defined in Lorentz.Contracts.UserUpgradeable.V1

Associated Types

type Rep Storage :: Type -> Type #

Methods

from :: Storage -> Rep Storage x #

to :: Rep Storage x -> Storage #

HasAnnotation Storage Source # 
Instance details

Defined in Lorentz.Contracts.UserUpgradeable.V1

IsoValue Storage Source # 
Instance details

Defined in Lorentz.Contracts.UserUpgradeable.V1

Associated Types

type ToT Storage :: T #

type Rep Storage Source # 
Instance details

Defined in Lorentz.Contracts.UserUpgradeable.V1

type Rep Storage = D1 ('MetaData "Storage" "Lorentz.Contracts.UserUpgradeable.V1" "morley-upgradeable-0.3-inplace" 'False) (C1 ('MetaCons "Storage" 'PrefixI 'True) (S1 ('MetaSel ('Just "ledger") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (BigMap Address Natural)) :*: (S1 ('MetaSel ('Just "admin") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Address) :*: S1 ('MetaSel ('Just "migrationTarget") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe MigrationTarget)))))
type ToT Storage Source # 
Instance details

Defined in Lorentz.Contracts.UserUpgradeable.V1

Orphan instances