Safe Haskell | None |
---|---|
Language | Haskell2010 |
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
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
Generic Storage Source # | |
HasAnnotation Storage Source # | |
Defined in Lorentz.Contracts.UserUpgradeable.V1 getAnnotation :: FollowEntrypointFlag -> Notes (ToT Storage) # | |
IsoValue Storage Source # | |
type Rep Storage Source # | |
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 # | |
Defined in Lorentz.Contracts.UserUpgradeable.V1 |
Orphan instances
CustomErrorHasDoc "userUpgradable'notEnoughTokens" Source # | |