CosmWasm / sylvia

CosmWasm smart contract framework
Apache License 2.0
90 stars 14 forks source link

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

Open kulikthebird opened 5 months ago

kulikthebird commented 5 months ago

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

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.