The Contracts SDK has access to all custom Smart Contract types and Supervisor Contract types available in the Contract API. Different versions of the Contracts language library have access to different version types.
When using custom types in Contract unit tests you must:
Import these from the same Contracts API version as the Contract code that is being tested
Use the same version unit test base class as the Contracts API in the Contracts code
The custom types registry
As custom types in the Contracts SDK also include type checking, the types registry must be initialised before any custom type classes can be used. This is done automatically in all the Contracts unit tests base classes. However, if you want to import and initialise any of the types without the base classes, you must initialise the types registry manually: