You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When upgrading a complex codebase from 1.5 to 2.0 I spend roughly 1 hour to make it compile but many more hours to make all the tests pass. The biggest issue is the change in the address validation in MockApi which does not allow arbitrary strings anymore. While I still think the change is good in general and new codebases will have an easier life, there are flaws we should address.
mock_info takes a &str address. However, we need a Addr in the caller code and an Addr in MessageInfo. Due to the &str type it is unclear if the input is supposed to contain the full address (it does). Thies leads to a log of mock_info(manager2.as_str(), &[]) which could just be mock_info(&manager2, &[]) if the type was &Addr. (Add message_info and deprecate mock_info #2160)
addr_make cannot be used in DepsMut due to the way the API field is typed. Use case: shared functions like setup_channel(deps.as_mut());
Don't validate validator address in Multitest's .add_validator(api, storage, &block, valoper1) and probably also message delegate implementation. Validator addresses have a different layout than the account addresses. (Don't validate validator addresses cw-multi-test#173)
The text was updated successfully, but these errors were encountered:
When upgrading a complex codebase from 1.5 to 2.0 I spend roughly 1 hour to make it compile but many more hours to make all the tests pass. The biggest issue is the change in the address validation in MockApi which does not allow arbitrary strings anymore. While I still think the change is good in general and new codebases will have an easier life, there are flaws we should address.
mock_info
takes a&str
address. However, we need aAddr
in the caller code and anAddr
inMessageInfo
. Due to the&str
type it is unclear if the input is supposed to contain the full address (it does). Thies leads to a log ofmock_info(manager2.as_str(), &[])
which could just bemock_info(&manager2, &[])
if the type was&Addr
. (Add message_info and deprecate mock_info #2160)addr_make
cannot be used inDepsMut
due to the way the API field is typed. Use case: shared functions likesetup_channel(deps.as_mut());
.add_validator(api, storage, &block, valoper1)
and probably also message delegate implementation. Validator addresses have a different layout than the account addresses. (Don't validate validator addresses cw-multi-test#173)The text was updated successfully, but these errors were encountered: