How to launch a Subnet
Concise documentation on how to create a subnet, its various parameters, effects, and post-creation status.
Requirements
You have to meet these requirements to create a subnet effectively:
You must have a valid Dark Matter NFT.
The Dark Matter NFT contract must be whitelisted.
The price calculator must be whitelisted.
You must have enough $SKY tokens to pay the required fees.
Creating a Subnet
To create a subnet, call the createSubnet
function in the SubnetClusterA
contract. This function requires several parameters:
Parameters
_nftAndContract
: An array containing:Index 0: The ID of the Dark Matter NFT.
Index 1: The contract address of the Dark Matter NFT.
_subnetAttributes
: A struct containing various subnet attributes:subnetLocalDAO
: Address of the subnet's local DAO.subnetType
: Type of subnet (e.g., public, private, sovereign).subnetStatusListed
: Initial status of the subnet (1 for waiting, 2 for active).priceCalculator
: Address of the price calculator contract.otherAttributes
: Array for additional attributesmaxClusters
: Maximum number of clusters allowed (must be <= 1000).subnetName
: Name of the subnet.dnsip
: DNS/IP of the subnet.stackFeesReqd
: STACK fees required for clusters to join.
_whitelistedClusters
: Array of addresses for whitelisted clusters._computePrices
: Array of initial prices for different DePIN resource types.
Note: Ensure all parameters are correctly set before calling the function, as some attributes may require additional permissions to change later.
Effects
Calling the function does this:
Locks the Dark Matter NFT in the contract.
Transfers required $SKY fees to the global DAO.
Creates special roles for the SubnetDAO.
Sets up initial subnet attributes and DePIN resource prices.
Whitelists the provided cluster addresses.
Post-Creation
After creation, the subnet is in a waiting or active state (depending on subnetStatusListed
). The SubnetDAO can further modify attributes, activate or deactivate the subnet, and manage various aspects of the subnet using other functions in the contract.
Last updated