From 8501724b5ad77a57c875bd471765882ec47b6bf8 Mon Sep 17 00:00:00 2001 From: Kerber0x Date: Wed, 17 Apr 2024 16:13:54 +0100 Subject: [PATCH] chore: fix migration for v0.1.2 --- contracts/alliance-hub/src/contract.rs | 34 +------------------ .../src/alliance_protocol.rs | 4 +-- 2 files changed, 2 insertions(+), 36 deletions(-) diff --git a/contracts/alliance-hub/src/contract.rs b/contracts/alliance-hub/src/contract.rs index c5db057..252ad55 100644 --- a/contracts/alliance-hub/src/contract.rs +++ b/contracts/alliance-hub/src/contract.rs @@ -1,6 +1,5 @@ use std::collections::{HashMap, HashSet}; -use cosmwasm_schema::cw_serde; #[cfg(not(feature = "library"))] use cosmwasm_std::entry_point; use cosmwasm_std::{ @@ -11,7 +10,6 @@ use cosmwasm_std::{ use cw2::{get_contract_version, set_contract_version}; use cw20::Cw20ReceiveMsg; use cw_asset::{Asset, AssetInfo, AssetInfoBase, AssetInfoKey}; -use cw_storage_plus::Item; use cw_utils::parse_instantiate_response_data; use semver::Version; use terra_proto_rs::alliance::alliance::{ @@ -42,7 +40,7 @@ const CREATE_REPLY_ID: u64 = 1; const CLAIM_REWARD_ERROR_REPLY_ID: u64 = 2; #[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 { let version: Version = CONTRACT_VERSION.parse()?; let storage_version: Version = get_contract_version(deps.storage)?.version.parse()?; @@ -51,36 +49,6 @@ pub fn migrate(deps: DepsMut, _env: Env, msg: MigrateMsg) -> Result = Item::new("config"); - let config_v010 = CONFIG_V010.load(deps.storage)?; - - let config = Config { - governance: config_v010.governance, - controller: config_v010.controller, - oracle: config_v010.oracle, - operator, - last_reward_update_timestamp: config_v010.last_reward_update_timestamp, - alliance_token_denom: config_v010.alliance_token_denom, - alliance_token_supply: config_v010.alliance_token_supply, - reward_denom: config_v010.reward_denom, - }; - CONFIG.save(deps.storage, &config)?; - } - set_contract_version(deps.storage, CONTRACT_NAME, CONTRACT_VERSION)?; Ok(Response::default()) } diff --git a/packages/alliance-protocol/src/alliance_protocol.rs b/packages/alliance-protocol/src/alliance_protocol.rs index f405d2f..3bbe8db 100644 --- a/packages/alliance-protocol/src/alliance_protocol.rs +++ b/packages/alliance-protocol/src/alliance_protocol.rs @@ -145,9 +145,7 @@ pub struct AllPendingRewardsQuery { } #[cw_serde] -pub struct MigrateMsg { - pub operator: String, -} +pub struct MigrateMsg {} #[cw_serde] pub struct StakedBalanceRes {