Generate Extension - ajuna-network/Polkadot.Unity.SDK GitHub Wiki

Generating the Extension project for your blockchain, is straightforward you can follow the guide under Substrate .NET Toolchain or follow the step by step tutorial following.

Installing the template

Install our .NET template with the following command:

dotnet new install Substrate.DotNet.Template

Scaffolding a project

Using a terminal of your choice, create a new directory for your project and execute the following command in that directory:

create a new solution

dotnet new sln
dotnet new substrate \
   --sdk_version x.y.z \
   --rest_service PROJECTNAME.RestService \
   --net_api PROJECTNAME.NetApiExt \
   --rest_client PROJECTNAME.RestClient \
   --metadata_websocket NODEURL \
   --generate_openapi_documentation false \
   --force \
   --allow-scripts yes

image

which generates a new solution and a couple of .NET projects in your project directory. (A description for all command parameters can be found here)

.
├─── .substrate
├─── .config
├─── PROJECTNAME.NetApiExt
├─── PROJECTNAME.RestClient
├─── PROJECTNAME.RestClient.Mockup
├─── PROJECTNAME.RestClient.Test
├─── PROJECTNAME.RestService