referrerpolicy=no-referrer-when-downgrade

Module v4

Module v4 

Source
Expand description

Switch storage deposits from native currency to PGAS.

§Multi-Block Migration v4

Switches storage deposits from the native currency to PGAS.

Phase 1 iterates [crate::CodeInfoOf] and for each uploaded code records the uploader’s existing native CodeUploadDepositReserve contribution under [crate::NativeDepositOf], keyed by the pallet’s own account (the holder of that deposit). The native currency itself stays where it is.

Phase 2 iterates [crate::AccountInfoOf] and for each contract burn the native StorageDepositReserve hold and replaces it with the same amount of PGAS minted into the contract and held under the same reason.

Phase 3 rewrites the [crate::DeletionQueue] entries from their old TrieId value into the new [crate::storage::DeletionQueueItem] format.

Phases 1 and 2 are skipped when crate::Config::Deposit does not support PGAS (i.e. the default () backend); only phase 3 runs in that case.

Structs§

Migration
Switches native storage deposits over to PGAS.

Enums§

Cursor
Three-phase cursor: code uploads, contracts, then deletion-queue rewrite.