Currently, all the demo projects have very similar hash-like names and share the same logo. This makes testing and presenting on the nns-dapp feel unrealistic. This PR addresses this issue by providing more diverse demo project names and using different logos for each one.
Note:
This approach has a limitation of 2600 demo Snses because:
The token symbol should have a minimum of 3 characters and a maximum of 5.
We add an index-based suffix to the symbols and names when out of bounds, as we have only a 26-entry pool (e.g., token symbol ALF for config_index == 0, ALF1 for config_index == 26).
Add --config_index-offset parameter to both dfx-sns-demo-mksns and dfx-sns-demo-mksns-parallel scripts to make the config_index usage more transparent when these scripts are used together.
After config_index 2599, the token symbol length becomes more than 5 characters.
Changes
Use TOKEN_NAME for Sns names instead of TOKEN_SYMBOL.
Provide an Sns demo config_index to the bin/dfx-sns-config-random.
Replace randomly generated names with those from a predefined list using the provided config_index.
Add AI-generated demo logo image files.
Replace logo.png with the generated logos.
Test
Manually
Create a snapshot and test that new names/logos are used.
Tested the script with different indexes:
Test responses:
./bin/dfx-sns-config-random
Error: --config_index is required
./bin/dfx-sns-config-random --config_index 0
Created an SNS: ALF
name: "Alfa Centauri"
logo: logos/A.png
./bin/dfx-sns-config-random --config_index 1
Created an SNS: BRV
name: "Bravo"
logo: logos/B.png
./bin/dfx-sns-config-random --config_index 100
Created an SNS: WKEY3
name: "Whiskey3"
logo: logos/W.png
./bin/dfx-sns-config-random --config_index 2599
Created an SNS: ZUL99
name: "Zululu99"
logo: logos/Z.png
# Beyond the limit (token symbol length > 5)
./bin/dfx-sns-config-random --config_index 2600
Created an SNS: ALF100
name: "Alfa Centauri"
logo: logos/A.png
Motivation
Currently, all the demo projects have very similar hash-like names and share the same logo. This makes testing and presenting on the
nns-dapp
feel unrealistic. This PR addresses this issue by providing more diverse demo project names and using different logos for each one.Note: This approach has a limitation of 2600 demo Snses because:
ALF
for config_index == 0,ALF1
for config_index == 26).--config_index-offset
parameter to bothdfx-sns-demo-mksns
anddfx-sns-demo-mksns-parallel
scripts to make the config_index usage more transparent when these scripts are used together.Changes
TOKEN_NAME
for Sns names instead ofTOKEN_SYMBOL
.bin/dfx-sns-config-random
.logo.png
with the generated logos.Test
Manually
Test responses:
Screenshots