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

Migrate to v0.11.0 #113

Merged
merged 36 commits into from
Oct 10, 2020
Merged

Migrate to v0.11.0 #113

merged 36 commits into from
Oct 10, 2020

Conversation

ethanfrey
Copy link
Member

@ethanfrey ethanfrey commented Oct 10, 2020

Closes #96

Making a PR for Mauro, including my work (previously merged) as well.

Updates all contracts to cosmwasm v0.11.0

@maurolacy
Copy link
Contributor

I suggest we "cross-review" this quickly once more, before merging it. Or are you OK with merging it directly?

@@ -754,21 +771,21 @@ mod tests {
// fake a reinvestment (this must be sent by the contract itself)
// after this, we see 1000 issues and 1500 bonded (and a price of 1.5)
let rebond_msg = HandleMsg::_BondAllTokens {};
let env = mock_env(&contract_addr, &[]);
let info = mock_info(MOCK_CONTRACT_ADDR, &[]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice.

Copy link
Contributor

@maurolacy maurolacy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good to me.

@@ -450,19 +484,20 @@ fn query_all_approvals<S: Storage, A: Api, Q: Querier>(

let res: StdResult<Vec<_>> = operators_read(&deps.storage, &owner_raw)
.range(start.as_deref(), None, Order::Ascending)
.filter(|r| include_expired || r.is_err() || !r.as_ref().unwrap().1.is_expired(&env.block))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Including errors just in case... shouldn't happen, but makes sense.

let mut late_env = mock_env();
late_env.block.height = 1234568; //expired
let res = query_all_approvals(&deps, late_env, "person".into(), false, None, None).unwrap();
assert_eq!(0, res.operators.len());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. We can add exhaustive test cases later.

@ethanfrey
Copy link
Member Author

Yeah, happy if we both do one more review on this before merging. Looks like you already did I will by Monday

Copy link
Member Author

@ethanfrey ethanfrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I will do a bit of cleanup before merge

contracts/cw20-base/Cargo.toml Outdated Show resolved Hide resolved
contracts/cw20-base/src/allowances.rs Outdated Show resolved Hide resolved
contracts/cw20-base/src/contract.rs Outdated Show resolved Hide resolved
contracts/cw20-base/src/enumerable.rs Outdated Show resolved Hide resolved
contracts/cw20-escrow/src/contract.rs Outdated Show resolved Hide resolved
contracts/cw20-escrow/src/contract.rs Outdated Show resolved Hide resolved
contracts/cw20-escrow/src/contract.rs Outdated Show resolved Hide resolved
@ethanfrey ethanfrey merged commit e48dec7 into master Oct 10, 2020
@ethanfrey ethanfrey deleted the migrate-to-v0.11.0-alpha4 branch October 10, 2020 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate contracts to v0.11
3 participants