cubeRegister new Chain

circle-check

Here are the steps needed to make to add a new chain. Please, do not skip any of them!

Add the chain info inside of the chains.json file:

{
    "name": "Chain name",
    "websocket": "wss://yourendpoint.io"
}

Afterwards, you can run the following script:

./generator.sh <Chain name>

Before running the script, you might need to install the following:

circle-info

The script is designed to be run on linux. Use WSL or update the script to be compatible with your OS.

Register the chain info

Go to PlutoFramework/Constants/Endpoints.cs.

Add the EndpointEnum:

public enum EndpointEnum
{
    Polkadot,
    Kusama,
    // ...
    YourChain
}

Add the genesis hash to the HashToKey Dictionary:

Add the your chain details to GetEndpointDictionary:

Add the generated chain .csproj to your app solution:

Solution -> Add -> Existing Project...

Add the reference to your chain. Select PlutoFramework.Model -> Add -> Project Reference... and select your chain project.

PlutoFramework.Model -> Add -> Project Reference...

Now add your chain to the SubstrateClientExt which can be found in PlutoFramework.Model/AjunaExt/SubstrateClientExt.cs:

Lastly, add your chain to the EventsModel which can be found in PlutoFramework.Model/EventsModel.cs:

Last updated