Closed jsdw closed 2 months ago
In the end I went for a pattern like:
mod trait concrete type static type dynamic type -------------------------------------------------------------------------------------- constants Address DefaultAddress<ReturnTy> StaticAddress<..> DynamicAddress custom_values Address - StaticAddress<..> str storage Address DefaultAddress<K,R,F,D,I> StaticAddress<..> DynamicAddress<K> runtime_api Payload DefaultPayload<Args,Ret> StaticPayload<..> DynamicPayload tx Payload DefaultPayload<CallData> StaticPayload<..> DynamicPayload
Where the static and dynamic types are mostly just aliases to the DefaultX concrete type.
DefaultX
In the end I went for a pattern like:
Where the static and dynamic types are mostly just aliases to the
DefaultX
concrete type.