-
Notifications
You must be signed in to change notification settings - Fork 13
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
Introduce event handlers & clean up Entity #30
Introduce event handlers & clean up Entity #30
Conversation
…ens-Graph-Subgraph into feat/index-profile
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added comments for the schema.graphql
file. All other things are perfect. Thanks mate! you've done an amazing job!
src/lens-hub.ts
Outdated
let profile = Profile.load(event.params.profileId.toString()); | ||
log.info("Trigger Fired", []); | ||
|
||
if (!profile) { | ||
profile = new Profile(event.params.profileId.toString()); | ||
profile.handle = event.params.handle.toString(); | ||
profile.creator = event.params.creator.toHexString(); | ||
profile.mintedTo = event.params.to.toHexString(); | ||
profile.picture = event.params.imageURI.toString(); | ||
|
||
profile.createdAt = event.params.timestamp.toString(); | ||
|
||
// Newly set follow module, can be zero address | ||
profile.followModule = event.params.followModule.toHexString(); | ||
profile.followModuleReturnData = event.params.followModuleReturnData; | ||
|
||
profile.followNftUri = event.params.followNFTURI; | ||
|
||
profile.save(); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing job mate!! @andyrobert3
4b154dc
to
5a9968a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Merging
This PR aims to fix the following issues:
Fixes typo with
onwedBy
inProfileCreated
handlerChanges
Updated entities for
Post
,Comment
&Mirror
to be simpler, without the bloatware we had beforeSince the voyager map view is not available, I am basing the structure of the entities with the events emitted by Lens
We can always add the necessary fields back for the schema, when we find an event handler that provides those values
Normalised the schema a bit, by adding
posts
,comments
&mirrors
into theProfile
schemaWe should be combining the
Post
,Comment
&Mirror
to inherit from a superclass typePublication
since they are just subclasses of it, according to the lens docshttps://docs.lens.xyz/docs/comment
https://docs.lens.xyz/docs/publication
https://docs.lens.xyz/docs/mirror
Will continue writing PR for these issues, once this PR is merged: