-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7524af8
commit 1c30f7d
Showing
6 changed files
with
55 additions
and
193 deletions.
There are no files selected for viewing
This file contains 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
82 changes: 0 additions & 82 deletions
82
packages/ethernaut-retropgf/src/internal/agora/Governance.js
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
packages/ethernaut-retropgf/src/internal/agora/Identity.js
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
43 changes: 43 additions & 0 deletions
43
packages/ethernaut-retropgf/src/internal/agora/RetroFunding.js
This file contains 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,43 @@ | ||
class RetroFunding { | ||
constructor(agora) { | ||
this.agora = agora | ||
} | ||
|
||
async projects({ limit = 10, offset = 0 }) { | ||
return ( | ||
await this.agora.createRequest( | ||
`/projects?limit=${limit}&?offset=${offset}`, | ||
) | ||
).projects | ||
} | ||
|
||
async round({ roundId }) { | ||
return await this.agora.createRequest(`/retrofunding/rounds/${roundId}`) | ||
} | ||
|
||
async ballots({ roundId, limit = 10, offset = 0 }) { | ||
return ( | ||
await this.agora.createRequest( | ||
`/retrofunding/rounds/${roundId}/ballots?limit=${limit}&offset=${offset}`, | ||
) | ||
).ballots | ||
} | ||
|
||
async roundProjects({ roundId, limit = 10, offset = 0 }) { | ||
return ( | ||
await this.agora.createRequest( | ||
`/retrofunding/rounds/${roundId}/projects?limit=${limit}&offset=${offset}`, | ||
) | ||
).projects | ||
} | ||
|
||
async roundImpactMetrics({ roundId }) { | ||
return ( | ||
await this.agora.createRequest( | ||
`/retrofunding/rounds/${roundId}/impactMetrics`, | ||
) | ||
).impactMetrics | ||
} | ||
} | ||
|
||
module.exports = RetroFunding |
This file contains 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