Skip to content

Commit

Permalink
Merge pull request #46 from elimu-ai/45-drips-fetch-sponsorship-events
Browse files Browse the repository at this point in the history
Fetch sponsorship events
  • Loading branch information
nya-elimu authored Aug 7, 2024
2 parents d19fec9 + 983ff27 commit eb4b562
Show file tree
Hide file tree
Showing 10 changed files with 673 additions and 2 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Node.js CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

defaults:
run:
working-directory: funding-splits/distribution

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: funding-splits/distribution/package-lock.json
- run: npm ci
- run: npx tsc
4 changes: 2 additions & 2 deletions DRIP_LIST_FUNDING_SPLITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ distribution.elimu.eth,tgl.distribution.elimu.eth,10
| [start-guide](https://github.com/elimu-ai/start-guide) | `distribution.elimu.eth` | |
| [website](https://github.com/elimu-ai/website) | `distribution.elimu.eth` | [`FUNDING_SPLITS.csv`](https://github.com/elimu-ai/website/blob/main/FUNDING_SPLITS.csv) |
| [web3-sponsors](https://github.com/elimu-ai/web3-sponsors) | `distribution.elimu.eth` | |
| Hindi Language 🏏🐯 | `hin.distribution.elimu.eth` | |
| Tagalog Language 🏝️🦎 | `tgl.distribution.elimu.eth` | |
| Hindi Language 🏏🐯 | `hin.distribution.elimu.eth` | [`FUNDING_SPLITS_HIN.csv`](./funding-splits/distribution/FUNDING_SPLITS_HIN.csv) |
| Tagalog Language 🏝️🦎 | `tgl.distribution.elimu.eth` | [`FUNDING_SPLITS_TGL.csv`](./funding-splits/distribution/FUNDING_SPLITS_TGL.csv) |

---

Expand Down
2 changes: 2 additions & 0 deletions funding-splits/distribution/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
query-sponsorship-events.js
6 changes: 6 additions & 0 deletions funding-splits/distribution/FUNDING_SPLITS_HIN.csv
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
ethereum_address,sponsorship_count,distribution_count,impact_percentage
0xA7D1CB88740642DC95774511Cc73f015396Be869,4,0,44.44444444444444
0x883753Beab357A2c29f3766C6ad158e72A78ce51,1,0,11.11111111111111
0xFf7e232A44C74b306623f0d20dd6995775773842,1,0,11.11111111111111
0xEbcF2690AF9e7D17e7dfB7118f65321Fc68d4b97,1,0,11.11111111111111
0x29d6744eF3C98a00CAE8071D6DC292c53d6c5C75,1,0,11.11111111111111
0x015B5dF1673499E32D11Cf786A43D1c42b3d725C,1,0,11.11111111111111
23 changes: 23 additions & 0 deletions funding-splits/distribution/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# distribution

> Drip List funding splits for Distribution & Data Collection 🛵💨
See [`../../DRIP_LIST_FUNDING_SPLITS.md#distribution`](../../DRIP_LIST_FUNDING_SPLITS.md#distribution)

## Install Dependencies

```bash
npm install
```

## Run the TypeScript Compiler

```bash
npx tsc
```

## Run the JavaScript

```bash
node ./query-sponsorship-events.js
```
177 changes: 177 additions & 0 deletions funding-splits/distribution/abis/SponsorshipQueue.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
{
"abi": [
{
"inputs": [
{
"internalType": "uint256",
"name": "_estimatedCost",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "OnlyOwner",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "estimatedCost",
"type": "uint256"
}
],
"name": "EstimatedCostUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "owner",
"type": "address"
}
],
"name": "OwnerUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"components": [
{
"internalType": "uint256",
"name": "estimatedCost",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "timestamp",
"type": "uint256"
},
{
"internalType": "address",
"name": "sponsor",
"type": "address"
}
],
"indexed": false,
"internalType": "struct Sponsorship",
"name": "sponsorship",
"type": "tuple"
}
],
"name": "SponsorshipAdded",
"type": "event"
},
{
"inputs": [],
"name": "addSponsorship",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [],
"name": "estimatedCost",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getQueueCount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "queue",
"outputs": [
{
"internalType": "uint256",
"name": "estimatedCost",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "timestamp",
"type": "uint256"
},
{
"internalType": "address",
"name": "sponsor",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_estimatedCost",
"type": "uint256"
}
],
"name": "updateEstimatedCost",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_owner",
"type": "address"
}
],
"name": "updateOwner",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]
}
135 changes: 135 additions & 0 deletions funding-splits/distribution/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit eb4b562

Please sign in to comment.