@@ -4,6 +4,7 @@ use crate::reply::ReplyIds;
44use crate :: state:: {
55 Config , ProvideTmpData , WithdrawTmpData , CONFIG , PROVIDE_TMP_DATA , WITHDRAW_TMP_DATA ,
66} ;
7+ use crate :: utils:: mint_liquidity_token_message;
78use astroport:: asset:: { addr_opt_validate, Asset , AssetInfo , CoinsExt , PairInfo } ;
89use astroport:: common:: LP_SUBDENOM ;
910use astroport:: factory:: PairType ;
@@ -252,20 +253,43 @@ pub fn withdraw_liquidity(
252253}
253254
254255#[ cfg_attr( not( feature = "library" ) , entry_point) ]
255- pub fn migrate ( deps : DepsMut , _env : Env , _msg : Empty ) -> Result < Response , ContractError > {
256+ pub fn migrate ( deps : DepsMut , env : Env , _msg : Empty ) -> Result < Response , ContractError > {
256257 let contract_version = get_contract_version ( deps. storage ) ?;
257258
259+ let mut resp = Response :: new ( ) ;
258260 match contract_version. contract . as_ref ( ) {
259261 CONTRACT_NAME => match contract_version. version . as_ref ( ) {
260262 "1.0.0" => { }
263+ "1.1.0" => {
264+ // Recovering an LP share that was incorrectly burned during supervault freeze period
265+ if env. contract . address
266+ == "neutron1pqnl0035jjeyqadn6sdcl69ahu942e5lkdsardlgcx3pkdy70kss3qu2kg"
267+ {
268+ let config = CONFIG . load ( deps. storage ) ?;
269+
270+ // Proof tx: https://neutron.celat.one/neutron-1/txs/7FCDB63DF69F4AE97CCEBD70E13B73C131A1FA82BB58F5B2669EA85FF242F722
271+ let receiver =
272+ Addr :: unchecked ( "neutron1q647rsfcwrz5cpaj2gmyqxl2z6cw9el474zrrt" ) ;
273+ let recover_lp_amount = Uint128 :: new ( 242452275081 ) ;
274+ let msgs = mint_liquidity_token_message (
275+ deps. querier ,
276+ & config,
277+ & env. contract . address ,
278+ & receiver,
279+ recover_lp_amount,
280+ false ,
281+ ) ?;
282+ resp = resp. add_messages ( msgs) ;
283+ }
284+ }
261285 _ => return Err ( ContractError :: MigrationError { } ) ,
262286 } ,
263287 _ => return Err ( ContractError :: MigrationError { } ) ,
264288 }
265289
266290 set_contract_version ( deps. storage , CONTRACT_NAME , CONTRACT_VERSION ) ?;
267291
268- Ok ( Response :: new ( )
292+ Ok ( resp
269293 . add_attribute ( "previous_contract_name" , & contract_version. contract )
270294 . add_attribute ( "previous_contract_version" , & contract_version. version )
271295 . add_attribute ( "new_contract_name" , CONTRACT_NAME )
0 commit comments