Skip to content

Instantly share code, notes, and snippets.

@suenot
Last active August 7, 2024 18:20
Show Gist options
  • Save suenot/86b9fdab62c21fdc680a10cf9e832e23 to your computer and use it in GitHub Desktop.
Save suenot/86b9fdab62c21fdc680a10cf9e832e23 to your computer and use it in GitHub Desktop.
create_faculty_ru.md

Создание факультета spacepussy (Graph Verse)

execute contract:

{ "register_network": { } }

coins to transfer:

[ { "denom": "pussy", "amount": "10000000000" } ]

После нажимаем "execute contract".

  • Идем в список факультетов и находим наш факультет. netuid будет равен его порядок сверху начиная с 1. Например, для факультета "rust" это 10.

  • В строке поиска вводим название будущего факультета. Копируем hash. Его будем использовать как particle.

  • Там же создаем киберлинки с description, logo.

  • Заполняем параметры для факультета (меняем ниже хэши particle, description, logo на свои)

Либо просто вставляем query запроса

execute contract:

{
  "sudo_set_subnet_metadata":{
    "metadata":{
      "description": "QmZrgv8j87sEUvtHCGdorLH1ZocHVuQckPKNjfXeqPRGpH"
      "extra": " "
      "logo": "QmNyp9xoGBRZsz1AWP8wobYVZCTSzGMSdVUS2tkxM3tJuv"
      "particle": "QmdiWPU6py2HcMMn93SUZg8xQkemQZWm4ZyHb2Cvsay2hv"
      "name": "rust"
      "types": "graph"
    }
    "netuid": 10
  }
}

либо качаем https://github.com/cybercongress/cybernet/blob/main/schema/raw/execute.json. Добавляем этот json как интерфейс к контракту. После находим "sudo_set_subnet_metadata" и заполняем поля. Вызываем метод. Также там лежит Query json: https://github.com/cybercongress/cybernet/blob/main/schema/raw/query.json (он нам сейчас не нужен)

Другие инструкции:

@suenot
Copy link
Author

suenot commented Aug 7, 2024

Creating a Faculty in Graph Verse

Execute contract:

{ "register_network": { } }

Coins to transfer:

[ { "denom": "pussy", "amount": "10000000000" } ]

After filling in the fields, click "execute contract."

  • Find Your Faculty in the List: Once executed, navigate to the list of faculties and locate your newly created faculty. The netuid will correspond to its position from the top, starting from 1. For instance, if the "rust" faculty is 10th on the list, its netuid is 10.

  • Search for the Faculty Name: In the search bar, enter the name of your intended faculty. Copy the hash that appears—this will be used as the "particle".

  • Create Cyberlinks: While on the same page, create cyberlinks for "description" and "logo".

  • Set Faculty Parameters: Fill in the parameters for the faculty (replace the hash values for particle, description, and logo with your own):

Alternatively, you can simply insert the following query request:

execute contract:

{
  "sudo_set_subnet_metadata":{
    "metadata":{
      "description": "QmZrgv8j87sEUvtHCGdorLH1ZocHVuQckPKNjfXeqPRGpH"
      "extra": " "
      "logo": "QmNyp9xoGBRZsz1AWP8wobYVZCTSzGMSdVUS2tkxM3tJuv"
      "particle": "QmdiWPU6py2HcMMn93SUZg8xQkemQZWm4ZyHb2Cvsay2hv"
      "name": "rust"
      "types": "graph"
    }
    "netuid": 10
  }
}

Alternative Method:
- Download the JSON file from this link: https://github.com/cybercongress/cybernet/blob/main/schema/raw/execute.json.
- Add this JSON as an interface to the contract.
- Find "sudo_set_subnet_metadata" within the JSON and fill in the fields accordingly.

Other Instructions:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment