Skip to content

Commit

Permalink
add migrate fn for distribution contract
Browse files Browse the repository at this point in the history
  • Loading branch information
sotnikov-s committed Oct 25, 2023
1 parent 6fee749 commit 47dc5fa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 7 additions & 1 deletion contracts/tokenomics/distribution/src/contract.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::error::ContractError;
use crate::msg::{ExecuteMsg, InstantiateMsg, QueryMsg};
use crate::msg::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg};
use crate::state::{Config, CONFIG, FUND_COUNTER, PAUSED_UNTIL, PENDING_DISTRIBUTION, SHARES};
#[cfg(not(feature = "library"))]
use cosmwasm_std::entry_point;
Expand Down Expand Up @@ -312,3 +312,9 @@ fn get_pause_info(deps: Deps, env: &Env) -> StdResult<PauseInfoResponse> {
None => PauseInfoResponse::Unpaused {},
})
}

#[cfg_attr(not(feature = "library"), entry_point)]
pub fn migrate(deps: DepsMut, _env: Env, _msg: MigrateMsg) -> Result<Response, ContractError> {
set_contract_version(deps.storage, CONTRACT_NAME, CONTRACT_VERSION)?;
Ok(Response::default())
}
4 changes: 4 additions & 0 deletions contracts/tokenomics/distribution/src/msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,7 @@ pub enum QueryMsg {
#[returns(Vec<(Addr, Uint128)>)]
Shares {},
}

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub struct MigrateMsg {}

0 comments on commit 47dc5fa

Please sign in to comment.