Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to cosmwasm 1.0-beta and cw-plus 0.10 #53

Merged
merged 9 commits into from
Oct 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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