Skip to main content

migrate_contract_storage

Function migrate_contract_storage 

Source
fn migrate_contract_storage(
    data: Ecx<'_, '_, '_>,
    address: Address,
    account_h160: H160,
)
Expand description

Migrates contract storage from REVM state to pallet-revive.

Merges storage from two sources:

  1. Journaled state: most recent storage values from current execution
  2. Database cache: storage written before startup migration, which is run as separate transaction, already committed to cache

The journaled state takes precedence - cache values are only used for slots not present in the journaled state.