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

added pre-propose v2.4.1 migration tests #856

Merged
merged 1 commit into from
Jul 22, 2024
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
292 changes: 233 additions & 59 deletions Cargo.lock

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,12 @@ voting-v1 = { package = "dao-voting", version = "0.1.0" }
# v2.4.1 dependencies. used for state migrations.
cw-denom-v241 = { package = "cw-denom", version = "2.4.1" }
dao-dao-core-v241 = { package = "dao-dao-core", version = "2.4.1" }
dao-interface-v241 = { package = "dao-interface", version = "2.4.1" }
dao-pre-propose-base-v241 = { package = "dao-pre-propose-base", version = "2.4.1" }
dao-pre-propose-approval-single-v241 = { package = "dao-pre-propose-approval-single", version = "2.4.1" }
dao-pre-propose-multiple-v241 = { package = "dao-pre-propose-multiple", version = "2.4.1" }
dao-pre-propose-single-v241 = { package = "dao-pre-propose-single", version = "2.4.1" }
dao-proposal-multiple-v241 = { package = "dao-proposal-multiple", version = "2.4.1" }
dao-proposal-single-v241 = { package = "dao-proposal-single", version = "2.4.1" }
dao-voting-cw4-v241 = { package = "dao-voting-cw4", version = "2.4.1" }
dao-voting-v241 = { package = "dao-voting", version = "2.4.1" }
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ dao-interface = { workspace = true }
cw-denom = { workspace = true }
cw-multi-test = { workspace = true }
cw-utils = { workspace = true }
cw4 = { workspace = true }
cw4-group = { workspace = true }
cw20 = { workspace = true }
cw20-base = { workspace = true }
Expand All @@ -41,3 +42,11 @@ dao-voting = { workspace = true }
dao-voting-cw4 = { workspace = true }
dao-voting-cw20-staked = { workspace = true }
dao-proposal-single = { workspace = true }

# v2.4.1 migration
dao-dao-core-v241 = { workspace = true }
dao-interface-v241 = { workspace = true }
dao-pre-propose-approval-single-v241 = { workspace = true }
dao-proposal-single-v241 = { workspace = true }
dao-voting-cw4-v241 = { workspace = true }
dao-voting-v241 = { workspace = true }
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,8 @@ pub fn query(deps: Deps, env: Env, msg: QueryMsg) -> StdResult<Binary> {
}

#[cfg_attr(not(feature = "library"), entry_point)]
pub fn migrate(deps: DepsMut, _env: Env, msg: MigrateMsg) -> Result<Response, PreProposeError> {
PrePropose::default().migrate(deps, msg)
pub fn migrate(mut deps: DepsMut, _env: Env, msg: MigrateMsg) -> Result<Response, PreProposeError> {
let res = PrePropose::default().migrate(deps.branch(), msg);
set_contract_version(deps.storage, CONTRACT_NAME, CONTRACT_VERSION)?;
res
}
Loading
Loading