pub fn migrate(
    deps: DepsMut<'_>,
    _env: Env,
    msg: MigrateMsg
) -> Result<Response, ContractError>
Expand description

The entry point used when the contract admin migrates an existing instance of this contract to a new stored code instance on chain.

§Parameters

  • deps A dependencies object provided by the cosmwasm framework. Allows access to useful resources like contract internal storage and a querier to retrieve blockchain objects.
  • _env An environment object provided by the cosmwasm framework. Describes the contract’s details, as well as blockchain information at the time of the transaction. Unused by this function, but required by cosmwasm for successfully defined migration entrypoint.
  • msg` A custom migrate message enum defined by this contract to allow multiple different results of invoking the migrate endpoint.