Closed nya-elimu closed 3 months ago
The recent changes introduce a Continuous Integration (CI) workflow for Node.js applications and enhance documentation related to funding splits. Key updates include the implementation of a GitHub Actions workflow to automate testing across multiple Node.js versions, improved links in the funding documentation for Hindi and Tagalog, and the addition of scripts for querying sponsorship events from a smart contract. These modifications streamline development and improve data accessibility.
File Path | Change Summary |
---|---|
.github/workflows/node.js.yml |
New CI workflow for Node.js applications, testing across Node.js versions 18.x, 20.x, and 22.x. |
DRIP_LIST_FUNDING_SPLITS.md |
Updated Hindi and Tagalog entries to include direct links to respective funding splits CSV files. |
funding-splits/distribution/.gitignore |
Added a .gitignore file to exclude node_modules and query-sponsorship-events.js from version control. |
funding-splits/distribution/README.md |
Introduced a README file outlining setup steps for users to install dependencies and run scripts related to funding splits. |
funding-splits/distribution/query-sponsorship-events.ts |
New TypeScript file to query sponsorship events from a smart contract, aggregate data, and export it to CSV format. |
Objective | Addressed | Explanation |
---|---|---|
Fetch a list of SponsorshipAdded Events from the smart contract ( #45 ) |
✅ |
.github/workflows/node.js.yml (4)
`1-5`: **LGTM!** The header and name section provide clear and necessary information. --- `6-10`: **LGTM!** The triggers section is correctly set up to ensure the workflow runs on relevant events. --- `12-25`: **LGTM!** The jobs section is well-defined and includes necessary details for the build job. The strategy matrix ensures compatibility with multiple Node.js versions. --- `26-35`: **LGTM!** The steps section is comprehensive and covers necessary actions for the build job. The use of caching for npm dependencies is efficient.funding-splits/distribution/query-sponsorship-events.ts (8)
`1-3`: **LGTM!** The import statements are appropriate and necessary for the functionality implemented in the file. --- `5-9`: **LGTM!** The setup for the RPC server address and provider is correct. The console log statements are useful for debugging. --- `11-16`: **LGTM!** The contract setup is correct. The commented-out console log statement can be useful for debugging. --- `18-69`: **LGTM!** The `query` function is well-implemented and includes necessary steps to retrieve and process events. The console log statements are useful for debugging. --- `71-122`: **LGTM!** The `prepareCsvData` function is well-implemented and includes necessary steps to process event data. The console log statements are useful for debugging. --- `124-145`: **LGTM!** The `calculateImpactPercentages` function is well-implemented and includes necessary steps to calculate impact percentages. The console log statements are useful for debugging. --- `147-167`: **LGTM!** The `exportToCsv` function is well-implemented and includes necessary steps to export data to a CSV file. The console log statements are useful for debugging. --- `1-167`: **LGTM!** The overall functionality and integration of the file are well-implemented. The use of console log statements throughout the file is useful for debugging.
closes #45