playzero / zero-network

zero network is multiverse infrastructure bridging video games into the web3 era
https://zero.io
Apache License 2.0
10 stars 4 forks source link

Add discord identity and validation #198

Open 5-mark opened 1 year ago

5-mark commented 1 year ago

User Story

As user I want to set my discord account as network identity and validate it so that everyone recognizes me as a legit user.

Acceptance Criteria

  1. setting discord ID as one of the identity fields is possible 1.1 the new field must be available also after chain resets or starting a chain initially
  2. setting the discord ID should store the discordID raw onchain and triggers a discord bot sending a message to user
  3. the user answers with his wallet ID in discord
  4. the discord bot sends this message back to the chain and gets validated 4.1 if the wallet ID doesnt match the bot responds with an error 4.2 if the identity is valid the discord bot answers positive and closes the chat.
  5. new identity field is exposed in the graph
  6. user can see in polkadot.js the validation status which also is exposed to the graph.

Additional Information

sequence diagram draft:

How to test

  1. enter your discord ID into the new filed in polkadot.js app --> accounts --> set idenity
  2. submit
  3. wait for the discord bot to popup in your discord
  4. answer the bot with your wallet ID
  5. see that you got validated for discord in your polkadot.js ui
vayesy commented 1 year ago

After some investigation and testing, found out we already have bot logic to verify account. This logic works but it should be triggered manually by sending message in discord. Bot checks specified address, queries its identity from the chain and validates discord field in identity to match discord user id (numerical value). If those match, bot adds role to discord user, marking him as verified. However no on-chain actions are performed (no registrar judgements given).

Image

2075 commented 1 year ago

yes, wasn't this known before? we had this mechanism in place for beta I