File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11[package ]
22name = " cw20-taxed"
3- version = " 1.1.0+taxed003 "
3+ version = " 1.1.0+taxed004 "
44authors = [" Till Ziegler <tz@schoeneweide.tk>" ]
55edition = " 2021"
66description = " Basic implementation of a CosmWasm-20 compliant token with blacklist tax"
Original file line number Diff line number Diff line change @@ -83,6 +83,11 @@ pub mod migrate_v1 {
8383 Ok ( version. contract == CONTRACT_NAME_TERRASWAP && version. version == "0.0.0" )
8484 }
8585
86+ pub fn is_cw_base_v0 ( store : & dyn Storage ) -> StdResult < bool > {
87+ let version = get_contract_version ( store) ?;
88+ Ok ( version. contract == "crates.io:cw20-base" && version. version == "0.0.0" )
89+ }
90+
8691 pub fn is_cw_base_1_0_1 ( store : & dyn Storage ) -> StdResult < bool > {
8792 let version = get_contract_version ( store) ?;
8893 Ok ( version. contract == "crates.io:cw20-base" && version. version == "1.0.1" )
@@ -121,6 +126,11 @@ pub mod migrate_v1 {
121126 set_contract_version ( store, CONTRACT_NAME , "1.1.0" ) ?;
122127 return Ok ( ( ) ) ;
123128
129+ // this is for terraswap tokens - normalize to v1.1.0
130+ } else if is_cw_base_v0 ( store) ? {
131+ set_contract_version ( store, CONTRACT_NAME , "1.1.0" ) ?;
132+ return Ok ( ( ) ) ;
133+
124134 // no known migration path -play safe and throw
125135 } else {
126136 return Err ( StdError :: generic_err (
You can’t perform that action at this time.
0 commit comments