1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use super::super::Handler;
use cosmwasm_std::{DepsMut, Env, Response};
use schemars::JsonSchema;
use serde::Serialize;

/// Trait for a contract's Migrate entry point.
pub trait MigrateEndpoint: Handler {
    /// The message type for the Migrate entry point.
    type MigrateMsg: Serialize + JsonSchema;

    /// Handler for the Migrate endpoint.
    fn migrate(
        self,
        deps: DepsMut,
        env: Env,
        msg: Self::MigrateMsg,
    ) -> Result<Response, Self::Error>;
}