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
This is needed for full cw-orch codegen support #374 but is actually independent of cw-orch and could be a useful helper in any case. In order to explain what I request, I will use the cw20_base contract from the sylvia repo as an example. If we look at cw20_base::contract::sv::ContractExecMsg, the codegen is:
And of course the same for *QueryMsg and *SudoMsg as well. This will allow easier programmatic usage of the concrete dispatched types for those "going under the hood" of Sylvia a bit. Again, cw-orch has this concrete need, but I don't see the issue of adding this code in general, not under any feature flag. An implementation to generate the last item could be found in #375. Generating the From for the interface messages was harder and lead to the stack overflow issue.
Note: Requested for the cosmwasm-1.x branch (and ported to / backported from main)
Those impls could be there, but we do not generate them as eventually, those messages should never need to be created directly, the user should create them with #130.
However, executors are not yet implemented, and I believe this would be an easy addition and not harm us in any way. Added to 1.1.0 milestone.
This is needed for full cw-orch codegen support #374 but is actually independent of cw-orch and could be a useful helper in any case. In order to explain what I request, I will use the cw20_base contract from the sylvia repo as an example. If we look at
cw20_base::contract::sv::ContractExecMsg
, the codegen is:Thanks to the regular generation of Sylvia code, this is always equivalent to:
You cannot implement the from on those associated types without the compiler yelling at you about conflicting From implementations. So the second version is much easier to work with. Given that, I would like Sylvia to generate the following implementations:
And of course the same for
*QueryMsg
and*SudoMsg
as well. This will allow easier programmatic usage of the concrete dispatched types for those "going under the hood" of Sylvia a bit. Again,cw-orch
has this concrete need, but I don't see the issue of adding this code in general, not under any feature flag. An implementation to generate the last item could be found in #375. Generating the From for the interface messages was harder and lead to the stack overflow issue.Note: Requested for the
cosmwasm-1.x
branch (and ported to / backported from main)Pinging @jawoznia for your thoughts here
The text was updated successfully, but these errors were encountered: