Skip to content

Commit

Permalink
Merge pull request #197 from confio/release-0.15.2-2
Browse files Browse the repository at this point in the history
Release 0.15.2 follow-up
  • Loading branch information
maurolacy committed Dec 9, 2022
2 parents 003a099 + a3449c6 commit c8134a7
Show file tree
Hide file tree
Showing 42 changed files with 165 additions and 165 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ jobs:
- run:
name: Build development contracts
command: |
docker run --volumes-from with_code cosmwasm/workspace-optimizer:0.12.6
docker run --volumes-from with_code cosmwasm/workspace-optimizer:0.12.10
docker cp with_code:/code/artifacts ./artifacts
- run:
name: Show data
Expand Down
2 changes: 1 addition & 1 deletion contracts/tg4-engagement/src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::msg::ExecuteMsg;
/// for working with tg4-engagement contracts.
///
/// It extends Tg4Contract to add the extra calls from tg4-engagement.
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
pub struct Tg4GroupContract(pub Tg4Contract);

impl Deref for Tg4GroupContract {
Expand Down
22 changes: 11 additions & 11 deletions contracts/tg4-engagement/src/msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use tg4::Member;
use tg_bindings::{Evidence, PrivilegeChangeMsg};
use tg_utils::Duration;

#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, JsonSchema, Debug)]
#[serde(rename_all = "snake_case")]
pub struct InstantiateMsg {
/// The admin is the only account that can update the group state.
Expand All @@ -22,7 +22,7 @@ pub struct InstantiateMsg {
pub denom: String,
}

#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, JsonSchema, Debug)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
/// Change the admin
Expand Down Expand Up @@ -72,7 +72,7 @@ pub enum ExecuteMsg {
Slash { addr: String, portion: Decimal },
}

#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, JsonSchema, Debug)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
/// Return AdminResponse
Expand Down Expand Up @@ -122,7 +122,7 @@ pub enum QueryMsg {
WithdrawAdjustmentData { addr: String },
}

#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, JsonSchema, Debug)]
#[serde(rename_all = "snake_case")]
pub enum SudoMsg {
/// This will be delivered every block if the contract is currently registered for Begin Block
Expand All @@ -145,40 +145,40 @@ pub enum SudoMsg {
UpdateMember(Member),
}

#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, JsonSchema, Debug)]
pub struct PreauthResponse {
pub preauths: u64,
}

#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, JsonSchema, Debug)]
pub struct RewardsResponse {
pub rewards: Coin,
}

#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, JsonSchema, Debug)]
pub struct DelegatedResponse {
pub delegated: Addr,
}

#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, JsonSchema, Debug)]
pub struct HalflifeResponse {
// `None` means the halflife functionality is disabled for this instance.
pub halflife_info: Option<HalflifeInfo>,
}

#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, JsonSchema, Debug)]
pub struct HalflifeInfo {
pub last_halflife: Timestamp,
pub halflife: Duration,
pub next_halflife: Timestamp,
}

#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, JsonSchema, Debug)]
pub struct SlasherResponse {
pub is_slasher: bool,
}

#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, JsonSchema, Debug)]
pub struct ListSlashersResponse {
pub slashers: Vec<String>,
}
Expand Down
6 changes: 3 additions & 3 deletions contracts/tg4-engagement/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use cw_storage_plus::{Item, Map};
use tg_utils::Duration;
pub use tg_utils::{PREAUTH_SLASHING, SLASHERS};

#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, JsonSchema, Debug)]
pub struct Halflife {
/// if set to None then there's no half life
pub halflife: Option<Duration>,
Expand Down Expand Up @@ -37,7 +37,7 @@ pub const SHARES_SHIFT: u8 = 32;

pub const HALFLIFE: Item<Halflife> = Item::new("halflife");

#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, JsonSchema, Debug)]
pub struct Distribution {
/// Tokens can be distributed by this denom.
pub denom: String,
Expand All @@ -51,7 +51,7 @@ pub struct Distribution {
pub withdrawable_total: Uint128,
}

#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, JsonSchema, Debug)]
pub struct WithdrawAdjustment {
/// How much points should be added/removed from calculated funds while withdrawal.
pub shares_correction: Int128,
Expand Down
2 changes: 1 addition & 1 deletion contracts/tg4-group/src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::msg::ExecuteMsg;
/// for working with tg4-group contracts.
///
/// It extends Tg4Contract to add the extra calls from tg4-group.
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
pub struct Tg4GroupContract(pub Tg4Contract);

impl Deref for Tg4GroupContract {
Expand Down
6 changes: 3 additions & 3 deletions contracts/tg4-group/src/msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use serde::{Deserialize, Serialize};

use tg4::Member;

#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, JsonSchema, Debug)]
#[serde(rename_all = "snake_case")]
pub struct InstantiateMsg {
/// The admin is the only account that can update the group state.
Expand All @@ -12,7 +12,7 @@ pub struct InstantiateMsg {
pub members: Vec<Member>,
}

#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, JsonSchema, Debug)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
/// Change the admin
Expand All @@ -29,7 +29,7 @@ pub enum ExecuteMsg {
RemoveHook { addr: String },
}

#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, JsonSchema, Debug)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
/// Return AdminResponse
Expand Down
14 changes: 7 additions & 7 deletions contracts/tg4-mixer/src/msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use tg4::{Member, MemberChangedHookMsg};
use crate::error::ContractError;
use crate::functions::{AlgebraicSigmoid, GeometricMean, PoEFunction, Sigmoid, SigmoidSqrt};

#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, JsonSchema, Debug)]
pub struct InstantiateMsg {
/// One of the groups we feed to the mixer function
pub left_group: String,
Expand All @@ -23,7 +23,7 @@ pub struct InstantiateMsg {
pub function_type: PoEFunctionType,
}

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum PoEFunctionType {
/// GeometricMean returns the geometric mean of staked amount and engagement points
Expand Down Expand Up @@ -70,7 +70,7 @@ impl PoEFunctionType {
}
}

#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, JsonSchema, Debug)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
/// This handles a callback from one of the linked groups
Expand All @@ -87,7 +87,7 @@ pub enum ExecuteMsg {
Slash { addr: String, portion: StdDecimal },
}

#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, JsonSchema, Debug)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
/// Return TotalPointsResponse
Expand Down Expand Up @@ -127,18 +127,18 @@ pub enum QueryMsg {
}

/// Return the two groups we are listening to
#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, JsonSchema, Debug)]
pub struct GroupsResponse {
pub left: String,
pub right: String,
}

#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, JsonSchema, Debug)]
pub struct PreauthResponse {
pub preauths_hooks: u64,
}

#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, JsonSchema, Debug)]
pub struct MixerFunctionResponse {
pub points: u64,
}
2 changes: 1 addition & 1 deletion contracts/tg4-mixer/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use tg4::Tg4Contract;

pub const POE_FUNCTION_TYPE: Item<PoEFunctionType> = Item::new("poe-function-type");

#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, Debug)]
pub struct Groups {
pub left: Tg4Contract,
pub right: Tg4Contract,
Expand Down
2 changes: 1 addition & 1 deletion contracts/tg4-stake/src/claim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use tg_utils::Expiration;
const MAX_LIMIT: u32 = 100;
const DEFAULT_LIMIT: u32 = 30;

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
pub struct Claim {
/// Address owning the claim
pub addr: Addr,
Expand Down
16 changes: 8 additions & 8 deletions contracts/tg4-stake/src/msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const fn default_auto_return_limit() -> u64 {
20
}

#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, JsonSchema, Debug)]
pub struct InstantiateMsg {
/// Denom of the token to stake
pub denom: String,
Expand All @@ -33,7 +33,7 @@ pub struct InstantiateMsg {
pub auto_return_limit: u64,
}

#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, JsonSchema, Debug)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
/// Bond will bond all staking tokens sent with the message and update membership points.
Expand Down Expand Up @@ -66,7 +66,7 @@ pub enum ExecuteMsg {
},
}

#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, JsonSchema, Debug)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
/// Returns config
Expand Down Expand Up @@ -114,28 +114,28 @@ pub enum QueryMsg {
ListSlashers {},
}

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
pub struct StakedResponse {
pub liquid: Coin,
pub vesting: Coin,
}

#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, JsonSchema, Debug)]
pub struct PreauthResponse {
pub preauths_hooks: u64,
}

#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, JsonSchema, Debug)]
pub struct UnbondingPeriodResponse {
pub unbonding_period: Duration,
}

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
pub struct ClaimsResponse {
pub claims: Vec<Claim>,
}

#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, JsonSchema, Debug)]
#[serde(rename_all = "snake_case")]
pub struct MigrateMsg {
pub tokens_per_point: Option<Uint128>,
Expand Down
2 changes: 1 addition & 1 deletion contracts/tg4-stake/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub fn claims() -> Claims<'static> {
Claims::new("claims", "claims__release")
}

#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, JsonSchema, Debug)]
pub struct Config {
/// denom of the token to stake
pub denom: String,
Expand Down
8 changes: 4 additions & 4 deletions contracts/tgrade-community-pool/src/msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use tg3::Vote;

use tg_voting_contract::state::VotingRules;

#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, JsonSchema, Debug)]
#[serde(rename_all = "snake_case")]
pub struct InstantiateMsg {
pub rules: VotingRules,
Expand All @@ -15,7 +15,7 @@ pub struct InstantiateMsg {
}

/// The type of proposal to vote on
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum Proposal {
/// Proposal to send some tokens from community pool contract to given address
Expand All @@ -29,7 +29,7 @@ pub enum Proposal {
Text {},
}

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
Propose {
Expand Down Expand Up @@ -57,7 +57,7 @@ pub enum ExecuteMsg {
}

// We can also add this as a tg3 extension
#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, JsonSchema, Debug)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
/// Return VotingRules
Expand Down
8 changes: 4 additions & 4 deletions contracts/tgrade-gov-reflect/src/msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ use serde::{Deserialize, Serialize};
use tg_bindings::{GovProposal, TgradeMsg};

/// Creator is owner and can reflect anything
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
pub struct InstantiateMsg {}

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
Execute {
Expand All @@ -20,13 +20,13 @@ pub enum ExecuteMsg {
},
}

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
Owner {},
}

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
pub struct OwnerResponse {
pub owner: String,
}
2 changes: 1 addition & 1 deletion contracts/tgrade-gov-reflect/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize};
use cosmwasm_std::Addr;
use cw_storage_plus::Item;

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
pub struct Config {
pub owner: Addr,
}
Expand Down

0 comments on commit c8134a7

Please sign in to comment.