Skip to content

Commit

Permalink
Merge branch 'main' into stacks_ampd
Browse files Browse the repository at this point in the history
  • Loading branch information
raress96 committed Nov 25, 2024
2 parents 8755655 + 7d715f8 commit e79e93a
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 11 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ ethers-core = "2.0.14"
events = { version = "^1.0.0", path = "packages/events" }
events-derive = { version = "^1.0.0", path = "packages/events-derive" }
evm-gateway = { version = "^1.0.0", path = "packages/evm-gateway" }
gateway = { version = "^1.1.0", path = "contracts/gateway" }
gateway = { version = "^1.1.1", path = "contracts/gateway" }
gateway-api = { version = "^1.0.0", path = "packages/gateway-api" }
goldie = { version = "0.5" }
hex = "0.4.3"
Expand All @@ -46,8 +46,8 @@ itertools = "0.11.0"
k256 = { version = "0.13.1", features = ["ecdsa"] }
mockall = "0.12.1"
msgs-derive = { version = "^1.0.0", path = "packages/msgs-derive" }
multisig = { version = "^1.1.0", path = "contracts/multisig" }
multisig-prover = { version = "^1.1.0", path = "contracts/multisig-prover" }
multisig = { version = "^1.1.1", path = "contracts/multisig" }
multisig-prover = { version = "^1.1.1", path = "contracts/multisig-prover" }
num-traits = { version = "0.2.14", default-features = false }
quote = "1.0.36"
rand = "0.8.5"
Expand Down
2 changes: 1 addition & 1 deletion contracts/gateway/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "gateway"
version = "1.1.0"
version = "1.1.1"
rust-version = { workspace = true }
edition = { workspace = true }
description = "Gateway contract"
Expand Down
2 changes: 1 addition & 1 deletion contracts/multisig-prover/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "multisig-prover"
version = "1.1.0"
version = "1.1.1"
rust-version = { workspace = true }
edition = { workspace = true }
description = "Multisig prover contract"
Expand Down
10 changes: 8 additions & 2 deletions contracts/multisig-prover/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ pub const START_MULTISIG_REPLY_ID: u64 = 1;

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

#[cfg_attr(not(feature = "library"), entry_point)]
pub fn instantiate(
Expand Down Expand Up @@ -117,13 +116,20 @@ pub fn query(
.map_err(axelar_wasm_std::error::ContractError::from)
}

// It is valid to migrate from any of the below versions
const BASE_VERSION: &str = "1.1.0";
const OLD_BASE_VERSION: &str = "1.0.0";
const PATCH_VERSION: &str = "1.0.1";
#[cfg_attr(not(feature = "library"), entry_point)]
pub fn migrate(
deps: DepsMut,
_env: Env,
_msg: Empty,
) -> Result<Response, axelar_wasm_std::error::ContractError> {
cw2::assert_contract_version(deps.storage, CONTRACT_NAME, BASE_VERSION)?;
cw2::assert_contract_version(deps.storage, CONTRACT_NAME, BASE_VERSION)
.or_else(|_| cw2::assert_contract_version(deps.storage, CONTRACT_NAME, PATCH_VERSION))
.or_else(|_| cw2::assert_contract_version(deps.storage, CONTRACT_NAME, OLD_BASE_VERSION))?;

cw2::set_contract_version(deps.storage, CONTRACT_NAME, CONTRACT_VERSION)?;

Ok(Response::default())
Expand Down
2 changes: 1 addition & 1 deletion contracts/multisig/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "multisig"
version = "1.1.0"
version = "1.1.1"
rust-version = { workspace = true }
edition = { workspace = true }
description = "Multisig contract"
Expand Down

0 comments on commit e79e93a

Please sign in to comment.