Skip to main content

migrate

Function migrate 

Source
pub fn migrate(
    store: &Path,
    scratch_parent: &Path,
    target: &TargetContract,
    destination: &Path,
    embedder: &dyn Embedder,
    batch: usize,
) -> Result<MigrateOutcome, MemoryError>
Expand description

Rebuild, validate and switch — entering wherever the journal stands.

A journal already at Phase::DestinationValidated or beyond routes straight to the switch: the earlier stages are journalled as done, and after the first rename the source path no longer exists for them to run against.

§Errors

Returns crate::MemoryError from whichever stage refuses; each stage names itself, and re-running the same command resumes from the journal.