-
Notifications
You must be signed in to change notification settings - Fork 350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cw20 state key compatibity with previous versions #346
Comments
You are referring to cw20-base, not cw20, right? In terms of "compatibility with legacy", I see no need to force our data structures to be the same. Rather, what is missing is a I would be happy to accept such a PR on the 0.7 branch, so it can update from 0.2 |
What I meant was cw20 base. We had other issues as well regarding the compatibility with the previous versions (Using |
I don't see a good reason to make a new contract byte-for-byte compatible with an old contract. This may take quite some gas (1 time), but unless you have 10000+ token holders, I think it is quite worth it. (read, write, delete) = ~5000 gas per entry. |
To be more specific, we would not be able to handle migration while migrating the code itself which is a specific case with terra migration from Columbus-4 to Columbus-5; that's why we had to publish a specific version of the cw20 base that is compatible with the previous version. We cannot have the migration handle to handle this situation. I would appreciate it if you could mention the problem that might happen in case we keep the compatibility with the previous versions. |
It's not bad, it is more a lot of maintenance if you want to follow cw20 changes (but I guess there are not too many). I see your situation is unique. What makes sense to me is:
|
Thank you for the reply and your comments on this issue. We will follow this path to get back to the current version of cw20 to avoid future discrepancies. |
I think you guys are handling this and no work is needed in the core lib. |
Hello there,
In this CW20 version
version = "0.2"
we used byte string as a key for rhis state.In the new version of CW20
version = "0.7.0"
, however, as we usestorage_key.as_bytes()
forItem
, the key that we use here is not the identical as the previous key.For migrating the contract to this new version, we have the problem of not having the same key.
We must put the length bytes at the first for compatibility with the legacy singleton store.
Is this new key would be the new format for the
TOKEN_INFO
key or can we have it compatible with previous versions?The text was updated successfully, but these errors were encountered: