File tree Expand file tree Collapse file tree 5 files changed +16
-10
lines changed
contracts/hydro/src/migration Expand file tree Collapse file tree 5 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ compile-inner:
34
34
cosmwasm/optimizer:0.16.0
35
35
36
36
schema :
37
- # to install ts tooling see here: https://docs.cosmology.zone /ts-codegen
37
+ # to install TS tooling see here: https://docs.hyperweb.io /ts-codegen
38
38
39
39
cd contracts/hydro && cargo run --bin hydro_schema
40
40
cd contracts/tribute && cargo run --bin tribute_schema
Original file line number Diff line number Diff line change 1
1
872843538f64fddbdb63f238270df8bdeb7b433193973dba80303821f3ce1d52 dao_voting_adapter.wasm
2
2
a1b2f7f0b77ca19d092bb70e2777f022f9e38326dfe8e70a03ac4571b407faf9 gatekeeper.wasm
3
- 83872900a62b7f50d236a3c6040d27899df520d453c2ab8fd7254bbec9de2f7f hydro.wasm
3
+ 1072947a96908c2d13b2a1dadfc7d781e1690960ba3582934af78eb8fc5697e4 hydro.wasm
4
4
76c72dcddf59a7d9dcd7d56da7367ff926554eac34b465fd580317fd9dbfd628 st_token_info_provider.wasm
5
5
f92f2dc9fd5a684a7fa44f7f79629e5f10cbc1ab1bab4c82775ba538e8bad097 tribute.wasm
Original file line number Diff line number Diff line change @@ -43,17 +43,23 @@ pub fn migrate(
43
43
msg : MigrateMsgV3_2_0 ,
44
44
) -> Result < Response < NeutronMsg > , ContractError > {
45
45
check_contract_version ( deps. storage , CONTRACT_VERSION_V3_1_1 ) ?;
46
- pause_contract_before_migration ( & mut deps, & env) ?;
47
46
48
47
let response = match msg {
48
+ // Constants must be migrated first in order for contract pausing not to break the state!
49
49
MigrateMsgV3_2_0 :: MigrateToV3_2_0 { } => migrate_v3_1_1_to_unreleased ( & mut deps) ,
50
- MigrateMsgV3_2_0 :: MigrateLocksV1ToV2 { start, limit } => migrate_locks_batch (
51
- & mut deps,
52
- env. block . height ,
53
- start. unwrap_or ( 0 ) ,
54
- limit. unwrap_or ( 50 ) ,
55
- ) ,
50
+ MigrateMsgV3_2_0 :: MigrateLocksV1ToV2 { start, limit } => {
51
+ pause_contract_before_migration ( & mut deps, & env) ?;
52
+
53
+ migrate_locks_batch (
54
+ & mut deps,
55
+ env. block . height ,
56
+ start. unwrap_or ( 0 ) ,
57
+ limit. unwrap_or ( 50 ) ,
58
+ )
59
+ }
56
60
MigrateMsgV3_2_0 :: MigrateVotesV1ToV2 { start, limit } => {
61
+ pause_contract_before_migration ( & mut deps, & env) ?;
62
+
57
63
migrate_votes_batch ( & mut deps, start. unwrap_or ( 0 ) , limit. unwrap_or ( 50 ) )
58
64
}
59
65
} ?;
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ pub fn migrate_v3_1_1_to_unreleased(
67
67
& TokenInfoProvider :: LSM ( lsm_token_info_provider) ,
68
68
) ?;
69
69
70
- Ok ( Response :: new ( ) . add_attribute ( "action" , "migrate_v3_1_1_to_unreleased " ) )
70
+ Ok ( Response :: new ( ) . add_attribute ( "action" , "migrate_v3_1_1_to_v3_2_0 " ) )
71
71
}
72
72
73
73
// Migrate locks from V1 to V2 storage structures
You can’t perform that action at this time.
0 commit comments