-
Notifications
You must be signed in to change notification settings - Fork 467
Description
Environmental Types
Currently pdsl_core
does not provide environmental types, for example what type an address has.
Having this information is very important for contract writers.
However, there are certain limitations and problems connected with making those environmental type definitions generic and chain agnostic.
We do want this information as part of psdl_core
or similar.
This issue is about finding a proper, user friendly, efficient and possibly chain agnostic design for this feature.
Design 1: Bound to Environment
An implemention of pdsl_core::env::Env
could be required to provide this information.
For this the Env
trait should be extended for those type definitions or require an implementation of another trait that provides them.
We use this issue also to track which type definitions we initially want to provide for users.
The downside to this approach is that making the types bound to an environment implementation would restrict pDSL to be used only from certain predefined environments. This should be sufficient as a start, since we could for example provide an environment for testing purposes, for SRML contracts on substrate, for pwasm and for ewasm just to name a few.