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
As in the title - it would be nice to be able to substitute types when generating API via codegen.
0.26.0 release changed, among many things, what AccountId32 type is: previously it was subxt::ext::sp_core::crypto::AccountId32 and now it's subxt::utils::AccountId32. Even when re-exporting sp_core and sp_runtime these types will remain the same - subxt::utils::AccountId32. It would be nice either opt-out from the default substitutions (from the CLI) or override it.
EDIT: Alternatively, we could introduce an argument --substrate-impl (to follow the feature from base subxt) that would use sp_core::* types automatically.
The text was updated successfully, but these errors were encountered:
Interesting; yeah it def makes sense to expose the substitute type stuff in codegen! Ideally we'd expose the full power of the substitute API also and allow for generics to be substituted too. The --derive-for-type flag accepts something like path::to::TypeName=SomeDerive, so I'd be inclined to go for--substitute-type path::to::TypeName<MaybeGenerics>=MySubstituteType<MaybeGenerics>
As in the title - it would be nice to be able to substitute types when generating API via
codegen
.0.26.0
release changed, among many things, whatAccountId32
type is: previously it wassubxt::ext::sp_core::crypto::AccountId32
and now it'ssubxt::utils::AccountId32
. Even when re-exportingsp_core
andsp_runtime
these types will remain the same -subxt::utils::AccountId32
. It would be nice either opt-out from the default substitutions (from the CLI) or override it.The UX could be:
EDIT: Alternatively, we could introduce an argument
--substrate-impl
(to follow the feature from basesubxt
) that would usesp_core::*
types automatically.The text was updated successfully, but these errors were encountered: