diff --git a/contracts/dao/cwd-core/schema/migrate_msg.json b/contracts/dao/cwd-core/schema/migrate_msg.json index 6b9264c8..87b18ea7 100644 --- a/contracts/dao/cwd-core/schema/migrate_msg.json +++ b/contracts/dao/cwd-core/schema/migrate_msg.json @@ -1,38 +1,5 @@ { "$schema": "http://json-schema.org/draft-07/schema#", "title": "MigrateMsg", - "oneOf": [ - { - "type": "object", - "required": [ - "from_v1" - ], - "properties": { - "from_v1": { - "type": "object", - "properties": { - "dao_uri": { - "type": [ - "string", - "null" - ] - } - } - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "from_compatible" - ], - "properties": { - "from_compatible": { - "type": "object" - } - }, - "additionalProperties": false - } - ] + "type": "object" } diff --git a/contracts/dao/cwd-core/src/contract.rs b/contracts/dao/cwd-core/src/contract.rs index 72954cd6..aba3ec80 100644 --- a/contracts/dao/cwd-core/src/contract.rs +++ b/contracts/dao/cwd-core/src/contract.rs @@ -533,7 +533,8 @@ pub fn query_dao_uri(deps: Deps) -> StdResult { } #[cfg_attr(not(feature = "library"), entry_point)] -pub fn migrate(_deps: DepsMut, _env: Env, _msg: MigrateMsg) -> Result { +pub fn migrate(deps: DepsMut, _env: Env, _msg: MigrateMsg) -> Result { + set_contract_version(deps.storage, CONTRACT_NAME, CONTRACT_VERSION)?; Ok(Response::default()) } diff --git a/contracts/dao/cwd-core/src/msg.rs b/contracts/dao/cwd-core/src/msg.rs index c8a34193..b7bea062 100644 --- a/contracts/dao/cwd-core/src/msg.rs +++ b/contracts/dao/cwd-core/src/msg.rs @@ -134,7 +134,4 @@ pub enum QueryMsg { #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[serde(rename_all = "snake_case")] -pub enum MigrateMsg { - FromV1 { dao_uri: Option }, - FromCompatible {}, -} +pub struct MigrateMsg {} diff --git a/contracts/dao/pre-propose/cwd-pre-propose-single-overrule/src/contract.rs b/contracts/dao/pre-propose/cwd-pre-propose-single-overrule/src/contract.rs index 842710ed..c90bc035 100644 --- a/contracts/dao/pre-propose/cwd-pre-propose-single-overrule/src/contract.rs +++ b/contracts/dao/pre-propose/cwd-pre-propose-single-overrule/src/contract.rs @@ -14,7 +14,7 @@ use cwd_pre_propose_base::{ state::PreProposeContract, }; use neutron_dao_pre_propose_overrule::msg::{ - ExecuteMsg, InstantiateMsg, ProposeMessage, QueryExt, QueryMsg, + ExecuteMsg, InstantiateMsg, MigrateMsg, ProposeMessage, QueryExt, QueryMsg, }; use crate::state::PROPOSALS; @@ -286,3 +286,13 @@ pub fn query(deps: Deps, env: Env, msg: QueryMsg) -> StdResult { _ => PrePropose::default().query(deps, env, msg), } } + +#[cfg_attr(not(feature = "library"), entry_point)] +pub fn migrate( + deps: DepsMut, + _env: Env, + _msg: MigrateMsg, +) -> Result { + set_contract_version(deps.storage, CONTRACT_NAME, CONTRACT_VERSION)?; + Ok(Response::default()) +} diff --git a/contracts/dao/proposal/cwd-proposal-single/schema/migrate_msg.json b/contracts/dao/proposal/cwd-proposal-single/schema/migrate_msg.json index 7e58c323..87b18ea7 100644 --- a/contracts/dao/proposal/cwd-proposal-single/schema/migrate_msg.json +++ b/contracts/dao/proposal/cwd-proposal-single/schema/migrate_msg.json @@ -1,6 +1,5 @@ { "$schema": "http://json-schema.org/draft-07/schema#", "title": "MigrateMsg", - "type": "string", - "enum": [] + "type": "object" } diff --git a/contracts/dao/proposal/cwd-proposal-single/src/msg.rs b/contracts/dao/proposal/cwd-proposal-single/src/msg.rs index d324185f..d4bf3780 100644 --- a/contracts/dao/proposal/cwd-proposal-single/src/msg.rs +++ b/contracts/dao/proposal/cwd-proposal-single/src/msg.rs @@ -194,4 +194,4 @@ pub enum QueryMsg { #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[serde(rename_all = "snake_case")] -pub enum MigrateMsg {} +pub struct MigrateMsg {} diff --git a/contracts/subdaos/pre-propose/cwd-subdao-pre-propose-single/src/contract.rs b/contracts/subdaos/pre-propose/cwd-subdao-pre-propose-single/src/contract.rs index c1f7ad4a..b1fee8fd 100644 --- a/contracts/subdaos/pre-propose/cwd-subdao-pre-propose-single/src/contract.rs +++ b/contracts/subdaos/pre-propose/cwd-subdao-pre-propose-single/src/contract.rs @@ -16,6 +16,7 @@ use cwd_pre_propose_base::{ msg::{ExecuteMsg as ExecuteBase, InstantiateMsg as InstantiateBase}, state::PreProposeContract, }; +use neutron_subdao_pre_propose_single::msg::MigrateMsg; use neutron_subdao_pre_propose_single::{ msg::{ExecuteMsg, InstantiateMsg, QueryExt, QueryMsg}, types::ProposeMessage, @@ -186,3 +187,8 @@ pub fn reply(deps: DepsMut, _env: Env, msg: Reply) -> Result Result { + Ok(Response::default()) +} diff --git a/packages/neutron-dao-pre-propose-overrule/src/msg.rs b/packages/neutron-dao-pre-propose-overrule/src/msg.rs index f495963e..b7965e6e 100644 --- a/packages/neutron-dao-pre-propose-overrule/src/msg.rs +++ b/packages/neutron-dao-pre-propose-overrule/src/msg.rs @@ -27,3 +27,7 @@ pub enum QueryExt { } pub type QueryMsg = QueryBase; + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] +#[serde(rename_all = "snake_case")] +pub struct MigrateMsg {} diff --git a/packages/neutron-subdao-pre-propose-single/src/msg.rs b/packages/neutron-subdao-pre-propose-single/src/msg.rs index 9b7b9b2d..e94b3732 100644 --- a/packages/neutron-subdao-pre-propose-single/src/msg.rs +++ b/packages/neutron-subdao-pre-propose-single/src/msg.rs @@ -29,3 +29,7 @@ pub enum QueryExt { } pub type QueryMsg = QueryBase; + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] +#[serde(rename_all = "snake_case")] +pub struct MigrateMsg {}