Hello there,
In this CW20 version version = "0.2" we used byte string as a key for rhis state.
const TOKEN_INFO_KEY: &[u8] = b"token_info";
In the new version of CW20 version = "0.7.0", however, as we use storage_key.as_bytes() for Item, the key that we use here is not the identical as the previous key.
pub const TOKEN_INFO: Item<TokenInfo> = Item::new("token_info");
For migrating the contract to this new version, we have the problem of not having the same key.
error: 'rpc error: code = Unknown desc = cw20_base::state::TokenInfo not found: contract query failed'
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?
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_INFOkey or can we have it compatible with previous versions?