Help needed on wasm dependencies when upgrading to cosmwasm-std v1.1.0 #186
Replies: 5 comments
-
In my opinion, to go from 0.16 to version 1.0 or higher, we have to do it. However, there are some doubts about the need for terra-cosmwasm. Stargate allows using all sdk query and msg without CustomQuery and CustomMsg(If the action is the same). It might be worth thinking about this later. |
Beta Was this translation helpful? Give feedback.
-
Oh, so you mean that we can just refactor entirely terra classic x/wasm to the same version as Luna2. DApps won't have any problem with that? |
Beta Was this translation helpful? Give feedback.
-
We'll have to look into it some more, but I think it's possible. Existing dApps may have a lot of confusion, but I don't think there will be much confusion if we support using terra-cosmwasm's existing interface. |
Beta Was this translation helpful? Give feedback.
-
@nghuyenthevinh2000: Did you check migration documents for 0.16 -> 1.0.0? https://github.com/CosmWasm/cosmwasm/blob/main/MIGRATING.md I am pretty sure that's how it is supposed to be. As I said: I changed all these dependencies as well when I made my initial PR on that matter - but I changed the deps locally and build the testing contract (bindings_tester.wasm and maker.wasm) by referencing these local builds. I did that because the testing contracts pull their dependencies from rust registry for terra-cosmwasm - which is owned by TFL. I am pretty sure I have the modified deps still lying around somewhere. I can push them somewhere if you like? |
Beta Was this translation helpful? Give feedback.
-
sure, can you push any missing pieces to my pr |
Beta Was this translation helpful? Give feedback.
-
I am changing so much in terra cosmwasm contracts that I don’t feel confident enough now
One point of concern for me is this:
https://github.com/classic-terra/terra-cosmwasm/blob/v3.0.0-proposal/packages/terra-cosmwasm/src/querier.rs#L11
initially, it was
querier: &'a QuerierWrapper<'a>
This one will use default struct of Empty for contracts that don’t set a custom query. But in our case, we do have a custom query called TerraQueryWrapper. The type here is important because it will cast C in QueryRequest.
Somehow, in initial version, Empty and TerraQueryWrapper still accept each others.
But when I upgrade to v1.1.0, they don’t accept each others anymore. This led me to change the above line to
querier: &'a QuerierWrapper<'a, TerraQueryWrapper>
However, it changes whole Deps of all related smart contract files since Deps is pretty much everywhere and it contains querier.
With the amount of changing Deps to
Deps<TerraQueryWrapper>
in all smart contract test files, I don’t feel confident enough to continue changing. I don’t have any idea of what it will break in current smart contracts deployed on Terra@JoowonYun can I have your opinion on this?
Beta Was this translation helpful? Give feedback.
All reactions