core icon indicating copy to clipboard operation
core copied to clipboard

[BUG] Astroport Smart Contract Update

Open LuncBurner opened this issue 2 years ago • 9 comments

Describe the bug Astroport has stated that they will not update their existing smart contract to support parity. An solution to provide the ability for end-users to swap LUNC to and from USTC is required.

LuncBurner avatar Jun 16 '23 02:06 LuncBurner

Interesting. It remind me to start thinking strategically about how to deal with existing dApps in the future. What should we do with native tokens left in dApp wallets?

inon-man avatar Jun 17 '23 21:06 inon-man

@inon-man this is definitely a philosophical question, and I think we'll need to set up a separate issue as a discussion thread for it -- with respect to native tokens left in dApp wallets. Another example, what should be done with the value locked in MIR? Both are really good discussion items.

LuncBurner avatar Jun 20 '23 04:06 LuncBurner

https://github.com/astroport-fi/astroport-core/tree/terra_classic

nghuyenthevinh2000 avatar Jun 20 '23 11:06 nghuyenthevinh2000

@inon-man this is definitely a philosophical question, and I think we'll need to set up a separate issue as a discussion thread for it -- with respect to native tokens left in dApp wallets. Another example, what should be done with the value locked in MIR? Both are really good discussion items.

Agreed. I think the community needs a debate on this.

inon-man avatar Jun 21 '23 03:06 inon-man

all syntax errors are cleared, moving on to unit testing

nghuyenthevinh2000 avatar Jun 29 '23 11:06 nghuyenthevinh2000

based on this deprecation warning: https://github.com/classic-terra/cw-storage-plus/blob/38e23673958b5e56f2138ca9c1e893cfd4d90034/src/keys.rs#L342

maybe, there is a chance that u64 and U64Key is the same. Nope, it can't be the same.

However, there is a version that matches with current wasmd which has legacy supports for U64Key: cw-storage-plus = "0.11.1"

Testing about this specific case at: https://github.com/nghuyenthevinh2000/contract-playground/tree/main/contracts/u64key-migrate

nghuyenthevinh2000 avatar Jul 04 '23 08:07 nghuyenthevinh2000

Looks like decent progress, I'm going to make an issue here that sort of just like collects whining from the community and let's go from there

faddat avatar Jul 05 '23 17:07 faddat

U64Key and u64 is compatible, tests have been done with following scenario:

  1. instantiate old contract
  2. query from storage with U64Key
  3. migrate
  4. query from storage with u64
  5. execute on storage with u64
  6. query from storage with u64
Screenshot 2023-07-07 at 10 28 12

nghuyenthevinh2000 avatar Jul 07 '23 03:07 nghuyenthevinh2000

Which sounds awesome!

fragwuerdig avatar Jul 07 '23 04:07 fragwuerdig