-
Notifications
You must be signed in to change notification settings - Fork 14
feat(APP-667): Pull token voting ERC20 members from aragon-subdomain #1128
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
Open
asciiman
wants to merge
36
commits into
main
Choose a base branch
from
app-667-pull-token-voting-erc20-members-from-aragon-subdomain
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 24 commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
1209f32
Pull token voting erc20 members from aragon-subdomain
asciiman 4151be8
Now route all mainnet tokenvoting erc20 member from subdomain
asciiman 9b6e471
Only route erc20 token voting plugins to subdomain
asciiman 264202c
Remove ENS_SUBGRAPH_URL dependency from member route
asciiman 7cfcaa8
Use published aragon-subdomain
asciiman 2a4e536
Merge branch 'main' into app-667-pull-token-voting-erc20-members-from…
asciiman 0929ffe
Merge branch 'main' into app-667-pull-token-voting-erc20-members-from…
asciiman 689ff7f
Update the subdomain lib
asciiman 5d98bbc
Use aragon-domain types for token voting
asciiman 5ae37b6
Change package from aragon-subdomain to aragon-domain
asciiman a75e70f
Fix import
asciiman 4d44edf
Fix mapper
asciiman 9c8d7be
Add api key
asciiman a992adf
Update domain
asciiman 802e3b3
Merge branch 'main' into app-667-pull-token-voting-erc20-members-from…
asciiman 8055750
Merge branch 'main' into app-667-pull-token-voting-erc20-members-from…
asciiman ffb23b4
refactor(APP-667): re-home token-voting membership onto the aragonDom…
asciiman d5a58e9
chore(APP-667): bump aragon-domain to snapshot 0.0.0-20260730113648
asciiman 5ec39fd
docs(APP-667): clarify the defensive token reads in buildTokenVotingM…
asciiman 956e937
refactor(APP-667): require token-carrying settings in buildTokenVotin…
asciiman 47cb89b
refactor(APP-667): rename isTokenVotingMembershipPlugin to isTokenMem…
asciiman 31d4c18
Clean up comments
asciiman 887f568
Fix server code being pulled into client
asciiman 8531f72
Make linked account check server safe
asciiman cd6116f
Return domain from service
asciiman 8bd171f
Resolve activity for member details
asciiman 7c46cf4
Simplified code
asciiman b08e192
Docs
asciiman c301684
Rename hook
asciiman 4ae75d8
Validate query params
asciiman 5990ac9
Convert activity correctly
asciiman 847bb3c
Update map
asciiman 4ad218e
Docs
asciiman bd64317
Clean up comment
asciiman 700c456
Merge branch 'main' into app-667-pull-token-voting-erc20-members-from…
asciiman d7da02e
Change domain timestamp handling
asciiman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
.changeset/app-667-token-voting-members-from-aragon-domain.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@aragon/app": minor | ||
| --- | ||
|
|
||
| Serve mainnet ERC-20 token-voting member lists from the aragon-domain (Envio) BFF, with source routing and a legacy-backend fallback |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| import { type NextRequest, NextResponse } from 'next/server'; | ||
| import { tokenVotingMembershipServiceServer } from '@/modules/governance/api/tokenVotingMembershipService/tokenVotingMembershipService.server'; | ||
| import { monitoringUtils } from '@/shared/utils/monitoringUtils'; | ||
|
|
||
| export const GET = async (req: NextRequest) => { | ||
| const params = req.nextUrl.searchParams; | ||
| const pluginAddress = params.get('pluginAddress'); | ||
| const tokenContractAddress = params.get('tokenContractAddress'); | ||
| const page = params.get('page'); | ||
| const pageSize = params.get('pageSize'); | ||
|
|
||
| if (pluginAddress == null || tokenContractAddress == null) { | ||
| return NextResponse.json( | ||
| { | ||
| error: 'pluginAddress and tokenContractAddress query parameters are required', | ||
| }, | ||
| { status: 400 }, | ||
| ); | ||
| } | ||
|
|
||
| try { | ||
| const result = | ||
| await tokenVotingMembershipServiceServer.getTokenVotingMembership({ | ||
| queryParams: { | ||
| pluginAddress, | ||
| tokenContractAddress, | ||
| page: page != null ? Number(page) : undefined, | ||
| pageSize: pageSize != null ? Number(pageSize) : undefined, | ||
| }, | ||
| }); | ||
|
|
||
| return NextResponse.json(result); | ||
| } catch (error) { | ||
| monitoringUtils.logError(error, { | ||
| context: { | ||
| errorType: 'get_token_voting_membership_error', | ||
| pluginAddress, | ||
| tokenContractAddress, | ||
| }, | ||
| }); | ||
|
|
||
| return NextResponse.json( | ||
| { error: 'getTokenVotingMembership request failed' }, | ||
| { status: 500 }, | ||
| ); | ||
| } | ||
| }; |
4 changes: 3 additions & 1 deletion
4
apps/app/src/app/dao/[network]/[addressOrEns]/(daoPage)/members/page.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| import { DaoMembersPage } from '@/modules/governance/pages/daoMembersPage'; | ||
| // Imported from the page file (not the module barrel): the RSC pulls in | ||
| // server-only prefetch code that must stay out of the barrel's client graph. | ||
| import { DaoMembersPage } from '@/modules/governance/pages/daoMembersPage/daoMembersPage'; | ||
|
|
||
| export default DaoMembersPage; |
8 changes: 4 additions & 4 deletions
8
apps/app/src/modules/governance/api/governanceService/domain/memberMetrics.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,10 @@ | ||
| export interface IMemberMetrics { | ||
| /** | ||
| * Block number of the first activity of the member in the given body plugin. | ||
| * Unix-seconds timestamp of the member's first observed activity. | ||
| */ | ||
| firstActivity: number | null; | ||
| firstActivityTimestamp: number | null; | ||
| /** | ||
| * Block number of the latest activity of the member in the given body plugin. | ||
| * Unix-seconds timestamp of the member's most recent observed activity. | ||
| */ | ||
| lastActivity: number | null; | ||
| lastActivityTimestamp: number | null; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Don't merge until this is updated with release build of lib.
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.
Not approving yet, your own note still stands: the dep's on the dev snapshot
0.0.0-20260730113648, so release build (and a rebase onto main) before this goes. Code side's solid, a couple of type nits inline.