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

[SG] Adds initial setup to track GroupCurrencyToken events as a template plus the handler for adding new members to the group #3

Merged
merged 4 commits into from
Jun 16, 2022

Conversation

LaimeJesus
Copy link

@LaimeJesus LaimeJesus commented Jun 3, 2022

related #39

Check existing groups in: https://thegraph.com/hosted-service/subgraph/laimejesus/circles-local

Description

This PR adds the following changes:

  • updates the GroupCurrencyTokenFactory address/start block because a new version of the Group Contract is required (this version has the new events included)
  • updates the GroupCurrencyToken ABI with new events
  • creates a new Template when a GroupCurrencyToken is created:
  • adds the SafeGroupMember Entity which is required for the m2m relationship between groups and safe users
    • id
    • safe: Safe entity
    • group: GroupCurrencyToken entity
  • adds a handler for the MemberTokenAdded event
  • adds a new source template for the GroupCurrencyToken contract in the subgraph configuration file
  • refactor and fix: adds missing initialization for Group data on creation

How to test

  • copy .env-xdai.example -> .env
  • need to modify: ACCESS_TOKEN, SUBGRAPH_NAME, SUBGRAPH_NETWORK, START_BLOCK variables
  • deploy subgraph: npm run deploy hosted-service-deploy
  • check deployed service

Example

Check deployed Subgraph in Hosted Service:

image

feat: updates new group factory contract address
@LaimeJesus LaimeJesus changed the title Draft: #39 Add new handlers for new events [WIP] #39 Add new handlers for new events Jun 3, 2022
…nerCanMint, onlyTrustedCanMint)

separates creation of a group to a new method
…m relationship of a group with a safe account
…th their respective function to create the safeGroup entitty

feat: create a group template when a new group is created
@LaimeJesus LaimeJesus requested a review from patitonar June 13, 2022 16:53
@LaimeJesus LaimeJesus marked this pull request as ready for review June 13, 2022 16:54
@LaimeJesus LaimeJesus changed the title [WIP] #39 Add new handlers for new events #39 Add new handlers for new events Jun 13, 2022
@LaimeJesus LaimeJesus changed the title #39 Add new handlers for new events [SG] Adds initial setup to track GroupCurrencyToken events as a template plus the handler for adding new members to the group Jun 13, 2022
@LaimeJesus LaimeJesus merged commit caf962c into main Jun 16, 2022
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

Successfully merging this pull request may close these issues.

2 participants