Skip to content
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

Move some of the multitest generated structures from derive macro to sylvia::multitest #327

Open
kulikthebird opened this issue Mar 14, 2024 · 0 comments
Labels
enhancement New feature or request mt

Comments

@kulikthebird
Copy link
Contributor

Currently the following structures and impls are generated by the derive macro in sylvia-derive/src/multitest.rs:

  • CodeId,
  • InstantiateProxy,
  • impl<Generics> sylvia::cw_multi_test::Contract<#custom_msg, #custom_query> for #contract_name.

From the initial analysis it turns out that we could move them to sylvia::multitest module with a minimal impact on the user's API and potentially significant improvement for readability of sylvia generated code and understandability of the generated code for the user.

It seems that the only derive dependent thing are the generics forwarded to IntantantiateMsg for the purpose of the CodeId::instantiate(field1: Generic1, field2: Generic2,...) method. The mentioned method could be changed to: CodeId::instantiate(instantiate_msg: GenericIntantantiateMsg).

It is possible that more changes will be needed.

@kulikthebird kulikthebird added enhancement New feature or request mt labels Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request mt
Projects
None yet
Development

No branches or pull requests

1 participant