Skip to content

Commit

Permalink
fix(gateway): set contract version in migrate endpoint (#706)
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcobb23 authored Nov 19, 2024
1 parent fd509f3 commit 25c3edf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion contracts/gateway/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ mod query;

const CONTRACT_NAME: &str = env!("CARGO_PKG_NAME");
const CONTRACT_VERSION: &str = env!("CARGO_PKG_VERSION");
const BASE_VERSION: &str = "1.0.0";

#[derive(thiserror::Error, Debug)]
pub enum Error {
Expand All @@ -40,10 +41,13 @@ pub enum Error {

#[cfg_attr(not(feature = "library"), entry_point)]
pub fn migrate(
_deps: DepsMut,
deps: DepsMut,
_env: Env,
_msg: Empty,
) -> Result<Response, axelar_wasm_std::error::ContractError> {
cw2::assert_contract_version(deps.storage, CONTRACT_NAME, BASE_VERSION)?;
cw2::set_contract_version(deps.storage, CONTRACT_NAME, CONTRACT_VERSION)?;

Ok(Response::default())
}

Expand Down

0 comments on commit 25c3edf

Please sign in to comment.