From 9a38f3718e7639957bd5ca039b62ac220792de07 Mon Sep 17 00:00:00 2001 From: Kerber0x Date: Fri, 20 Oct 2023 14:01:35 +0100 Subject: [PATCH] chore: bump vault contract version before migration on terra --- Cargo.lock | 2 +- .../pool-network/terraswap_pair/src/contract.rs | 17 +++++++---------- .../vault-network/vault/Cargo.toml | 2 +- scripts/build_release.sh | 4 ++-- 4 files changed, 11 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 85364201..91b1f7a9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1542,7 +1542,7 @@ checksum = "e1766d682d402817b5ac4490b3c3002d91dfa0d22812f341609f97b08757359c" [[package]] name = "vault" -version = "1.2.3" +version = "1.2.4" dependencies = [ "cosmwasm-schema", "cosmwasm-std", diff --git a/contracts/liquidity_hub/pool-network/terraswap_pair/src/contract.rs b/contracts/liquidity_hub/pool-network/terraswap_pair/src/contract.rs index c5a205ee..7d2719b5 100644 --- a/contracts/liquidity_hub/pool-network/terraswap_pair/src/contract.rs +++ b/contracts/liquidity_hub/pool-network/terraswap_pair/src/contract.rs @@ -238,18 +238,15 @@ pub fn migrate(mut deps: DepsMut, _env: Env, _msg: MigrateMsg) -> Result= version { - // return Err(ContractError::MigrateInvalidVersion { - // current_version: storage_version, - // new_version: version, - // }); - // } + if storage_version >= version { + return Err(ContractError::MigrateInvalidVersion { + current_version: storage_version, + new_version: version, + }); + } if storage_version <= Version::parse("1.0.4")? { migrations::migrate_to_v110(deps.branch())?; diff --git a/contracts/liquidity_hub/vault-network/vault/Cargo.toml b/contracts/liquidity_hub/vault-network/vault/Cargo.toml index fe7a2885..6c8b24e8 100644 --- a/contracts/liquidity_hub/vault-network/vault/Cargo.toml +++ b/contracts/liquidity_hub/vault-network/vault/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vault" -version = "1.2.3" +version = "1.2.4" authors = ["kaimen-sano "] edition.workspace = true description = "Contract to handle a single vault that controls an asset" diff --git a/scripts/build_release.sh b/scripts/build_release.sh index 8643f25b..ecc5dd62 100755 --- a/scripts/build_release.sh +++ b/scripts/build_release.sh @@ -31,10 +31,10 @@ flag="" case $chain in -juno) +juno | terra) flag="-osmosis_token_factory" ;; -terra | migaloo) +migaloo) flag="-token_factory" ;; injective)