Skip to content

Commit

Permalink
Merge pull request #184 from informalsystems/dusan/merge-main-into-re…
Browse files Browse the repository at this point in the history
…lease-v2.x

Bring changes from main to release/v2.x branch
  • Loading branch information
dusan-maksimovic authored Nov 28, 2024
2 parents cdbe999 + 9dd2425 commit 1823c46
Show file tree
Hide file tree
Showing 14 changed files with 35 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Add missing response attributes.
([\#181](https://github.com/informalsystems/hydro/pull/181))
1 change: 1 addition & 0 deletions .changelog/v2.0.2/summary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Date: November 28th, 2024
9 changes: 9 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# CHANGELOG

## v2.0.2

Date: November 28th, 2024

### BUG FIXES

- Add missing response attributes.
([\#181](https://github.com/informalsystems/hydro/pull/181))

## v2.0.1

Date: November 25th, 2024
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions artifacts/checksums.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
6a493be7e950050faa946c87b0c5928907dd9ed2d5e94b1c2d12c844a97cfc4f hydro.wasm
4f9a40da3c48d741112d35f0e4a52111863379d3ac80603c2b361e9b7a927d72 tribute.wasm
4a29666d376f4339d805e516d0f4fc33f7e4931fc12a6e24e75f49a5e380e12a hydro.wasm
7eadd1a9c36487c7f091731e6487b68088f954465807e0d662fc79afa7081b88 tribute.wasm
Binary file modified artifacts/hydro.wasm
Binary file not shown.
Binary file modified artifacts/tribute.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion contracts/hydro/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "hydro"
version = "2.0.1"
version = "2.0.2"
authors = ["Jehan Tremback", "Philip Offtermatt", "Dusan Maksimovic"]
edition = "2018"

Expand Down
13 changes: 11 additions & 2 deletions contracts/hydro/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,15 @@ fn create_proposal(
.add_attribute("tranche_id", tranche_id.to_string())
.add_attribute("proposal_id", proposal_id.to_string())
.add_attribute("proposal_title", proposal.title)
.add_attribute("proposal_description", proposal.description))
.add_attribute("proposal_description", proposal.description)
.add_attribute(
"deployment_duration",
proposal.deployment_duration.to_string(),
)
.add_attribute(
"minimum_atom_liquidity_request",
proposal.minimum_atom_liquidity_request.to_string(),
))
}

pub fn scale_lockup_power(lock_epoch_length: u64, lockup_time: u64, raw_power: Uint128) -> Uint128 {
Expand Down Expand Up @@ -1454,7 +1462,8 @@ pub fn remove_liquidity_deployment(
.add_attribute("action", "remove_liquidity_deployment")
.add_attribute("sender", info.sender)
.add_attribute("round_id", round_id.to_string())
.add_attribute("tranche_id", tranche_id.to_string());
.add_attribute("tranche_id", tranche_id.to_string())
.add_attribute("proposal_id", proposal_id.to_string());

LIQUIDITY_DEPLOYMENTS_MAP.remove(deps.storage, (round_id, tranche_id, proposal_id));

Expand Down
1 change: 1 addition & 0 deletions contracts/hydro/src/migration/migrate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ use super::v2_0_1::{migrate_v1_1_0_to_v2_0_1, MigrateMsgV2_0_1};

pub const CONTRACT_VERSION_V1_1_0: &str = "1.1.0";
pub const CONTRACT_VERSION_V2_0_1: &str = "2.0.1";
pub const CONTRACT_VERSION_V2_0_2: &str = "2.0.2";

#[cfg_attr(not(feature = "library"), entry_point)]
pub fn migrate(
Expand Down
4 changes: 2 additions & 2 deletions contracts/hydro/src/migration/testing_v1_1_0_to_v2_0_1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use cw_storage_plus::{Item, Map};
use crate::{
contract::{instantiate, CONTRACT_NAME},
migration::{
migrate::{migrate, CONTRACT_VERSION_V1_1_0, CONTRACT_VERSION_V2_0_1},
migrate::{migrate, CONTRACT_VERSION_V1_1_0, CONTRACT_VERSION_V2_0_2},
v1_1_0::{ConstantsV1_1_0, ProposalV1_1_0, VoteV1_1_0},
v2_0_1::{ConstantsV2_0_1, MigrateMsgV2_0_1, ProposalV2_0_1, VoteV2_0_1},
},
Expand Down Expand Up @@ -192,7 +192,7 @@ fn test_constants_and_proposals_migration() {

// Verify the contract version after running the migration
let res = get_contract_version(&deps.storage);
assert_eq!(res.unwrap().version, CONTRACT_VERSION_V2_0_1.to_string());
assert_eq!(res.unwrap().version, CONTRACT_VERSION_V2_0_2.to_string());
}

#[test]
Expand Down
2 changes: 1 addition & 1 deletion contracts/tribute/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tribute"
version = "2.0.1"
version = "2.0.2"
edition = "2018"
authors = ["Jehan Tremback", "Philip Offtermatt", "Dusan Maksimovic"]

Expand Down
1 change: 1 addition & 0 deletions contracts/tribute/src/migration/migrate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use crate::{

pub const CONTRACT_VERSION_V1_1_1: &str = "1.1.1";
pub const CONTRACT_VERSION_V2_0_1: &str = "2.0.1";
pub const CONTRACT_VERSION_V2_0_2: &str = "2.0.2";

#[cfg_attr(not(feature = "library"), entry_point)]
pub fn migrate(
Expand Down
4 changes: 2 additions & 2 deletions contracts/tribute/src/migration/testing_v1_1_1_to_v2_0_1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use hydro::state::Constants;
use crate::{
contract::{instantiate, CONTRACT_NAME},
migration::{
migrate::{migrate, CONTRACT_VERSION_V1_1_1, CONTRACT_VERSION_V2_0_1},
migrate::{migrate, CONTRACT_VERSION_V1_1_1, CONTRACT_VERSION_V2_0_2},
v1_1_1::{ConfigV1_1_1, TributeV1_1_1},
v2_0_1::{ConfigV2_0_1, MigrateMsgV2_0_1, TributeV2_0_1},
},
Expand Down Expand Up @@ -165,5 +165,5 @@ fn test_migrate() {

// Verify the contract version after running the migration
let res = get_contract_version(&deps.storage);
assert_eq!(res.unwrap().version, CONTRACT_VERSION_V2_0_1.to_string());
assert_eq!(res.unwrap().version, CONTRACT_VERSION_V2_0_2.to_string());
}

0 comments on commit 1823c46

Please sign in to comment.