Skip to content

Commit

Permalink
Merge pull request #202 from confio/release-0.17
Browse files Browse the repository at this point in the history
Release 0.17
  • Loading branch information
maurolacy committed Jan 20, 2023
2 parents b9fba00 + f785c64 commit 390ad7a
Show file tree
Hide file tree
Showing 24 changed files with 171 additions and 167 deletions.
123 changes: 59 additions & 64 deletions .circleci/config.yml

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@

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

[Full Changelog](https://github.com/confio/poe-contracts/compare/v0.16.0...HEAD)
[Full Changelog](https://github.com/confio/poe-contracts/compare/v0.17.0...HEAD)

## [v0.17.0](https://github.com/confio/poe-contracts/tree/v0.17.0) (2023-01-18)

[Full Changelog](https://github.com/confio/poe-contracts/compare/v0.16.0...v0.17.0)

**Merged pull requests:**

- Add undelegations processing to migration handler [\#201](https://github.com/confio/poe-contracts/pull/201) ([maurolacy](https://github.com/maurolacy))
- Engagement half-life [\#200](https://github.com/confio/poe-contracts/pull/200) ([maurolacy](https://github.com/maurolacy))

## [v0.16.0](https://github.com/confio/poe-contracts/tree/v0.16.0) (2022-12-16)

Expand Down
32 changes: 16 additions & 16 deletions Cargo.lock

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

10 changes: 5 additions & 5 deletions contracts/tg4-engagement/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tg4-engagement"
version = "0.16.0"
version = "0.17.0"
authors = ["Ethan Frey <ethanfrey@users.noreply.github.com>"]
edition = "2018"
description = "Simple TG4 implementation of group membership controlled by an admin"
Expand All @@ -25,9 +25,9 @@ cw-controllers = "1.0.0"
cw-storage-plus = "1.0.1"
cw-utils = "1.0.1"
cw2 = "1.0.0"
tg-utils = { version = "0.16.0", path = "../../packages/utils" }
tg-bindings = { version = "0.16.0", path = "../../packages/bindings" }
tg4 = { path = "../../packages/tg4", version = "0.16.0" }
tg-utils = { version = "0.17.0", path = "../../packages/utils" }
tg-bindings = { version = "0.17.0", path = "../../packages/bindings" }
tg4 = { path = "../../packages/tg4", version = "0.17.0" }
schemars = "0.8"
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
thiserror = "1.0.21"
Expand All @@ -37,4 +37,4 @@ anyhow = "1"
cosmwasm-schema = "1.1.9"
cw-multi-test = "0.16.2"
derivative = "2"
tg-bindings-test = { version = "0.16.0", path = "../../packages/bindings-test" }
tg-bindings-test = { version = "0.17.0", path = "../../packages/bindings-test" }
8 changes: 4 additions & 4 deletions contracts/tg4-engagement/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ pub fn execute_distribute_rewards<Q: CustomQuery>(
.add_attribute("action", "distribute_rewards")
.add_attribute("sender", sender.as_str())
.add_attribute("denom", &distribution.denom)
.add_attribute("amount", &amount.to_string());
.add_attribute("amount", amount.to_string());

Ok(resp)
}
Expand Down Expand Up @@ -352,7 +352,7 @@ pub fn execute_withdraw_rewards<Q: CustomQuery>(
.add_attribute("owner", owner.as_str())
.add_attribute("receiver", receiver.as_str())
.add_attribute("reward", &reward.denom)
.add_attribute("amount", &reward.amount.to_string())
.add_attribute("amount", reward.amount.to_string())
.add_submessage(SubMsg::new(BankMsg::Send {
to_address: receiver.to_string(),
amount: vec![reward],
Expand Down Expand Up @@ -449,7 +449,7 @@ pub fn execute_slash<Q: CustomQuery>(
"Sender is not on slashers list".to_owned(),
));
}
let addr = Addr::unchecked(&addr);
let addr = Addr::unchecked(addr);
// check if address belongs to member, otherwise leave early
if members().may_load(deps.storage, &addr)?.is_none() {
return Ok(Response::new());
Expand Down Expand Up @@ -769,7 +769,7 @@ pub fn query_withdrawable_rewards<Q: CustomQuery>(
) -> StdResult<RewardsResponse> {
// Not checking address, as if it is invalid it is guaranteed not to appear in maps, so
// `withdrawable_rewards` would return error itself.
let owner = Addr::unchecked(&owner);
let owner = Addr::unchecked(owner);
let distribution = DISTRIBUTION.load(deps.storage)?;
let adjustment = if let Some(adj) = WITHDRAW_ADJUSTMENT.may_load(deps.storage, &owner)? {
adj
Expand Down
16 changes: 8 additions & 8 deletions contracts/tg4-engagement/src/multitest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ mod funds_distribution {
Event::new("wasm")
.add_attribute("sender", sender)
.add_attribute("denom", denom)
.add_attribute("amount", &amount.to_string())
.add_attribute("amount", amount.to_string())
}

#[test]
Expand Down Expand Up @@ -456,7 +456,7 @@ mod funds_distribution {
let denom = suite.denom.clone();

suite
.distribute_funds(&members[3], None, &coins(100, &denom))
.distribute_funds(&members[3], None, &coins(100, denom))
.unwrap();

suite
Expand Down Expand Up @@ -487,7 +487,7 @@ mod funds_distribution {
let denom = suite.denom.clone();

suite
.distribute_funds(&members[2], None, &coins(100, &denom))
.distribute_funds(&members[2], None, &coins(100, denom))
.unwrap();

let err = suite
Expand Down Expand Up @@ -535,7 +535,7 @@ mod funds_distribution {
);

suite
.distribute_funds(&members[2], None, &coins(100, &denom))
.distribute_funds(&members[2], None, &coins(100, denom))
.unwrap();

suite.delegate_withdrawal(&members[1], &members[0]).unwrap();
Expand Down Expand Up @@ -604,7 +604,7 @@ mod slashing {
);

suite
.distribute_funds(members[2], None, &coins(600, &denom))
.distribute_funds(members[2], None, &coins(600, denom))
.unwrap();

suite.withdraw_funds(members[0], None, None).unwrap();
Expand Down Expand Up @@ -649,7 +649,7 @@ mod slashing {
);

suite
.distribute_funds(members[2], None, &coins(600, &denom))
.distribute_funds(members[2], None, &coins(600, denom))
.unwrap();

suite.withdraw_funds(members[0], None, None).unwrap();
Expand Down Expand Up @@ -693,7 +693,7 @@ mod slashing {
);

suite
.distribute_funds(members[2], None, &coins(600, &denom))
.distribute_funds(members[2], None, &coins(600, denom))
.unwrap();

suite.withdraw_funds(members[0], None, None).unwrap();
Expand Down Expand Up @@ -804,7 +804,7 @@ mod slashing {
);

suite
.distribute_funds(members[2], None, &coins(600, &denom))
.distribute_funds(members[2], None, &coins(600, denom))
.unwrap();

suite.withdraw_funds(members[0], None, None).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion contracts/tg4-engagement/src/multitest/suite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ impl Suite {
let amount = self
.app
.wrap()
.query_balance(&Addr::unchecked(owner), &self.denom)?
.query_balance(Addr::unchecked(owner), &self.denom)?
.amount;
Ok(amount.into())
}
Expand Down
4 changes: 2 additions & 2 deletions contracts/tg4-group/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tg4-group"
version = "0.16.0"
version = "0.17.0"
authors = ["Mauro Lacy <mauro@confio.gmbh>"]
edition = "2018"
description = "Simple tg4 implementation of group membership controlled by admin"
Expand Down Expand Up @@ -34,7 +34,7 @@ cw-controllers = "1.0.0"
cw-storage-plus = "1.0.1"
schemars = "0.8.1"
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
tg4 = { version = "0.16.0", path = "../../packages/tg4" }
tg4 = { version = "0.17.0", path = "../../packages/tg4" }
thiserror = { version = "1.0.23" }

[dev-dependencies]
Expand Down
12 changes: 6 additions & 6 deletions contracts/tg4-mixer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tg4-mixer"
version = "0.16.0"
version = "0.17.0"
authors = ["Ethan Frey <ethanfrey@users.noreply.github.com>"]
edition = "2018"
description = "TG4 implementation that combines two different groups with a merge function"
Expand Down Expand Up @@ -33,17 +33,17 @@ rust_decimal_macros = { version = "1.16", default-features = false }
thiserror = "1.0.21"
schemars = "0.8"
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
tg4 = { path = "../../packages/tg4", version = "0.16.0" }
tg-utils = { path = "../../packages/utils", version = "0.16.0" }
tg-bindings = { path = "../../packages/bindings", version = "0.16.0" }
tg4 = { path = "../../packages/tg4", version = "0.17.0" }
tg-utils = { path = "../../packages/utils", version = "0.17.0" }
tg-bindings = { path = "../../packages/bindings", version = "0.17.0" }

[dev-dependencies]
cosmwasm-schema = "1.1.9"
# bench dependencies
cosmwasm-vm = { version = "1.1.0" }
cw-multi-test = "0.16.2"
tg4-engagement = { path = "../tg4-engagement", version = "0.16.0", features = ["library"] }
tg4-stake = { path = "../tg4-stake", version = "0.16.0", features = ["library"] }
tg4-engagement = { path = "../tg4-engagement", version = "0.17.0", features = ["library"] }
tg4-stake = { path = "../tg4-stake", version = "0.17.0", features = ["library"] }

[[bench]]
name = "main"
Expand Down
10 changes: 5 additions & 5 deletions contracts/tg4-stake/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tg4-stake"
version = "0.16.0"
version = "0.17.0"
authors = ["Ethan Frey <ethanfrey@users.noreply.github.com>"]
edition = "2018"
description = "TG4 implementation of group based on staked tokens"
Expand Down Expand Up @@ -28,11 +28,11 @@ cw-storage-plus = "1.0.1"
itertools = "0.10"
schemars = "0.8.1"
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
tg4 = { path = "../../packages/tg4", version = "0.16.0" }
tg-utils = { path = "../../packages/utils", version = "0.16.0" }
tg-bindings = { path = "../../packages/bindings", version = "0.16.0" }
tg4 = { path = "../../packages/tg4", version = "0.17.0" }
tg-utils = { path = "../../packages/utils", version = "0.17.0" }
tg-bindings = { path = "../../packages/bindings", version = "0.17.0" }
thiserror = "1.0.21"

[dev-dependencies]
cosmwasm-schema = "1.1.9"
tg-bindings-test = { path = "../../packages/bindings-test", version = "0.16.0" }
tg-bindings-test = { path = "../../packages/bindings-test", version = "0.17.0" }

0 comments on commit 390ad7a

Please sign in to comment.