gnosis / gnosis/delegate-registry
Update what data is returned by `/api/delegates/top`
- Dominant language
- JavaScript
- Stars
- 31
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
Currently, a request to `/api/delegates/top`, for instance
```
GET http://localhost:3000/api/delegates/top?space=gnosis.eth&limit=100
```
returns
```
{
"delegates": [
[
"0x7ef021f62E3E7975FBC21d3202C5A1F19D53bB47",
"3856606662913366179"
],
[
"0x6cc5b30Cd0A93C1F85C7868f5F2620AB8c458190",
"16390578317381805817"
],
[
"0xDE1e8A7E184Babd9F0E3af18f40634e9Ed6F0905",
"12533971654468439638"
]
],
"updateTime": 1683028849
}
```
Instead, it should return something like this:
```
{
"delegates": [
{
"address": "0x7ef021f62E3E7975FBC21d3202C5A1F19D53bB47",
"delegatedVoteWeight": 3856606662913366179,
"numberOfDelegates": 3
}
...
],
"updateTime": 1683028849
}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the handler or entry point for GET /api/delegates/top and trace how its delegate results are assembled. Change the response to return delegate objects with address, delegatedVoteWeight, and numberOfDelegates, while preserving updateTime; verify the endpoint response matches the requested shape.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100