Skip to content

Commit

Permalink
Merge pull request #514 from confio/release-0.13
Browse files Browse the repository at this point in the history
Release 0.13
  • Loading branch information
maurolacy authored Jul 26, 2022
2 parents 906a2e6 + 2fb08ba commit d4cdcfd
Show file tree
Hide file tree
Showing 10 changed files with 103 additions and 75 deletions.
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,19 @@

## [Unreleased](https://github.com/confio/tgrade-contracts/tree/HEAD)

[Full Changelog](https://github.com/confio/tgrade-contracts/compare/v0.12.0...HEAD)
[Full Changelog](https://github.com/confio/tgrade-contracts/compare/v0.13.0...HEAD)

## [v0.13.0](https://github.com/confio/tgrade-contracts/tree/v0.13.0) (2022-07-26)

[Full Changelog](https://github.com/confio/tgrade-contracts/compare/v0.12.0...v0.13.0)

**Breaking changes:**

- tgrade-ap-voting migrate multisig [\#513](https://github.com/confio/tgrade-contracts/pull/513) ([maurolacy](https://github.com/maurolacy))

**Merged pull requests:**

- Fix/migrate older version [\#516](https://github.com/confio/tgrade-contracts/pull/516) ([maurolacy](https://github.com/maurolacy))

## [v0.12.0](https://github.com/confio/tgrade-contracts/tree/v0.12.0) (2022-07-14)

Expand Down
44 changes: 22 additions & 22 deletions Cargo.lock

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

20 changes: 10 additions & 10 deletions contracts/tgrade-ap-voting/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tgrade-ap-voting"
version = "0.12.0"
version = "0.13.0"
authors = ["Bartłomiej Kuras <[email protected]>"]
edition = "2018"
description = "Implementing tgrade-ap-voting"
Expand All @@ -24,19 +24,19 @@ schemars = "0.8.1"
semver = "1"
serde = { version = "1", default-features = false, features = ["derive"] }
thiserror = "1"
tg-bindings = "0.12.0"
tg-voting-contract = "0.12.0"
tg-utils = "0.12.0"
tg3 = "0.12.0"
tg-bindings = "0.13.0"
tg-voting-contract = "0.13.0"
tg-utils = "0.13.0"
tg3 = "0.13.0"

[dev-dependencies]
anyhow = "1"
assert_matches = "1.5"
cosmwasm-schema = "1.0.0"
cw-multi-test = "0.13.4"
cw-storage-plus = "0.13.4"
tg-bindings-test = "0.12.0"
tg-test-utils = "0.12.0"
tg4 = "0.12.0"
tg4-engagement = "0.12.0"
tgrade-oc-proposals = { path = "../tgrade-oc-proposals", version = "0.12.0" }
tg-bindings-test = "0.13.0"
tg-test-utils = "0.13.0"
tg4 = "0.13.0"
tg4-engagement = "0.13.0"
tgrade-oc-proposals = { path = "../tgrade-oc-proposals", version = "0.13.0" }
11 changes: 11 additions & 0 deletions contracts/tgrade-ap-voting/TODO.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
- Unit test migration code
- Test migration upgrade
- Store cw3-fixed-multisig on chain
- Get code id
- Use it in migration

- Release 0.12.1
- Create proposal on mainnet
Store fixed-multisig
- Get code id
- Use it in migration proposal
9 changes: 2 additions & 7 deletions contracts/tgrade-ap-voting/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ use cosmwasm_std::{
use cw3_fixed_multisig::msg::{InstantiateMsg as Cw3InstantiateMsg, Voter};
use cw_storage_plus::Bound;

use cw2::{get_contract_version, set_contract_version};
use cw2::set_contract_version;
use cw3::VoterListResponse;
use cw_utils::{must_pay, parse_reply_instantiate_data, Duration, Threshold};
use semver::Version;
use tg_bindings::{
request_privileges, Privilege, PrivilegeChangeMsg, TgradeMsg, TgradeQuery, TgradeSudoMsg,
};
Expand Down Expand Up @@ -542,11 +541,7 @@ pub fn migrate(
_env: Env,
msg: MigrationMsg,
) -> Result<Response, ContractError> {
// FIXME: After https://github.com/confio/poe-contracts/pull/164, use the returned original version
let stored = get_contract_version(deps.storage)?;
let storage_version: Version = stored.version.parse().unwrap();

ensure_from_older_version(deps.storage, CONTRACT_NAME, CONTRACT_VERSION)?;
let storage_version = ensure_from_older_version(deps.storage, CONTRACT_NAME, CONTRACT_VERSION)?;

migrate_config(deps, &storage_version, &msg)?;
Ok(Response::new())
Expand Down
20 changes: 10 additions & 10 deletions contracts/tgrade-oc-proposals/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tgrade-oc-proposals"
version = "0.12.0"
version = "0.13.0"
authors = ["Ethan Frey <[email protected]>"]
edition = "2018"
description = "Implementing tgrade-oc-proposals"
Expand All @@ -19,18 +19,18 @@ cw2 = "0.13.4"
cw-storage-plus = "0.13.4"
schemars = "0.8.1"
serde = { version = "1", default-features = false, features = ["derive"] }
tg3 = "0.12.0"
tg4 = "0.12.0"
tg4-engagement = { version = "0.12.0", features = ["library"] }
tg-bindings = "0.12.0"
tg-utils = "0.12.0"
tg-voting-contract = "0.12.0"
tgrade-valset = { version = "0.12.0", features = ["library"] }
tg3 = "0.13.0"
tg4 = "0.13.0"
tg4-engagement = { version = "0.13.0", features = ["library"] }
tg-bindings = "0.13.0"
tg-utils = "0.13.0"
tg-voting-contract = "0.13.0"
tgrade-valset = { version = "0.13.0", features = ["library"] }
thiserror = "1"

[dev-dependencies]
anyhow = "1"
cosmwasm-schema = "1.0.0"
cw-multi-test = "0.13.4"
tg-bindings-test = "0.12.0"
tg-test-utils = "0.12.0"
tg-bindings-test = "0.13.0"
tg-test-utils = "0.13.0"
18 changes: 9 additions & 9 deletions contracts/tgrade-tc-payments/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tgrade-tc-payments"
version = "0.12.0"
version = "0.13.0"
authors = ["Mauro Lacy <[email protected]>"]
edition = "2021"
description = "Oversight Community / Arbiter Pool payments contract"
Expand All @@ -27,15 +27,15 @@ cw-controllers = "0.13.4"
cw-storage-plus = "0.13.4"
schemars = "0.8"
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
tg-bindings = "0.12.0"
tg4 = "0.12.0"
tg-bindings = "0.13.0"
tg4 = "0.13.0"
thiserror = "1.0.21"

[dev-dependencies]
cw-multi-test = "0.13.4"
tg4-engagement = "0.12.0"
tg-voting-contract = "0.12.0"
tg-bindings-test = "0.12.0"
tg-utils = "0.12.0"
tgrade-trusted-circle = { version = "0.12.0", path = "../tgrade-trusted-circle" }
tgrade-ap-voting = { version = "0.12.0", path = "../tgrade-ap-voting" }
tg4-engagement = "0.13.0"
tg-voting-contract = "0.13.0"
tg-bindings-test = "0.13.0"
tg-utils = "0.13.0"
tgrade-trusted-circle = { version = "0.13.0", path = "../tgrade-trusted-circle" }
tgrade-ap-voting = { version = "0.13.0", path = "../tgrade-ap-voting" }
16 changes: 8 additions & 8 deletions contracts/tgrade-trusted-circle/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tgrade-trusted-circle"
version = "0.12.0"
version = "0.13.0"
authors = ["Mauro Lacy <[email protected]>", "Ethan Frey <[email protected]>"]
edition = "2018"
description = "Trusted Circle implementation based on TG4 for group membership"
Expand All @@ -27,11 +27,11 @@ cw-storage-plus = "0.13.4"
schemars = "0.8"
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
semver = "1"
tg3 = "0.12.0"
tg4 = "0.12.0"
tg-bindings = "0.12.0"
tg-utils = "0.12.0"
tg-voting-contract = "0.12.0"
tg3 = "0.13.0"
tg4 = "0.13.0"
tg-bindings = "0.13.0"
tg-utils = "0.13.0"
tg-voting-contract = "0.13.0"
thiserror = "1.0.21"

[dev-dependencies]
Expand All @@ -40,5 +40,5 @@ cosmwasm-schema = "1.0.0"
cw-multi-test = "0.13.4"
derivative = "2"
serde_json = "1.0.79"
tg-bindings-test = "0.12.0"
tg4-engagement = "0.12.0"
tg-bindings-test = "0.13.0"
tg4-engagement = "0.13.0"
10 changes: 2 additions & 8 deletions contracts/tgrade-trusted-circle/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ use cosmwasm_std::{
DepsMut, Empty, Env, Event, MessageInfo, Order, QuerierWrapper, QueryRequest, StdError,
StdResult, SystemError, SystemResult, Uint128, WasmQuery,
};
use cw2::{get_contract_version, set_contract_version};
use cw2::set_contract_version;
use cw_storage_plus::Bound;
use cw_utils::{maybe_addr, Expiration};
use semver::Version;
use tg3::{Status, Vote};
use tg4::{
member_key, Member, MemberInfo, MemberListResponse, MemberResponse, TotalPointsResponse,
Expand Down Expand Up @@ -1729,12 +1728,7 @@ pub fn migrate(
env: Env,
msg: Empty,
) -> Result<Response, ContractError> {
// FIXME: After https://github.com/confio/poe-contracts/pull/164, use the returned original version
let stored_version = get_contract_version(deps.storage)?;
// Unwrapping as version check before would fail if stored version is invalid
let stored_version: Version = stored_version.version.parse().unwrap();

ensure_from_older_version(deps.storage, CONTRACT_NAME, CONTRACT_VERSION)?;
let stored_version = ensure_from_older_version(deps.storage, CONTRACT_NAME, CONTRACT_VERSION)?;

// FIXME: Currently we don't need mechanism for migrating ballots, as testnets starts from scratch anyway
// migrate_ballots(deps.branch(), &env, &msg, &stored_version)?;
Expand Down
16 changes: 16 additions & 0 deletions scripts/optimizer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
:

U="cosmwasm"
V="0.12.6"

M=$(uname -m)
M="x86_64" # Force Intel arch

A="linux/${M/x86_64/amd64}"
S=${M#x86_64}
S=${S:+-$S}

docker run --platform $A --rm -v "$(pwd)":/code \
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
$U/workspace-optimizer$S:$V

0 comments on commit d4cdcfd

Please sign in to comment.