Skip to content

Commit

Permalink
Merge pull request #53 from confio/51-update-comswasm-1-0-0-beta-cwpl…
Browse files Browse the repository at this point in the history
…us-0-10

Update to cosmwasm 1.0-beta and cw-plus 0.10
  • Loading branch information
ueco-jb authored Oct 14, 2021
2 parents a5be916 + de29455 commit bffa83d
Show file tree
Hide file tree
Showing 14 changed files with 164 additions and 120 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ jobs:
- run:
name: Install check_contract
# Uses --debug for compilation speed
command: cargo install --debug --version 0.16.0-rc5 --features iterator --example check_contract -- cosmwasm-vm
command: cargo install --debug --version 1.0.0-beta --features iterator --example check_contract -- cosmwasm-vm
- save_cache:
paths:
- /usr/local/cargo/registry
Expand Down
74 changes: 38 additions & 36 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/dso-token/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "dso-token"
version = "0.1.1"
version = "0.2.0"
authors = ["Ethan Frey <ethanfrey@users.noreply.github.com>"]
edition = "2018"

Expand All @@ -20,19 +20,19 @@ crate-type = ["cdylib", "rlib"]
backtraces = ["cosmwasm-std/backtraces"]

[dependencies]
cosmwasm-std = { version = "0.16.0" }
cw-storage-plus = "0.8.0"
cw20-base = { version = "0.8.0", features = ["library"] }
cw2 = "0.8.0"
cw4 = "0.8.0"
cw20 = "0.8.0"
cosmwasm-std = "=1.0.0-beta"
cw-storage-plus = "=0.10"
cw20-base = { version = "=0.10", features = ["library"] }
cw2 = "=0.10"
cw4 = "=0.10"
cw20 = "=0.10"
schemars = "0.8.1"
serde = { version = "1.0.125", default-features = false, features = ["derive"] }
thiserror = { version = "1.0.24" }

[dev-dependencies]
anyhow = "1"
cosmwasm-schema = { version = "0.16.0" }
cw-multi-test = "0.8.1"
cw4-group = "0.8.0"
cosmwasm-schema = "=1.0.0-beta"
cw-multi-test = "=0.10"
cw4-group = "=0.10"
derivative = "2"
6 changes: 6 additions & 0 deletions contracts/dso-token/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,8 @@ mod tests {
use cw4::{Cw4QueryMsg, MemberListResponse};
use cw_storage_plus::Map;

use std::marker::PhantomData;

const MEMBERS: Map<&Addr, u64> = Map::new(cw4::MEMBERS_KEY);

struct GroupQuerier {
Expand Down Expand Up @@ -514,6 +516,7 @@ mod tests {
storage,
api,
querier,
custom_query_type: PhantomData,
};

BALANCES
Expand Down Expand Up @@ -566,6 +569,7 @@ mod tests {
storage,
api,
querier,
custom_query_type: PhantomData,
};

TOKEN_INFO
Expand Down Expand Up @@ -614,6 +618,7 @@ mod tests {
storage,
api,
querier,
custom_query_type: PhantomData,
};

BALANCES
Expand Down Expand Up @@ -679,6 +684,7 @@ mod tests {
storage: MockStorage::new(),
api: MockApi::default(),
querier: GroupQuerier::new(&whitelist_addr, &[]),
custom_query_type: PhantomData::<Empty>,
};

let info = MessageInfo {
Expand Down
10 changes: 2 additions & 8 deletions contracts/dso-token/src/multitest/suite.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
use cw20_base::msg::InstantiateMarketingInfo;

use cosmwasm_std::testing::{mock_env, MockApi, MockStorage};
use cosmwasm_std::{to_binary, Addr, Binary, Empty, Response, StdError, Uint128};
use cw20::{Cw20Coin, Cw20Contract, Cw20ReceiveMsg, MinterResponse, TokenInfoResponse};
use cw4::{Cw4Contract, Member};
use cw4_group::msg::ExecuteMsg as Cw4ExecuteMsg;
use cw_multi_test::{App, AppResponse, BankKeeper, Contract, ContractWrapper, Executor};
use cw_multi_test::{App, AppResponse, Contract, ContractWrapper, Executor};

use crate::msg::{ExecuteMsg, InstantiateMsg};

Expand Down Expand Up @@ -107,12 +106,7 @@ impl ReceiverContract {
}

fn mock_app() -> App {
let env = mock_env();
let api = MockApi::default();
let bank = BankKeeper::new();
let storage = MockStorage::new();

App::new(api, env.block, bank, storage)
App::default()
}

fn contract_group() -> Box<dyn Contract<Empty>> {
Expand Down
Loading

0 comments on commit bffa83d

Please sign in to comment.