Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow XP rewards for NamespaceCreation and NamespaceAddedToCommunity events #11367

Open
4 tasks
dillchen opened this issue Mar 10, 2025 · 3 comments
Open
4 tasks
Assignees
Milestone

Comments

@dillchen
Copy link
Contributor

dillchen commented Mar 10, 2025

Description

We need allow users to award XP

  • for namespace created (with and without referrals)
  • namespace linked to community events. This ticket is for the wiring up of front to backend

Tasks

  • Platform Side: Insert Emit XP Event within handlers for NamespaceDeployed and NamespaceDeployedWithReferral
  • Client Side: Update the Admin Quest Creation
  • Platform Side: Insert Emit XP Event within updateCommunity route to handle the NamespaceAddedToCommunity
  • Client Side: Update the Admin Quest Creation to allow for this, to the admin and user it should show VerifyCommunityProfile
@Rotorsoft
Copy link
Contributor

Rotorsoft commented Mar 11, 2025

@dillchen : I need some clarification on the platform tasks. We are already receiving these on-chain events (NamespaceDeployed and NamespaceDeployedWithReferral), so there’s no need to re-emit them unless there’s a downstream side effect such as adding the on-chain admin group to the community. In that case, we could emit the event mentioned in the second task: NamespaceAddedToCommunity confirming that the group was added, though the naming could be misleading since the namespace is added on community creation and this command just adds the admin group... maybe CommunityNamespaceLinked or AdminGroupLinked?

A couple of questions:

  • Are we adding these events to the XP projection? If so, we’ll need to update the projection.
  • Can we verify that when a namespace with referrals is created, we also receive the NamespaceDeployed on-chain event? Or do we need to explicitly invoke the command to create the on-chain admin group on NamespaceDeployedWithReferral?

@rbennettcw see second question ⬆

@dillchen dillchen changed the title Create NamespaceCreation and NamespaceAddedToCommunity event Allow XP rewards for NamespaceCreation and NamespaceAddedToCommunity events Mar 11, 2025
@dillchen
Copy link
Contributor Author

Thank you for your comments. I've updated the title of the ticket because it was not clear. Goal of the tickets to wire up existing Events and allow XP to be awarded for them, and create new events if necessary

In that case, we could emit the event mentioned in the second task: NamespaceAddedToCommunity confirming that the group was added, though the naming could be misleading since the namespace is added on community creation and this command just adds the admin group... maybe CommunityNamespaceLinked or AdminGroupLinked?

So in this case, it seems like we only need the CommunityNamespaceLinked

A couple of questions:

Are we adding these events to the XP projection? If so, we’ll need to update the projection.

Yes :)

Can we verify that when a namespace with referrals is created, we also receive the NamespaceDeployed on-chain event? Or do we need to explicitly invoke the command to create the on-chain admin group on NamespaceDeployedWithReferral?

Good question

@rbennettcw
Copy link
Contributor

  • Can we verify that when a namespace with referrals is created, we also receive the NamespaceDeployed on-chain event? Or do we need to explicitly invoke the command to create the on-chain admin group on NamespaceDeployedWithReferral?

From what I can tell in code, NamespaceDeployedWithReferral and NamespaceDeployed are treated as entirely separate events.

Tested locally and it looks like the NamespaceDeployedWithReferral event does not trigger the NamespaceDeployed handler, so if you want the admin group to be created, you'll need to copy the logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants