-
Notifications
You must be signed in to change notification settings - Fork 15
Closed
Copy link
Labels
ensanalyticsENSAnalytics relatedENSAnalytics relatedensapiENSApi relatedENSApi relatedensnode-sdkensnode-sdk relatedensnode-sdk related
Milestone
Description
Background
- The
ensnode-sdkpackage currently imports from theens-referralspackage in the ENSNode monorepo. This was done to accelerate shipping ENS Holiday Awards, but is now a key issue blocking next steps. - The
ens-referralspackage in the ENSNode monorepo currently copy-pastes a number of ideas from theensnode-sdkpackage. This code duplication is unfortunate but was done to accelerate shipping ENS Holiday Awards while avoiding a circular dependency betweenensnode-sdkandens-referrals.
Big picture goals
The following goals are NOT for this issue specifically. However they are the bigger goals we are working towards getting closer to enabling in this issue.
- The backend logic for fetching referral dashboards / referral data by the ENS Awards site should be transitioned out of ENSApi and instead into a completely new app that will be moved completely out of the ENSNode monorepo and will build on the
ENSDbClientthat Tomasz is advancing prerequisites for. - The
ens-referralspackage needs to be fully transitioned out of the ENSNode monorepo.
Goals for this specific issue
- The
ensnode-sdkpackage must remove its dependency on theens-referralspackage.- All ideas that currently live in the
ensnode-sdkpackage related to referrals need to move into theens-referralspackage. - This will include a need for us to define an entirely new "client" in
ens-referralsthat replicates the overall design patterns from the "client" inensnode-sdk(packages/ensnode-sdk/src/client.ts) but becomes the new home for implementing the following:getReferrerLeaderboardPagegetReferrerDetail
- This will mean that the ENSAwards site will need to create both an
ENSNodeClientfromensnode-sdkand a (new!)ENSReferralsClientfromens-referrals.- ENSAwards will therefore have dependencies on both
ensnode-sdkandens-referrals.
- ENSAwards will therefore have dependencies on both
- This will also mean that (for now!) the ENSApi app will have dependencies on both
ensnode-sdkandens-referrals. This is a temporary step until we can complete the big picture goals identified in the section above.
- All ideas that currently live in the
- The
ens-referralspackage should add a dependency onensnode-sdk. - Each of the following ideas that are currently defined in
ens-referralsshould be deleted fromens-referralsand instead be converted into imports fromensnode-sdkto remove code duplication and improve code maintainability moving forward:ChainIdAccountIdUnixTimestampDuration
- Introduce zero changes that would break the ENSAwards site from the perspective of the network layer of API requests / responses. Breaks to the ENSAwards site at the code import / build layer are fully expected by this work and are ok 👍
Metadata
Metadata
Assignees
Labels
ensanalyticsENSAnalytics relatedENSAnalytics relatedensapiENSApi relatedENSApi relatedensnode-sdkensnode-sdk relatedensnode-sdk related
Type
Projects
Status
Done