| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Lorentz.Contracts.UserUpgradeable.V2
Contents
Description
The second version of a minimal user-upgradeable ledger. This version is not designed to be upgraded further — it lacks InitiateMigration and MigrateMyTokens entrypoints. However, it has MigrateFrom (callable from V1), and mints new tokens when a user calls V1.MigrateMyTokens. Other functions (either upgradeability-related or standard Transfer/GetTotalSupply may be added if deemed desirable).
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
Constructors
| MigrateFrom (Address, Natural) | When called by V1, mints new tokens to Address |
| GetBalance (View Address Natural) | Returns the balance of a holder. |
Instances
| Generic Parameter Source # | |
| ParameterHasEntrypoints Parameter Source # | |
Defined in Lorentz.Contracts.UserUpgradeable.V2 Associated Types | |
| IsoValue Parameter Source # | |
| type Rep Parameter Source # | |
Defined in Lorentz.Contracts.UserUpgradeable.V2 type Rep Parameter = D1 ('MetaData "Parameter" "Lorentz.Contracts.UserUpgradeable.V2" "morley-upgradeable-0.3-inplace" 'False) (C1 ('MetaCons "MigrateFrom" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Address, Natural))) :+: C1 ('MetaCons "GetBalance" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (View Address Natural)))) | |
| type ParameterEntrypointsDerivation Parameter Source # | |
Defined in Lorentz.Contracts.UserUpgradeable.V2 | |
| type ToT Parameter Source # | |
Defined in Lorentz.Contracts.UserUpgradeable.V2 | |
Constructors
| Storage | |
Fields
| |
Instances
| Generic Storage Source # | |
| HasAnnotation Storage Source # | |
Defined in Lorentz.Contracts.UserUpgradeable.V2 | |
| IsoValue Storage Source # | |
| type Rep Storage Source # | |
Defined in Lorentz.Contracts.UserUpgradeable.V2 type Rep Storage = D1 ('MetaData "Storage" "Lorentz.Contracts.UserUpgradeable.V2" "morley-upgradeable-0.3-inplace" 'False) (C1 ('MetaCons "Storage" 'PrefixI 'True) (S1 ('MetaSel ('Just "ledger") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Map Address Natural)) :*: (S1 ('MetaSel ('Just "previousVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (TAddress Parameter))) :*: S1 ('MetaSel ('Just "migrationTarget") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe MigrationTarget))))) | |
| type ToT Storage Source # | |
Defined in Lorentz.Contracts.UserUpgradeable.V2 | |
Orphan instances
| CustomErrorHasDoc "userUpgradable'unauthorizedMigrateFrom" Source # | |