Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module contains common functions and types related to user-defined upgrades. It intentionally does not include mint- and burn-related functionality because these should be handled by particular token implementations (V2 and V1 correspondingly).
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.
Synopsis
- type MigrationTarget = FutureContract (Address, Natural)
- callMigrationTarget :: forall storage. HasMigrationTarget storage => '[Natural, storage] :-> '[([Operation], storage)]
- initiateMigration :: forall storage. (HasAdmin storage, HasMigrationTarget storage) => '[MigrationTarget, storage] :-> '[([Operation], storage)]
Documentation
type MigrationTarget = FutureContract (Address, Natural) Source #
callMigrationTarget :: forall storage. HasMigrationTarget storage => '[Natural, storage] :-> '[([Operation], storage)] Source #
Forges a call to the new version; the forged operation contans the address of the sender, and the amount of tokens to mint.
initiateMigration :: forall storage. (HasAdmin storage, HasMigrationTarget storage) => '[MigrationTarget, storage] :-> '[([Operation], storage)] Source #
Starts a migration from an old version of a contract to a new one.
Orphan instances
CustomErrorHasDoc "alreadyMigrating" Source # | |
CustomErrorHasDoc "migrationTargetDoesNotExist" Source # | |
CustomErrorHasDoc "nowhereToMigrate" Source # | |