{"id":20002012,"url":"https://github.com/pooltogether/pooltogether-api-monorepo","last_synced_at":"2026-04-19T15:32:38.746Z","repository":{"id":46343219,"uuid":"357025261","full_name":"pooltogether/pooltogether-api-monorepo","owner":"pooltogether","description":null,"archived":false,"fork":false,"pushed_at":"2023-05-25T16:41:43.000Z","size":2453,"stargazers_count":5,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-18T11:02:29.429Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pooltogether.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE_MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-12T01:47:16.000Z","updated_at":"2023-03-15T17:16:57.000Z","dependencies_parsed_at":"2024-11-13T05:30:15.882Z","dependency_job_id":null,"html_url":"https://github.com/pooltogether/pooltogether-api-monorepo","commit_stats":{"total_commits":352,"total_committers":3,"mean_commits":"117.33333333333333","dds":0.3664772727272727,"last_synced_commit":"ae21c8d8a657fe1c9f3a73e8a0d9f12253c60c29"},"previous_names":[],"tags_count":71,"template":false,"template_full_name":null,"purl":"pkg:github/pooltogether/pooltogether-api-monorepo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pooltogether%2Fpooltogether-api-monorepo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pooltogether%2Fpooltogether-api-monorepo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pooltogether%2Fpooltogether-api-monorepo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pooltogether%2Fpooltogether-api-monorepo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pooltogether","download_url":"https://codeload.github.com/pooltogether/pooltogether-api-monorepo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pooltogether%2Fpooltogether-api-monorepo/sbom","scorecard":{"id":740865,"data":{"date":"2025-08-11","repo":{"name":"github.com/pooltogether/pooltogether-api-monorepo","commit":"e2b2697389e206763d9cc5e5f3e89fc6174ac245"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 1/29 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE_MIT:0","Info: FSF or OSI recognized license: MIT License: LICENSE_MIT:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"100 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-434g-2637-qmqr","Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m","Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw","Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p","Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747","Warn: Project is vulnerable to: GHSA-vjh7-7g9h-fjfh","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-hc6q-2mpp-qw7j","Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-vrw4-w73r-6mm8","Warn: Project is vulnerable to: GHSA-9c22-pwxw-p6hx","Warn: Project is vulnerable to: GHSA-7grf-83vw-6f5x","Warn: Project is vulnerable to: GHSA-mx2q-35m2-x2rh","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-xq7p-g2vc-g82p","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-h452-7996-h45h","Warn: Project is vulnerable to: GHSA-7gc6-qh9x-w6h8","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-4gmj-3p3h-gm8h","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-2j2x-2gpw-g8fm","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-h7cp-r72f-jxh6","Warn: Project is vulnerable to: GHSA-v62p-rq8g-8h59","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-584q-6j8j-r5pm","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-wpg7-2c88-r8xv","Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc","Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh","Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-cf4h-3jhx-xvhq","Warn: Project is vulnerable to: GHSA-27v7-qhfv-rqq8","Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693","Warn: Project is vulnerable to: GHSA-5vp3-v4hc-gx76","Warn: Project is vulnerable to: GHSA-wmpv-c2jp-j2xg","Warn: Project is vulnerable to: GHSA-88g8-f5mf-f5rj","Warn: Project is vulnerable to: GHSA-m6w8-fq7v-ph4m","Warn: Project is vulnerable to: GHSA-4g63-c64m-25w9","Warn: Project is vulnerable to: GHSA-qh9x-gcfh-pcrw","Warn: Project is vulnerable to: GHSA-xrc4-737v-9q75","Warn: Project is vulnerable to: GHSA-4h98-2769-gh6h","Warn: Project is vulnerable to: GHSA-93hq-5wgc-jc82","Warn: Project is vulnerable to: GHSA-5h3x-9wvq-w4m2","Warn: Project is vulnerable to: GHSA-g4vp-m682-qqmp","Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq","Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488","Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g","Warn: Project is vulnerable to: GHSA-h5c3-5r3r-rr8q","Warn: Project is vulnerable to: GHSA-rmvr-2pp2-xj38","Warn: Project is vulnerable to: GHSA-xx4v-prfh-6cgc","Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22","Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp","Warn: Project is vulnerable to: GHSA-3j8f-xvm3-ffx4","Warn: Project is vulnerable to: GHSA-4p35-cfcx-8653","Warn: Project is vulnerable to: GHSA-7f3x-x4pr-wqhj","Warn: Project is vulnerable to: GHSA-jpp7-7chh-cf67","Warn: Project is vulnerable to: GHSA-q6wq-5p59-983w","Warn: Project is vulnerable to: GHSA-j9fq-vwqv-2fm2","Warn: Project is vulnerable to: GHSA-pqw5-jmp5-px4v","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6","Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj","Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9","Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v","Warn: Project is vulnerable to: GHSA-38fc-wpqx-33j7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T17:24:25.952Z","repository_id":46343219,"created_at":"2025-08-22T17:24:25.952Z","updated_at":"2025-08-22T17:24:25.952Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32012029,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T05:19:29.534Z","updated_at":"2026-04-19T15:32:38.142Z","avatar_url":"https://github.com/pooltogether.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `PoolTogether API Monorepo`\n\nPoolTogether API Monorepo uses [CloudFlare workers](https://workers.cloudflare.com/) to build a minimal global API for use by PoolTogether integrators.\n\n## Endpoints\n\n\u003e NOTE: Not all Prize Pools are supported. Only a select set of PoolTogether managed Prize Pools are available through the API.\n\n\u003e NOTE: Workers in the same DNS Zones cannot make requests to each other. So we break apart the workers into different zones if need be.\n\n### pooltogether-api.com\n\nv3 - Data\n\n- `GET /pools/:chainId/:poolAddress`\n- `GET /pools/:chainId`\n- `GET /pods/:chainId/:podAddress`\n- `GET /pods/:chainId`\n\nv3 - Contract addresses\n\n- `GET /v3/addresses/prize-pools/:chainId`\n- `GET /v3/addresses/prize-pools/:chainId/:prizePoolAddress`\n\nv4 - Contract addresses\n\n- `GET /v4/addresses/prize-pools/:chainId`\n- `GET /v4/addresses/prize-pools/:chainId/:prizePoolAddress`\n- `GET /v4/addresses/prize-distributors/:chainId`\n- `GET /v4/addresses/prize-distributors/:chainId/:prizeDistributorAddress`\n\nMeta\n\n- `GET /gas/:chainId`\n- `GET /gas/update`\n\n### yield.pooltogether.com\n\n- `GET /:yieldSource`\n- `GET /update`\n\n### tsunami.pooltogether.com\n\n- `GET /:chainId/:prizeDistributorAddress/prizes/:usersAddress/:drawId`\n\n### pooltogether-api.workers.dev\n\nv3 Prize Pools\n\n- `GET {:network}-pool-updater.pooltogether-api.workers.dev/update`\n\nv3 Pod Addresses\n\n- `GET {:network}-contract-addresses-updater.pooltogether-api.workers.dev/pods/update`\n\nv3 Prize Pool Addresses\n\n- `GET {:network}-contract-addresses-updater.pooltogether-api.workers.dev/v3/prize-pools/update`\n\nv4 Prize Pool Addresses\n\n- `GET {:network}-contract-addresses-updater.pooltogether-api.workers.dev/v4/prize-pools/update`\n\nv4 Prize Distributor Addresses\n\n- `GET {:network}-contract-addresses-updater.pooltogether-api.workers.dev/v4/prize-distributors/update`\n\n## Architecture\n\n[Architecture overview](https://www.figma.com/file/btXwla206pJ0qIuDYmV1tO/CloudFlare-API)\n\n![Architecture overview](architecture-overview.png)\n\nA common pattern we use is to have an \"updater\" worker that runs on a set interval to refresh data frequently for a KV. This is paired with a function or two in [`entrypoint`](./workers/entrypoint/README.md) which expose the data from the KV.\n\n\u003e NOTE: Workers on the same zones cannot make requests to each other.\n\n## Instructions\n\n#### Installation\n\n1. `yarn global add @cloudflare/wrangler` and then log in `wrangler login`\n\n#### Setup Existing Workers\n\nTo run a worker locally from [workers](./workers), you will need to:\n\n1. run: `cp wrangler.toml.example wrangler.toml` and fill out `account_id` \u0026 other related variables inside wrangler.toml\n2. run: `yarn`\n\n#### Creating A New Worker\n\nTo create a new worker you can generate a new one using (CloudFlares templates)[https://developers.cloudflare.com/workers/get-started/quickstarts/] or copy pasta an existing PT Worker. ([contract-address-updater](./workers/contract-address-updater/README.md)) and ([tsunami-prizes](./workers/tsunami-prizes/README.md)) are more modern examples.\n\n1. run: `cp wrangler.toml.example wrangler.toml` and fill out `account_id` \u0026 other related variables inside wrangler.toml\n2. run: `yarn`\n\n#### Development ([pool-updater](./workers/api-pool-updater/README.md))\n\n1. In `packages/api-runner` run: `yarn build`\n2. In `packages/api-runner` run: `yalc push`\n3. In `packages/api-pool-updater` run: `yalc link \"@pooltogether/api-runner\"`\n4. In `packages/api-pool-updater` run: `yarn dev mainnet`\n5. In `packages/api-entrypoint` run: `yarn dev --port 8888`\n\n- `http://127.0.0.1:8787/update` to refresh the cache\n- `http://127.0.0.1:8888/pools/1` to fetch all pools on mainnet\n\nUpdated values will be reflected in the development KV on Cloudflare.\n\n#### Development ([entrypoint](./workers/api-entrypoint/README.md))\n\n1. In `packages/api-entrypoint` run: `yarn dev-prod`\n2. API is available at `http://127.0.0.1:8787/`\n\n#### Development `[api-runner](./packages/api-runner/README.md)` Workflow\n\n1. In `packages/api-runner` run: `yarn build`\n2. In `packages/api-runner` run: `yalc push`\n3. In `packages/X` run: `yalc link \"@pooltogether/api-runner\"`\n4. In `packages/X` run: `yarn dev mainnet`\n5. In `packages/api-entrypoint` run: `yarn dev --port 8888`\n\n- `http://127.0.0.1:8787/update` to refresh the cache\n- `http://127.0.0.1:8888/pools/1` to fetch all pools on mainnet\n\n#### Development ([api-runner](./workers/api-runner/README.md))\n\nIt's handy to be able to run it in the node REPL, as the Cloudflare worker environment is Rust emulating JS which proves difficult for debugging.\n\nIt's set up to be identical to the other libraries we create and use, being built independently with Rollup and then consumed by the pool updater.\n\n1. To run in dev mode, `cd packages/api-entrypoint` and run: `yarn start`\n2. To publish to production, `cd packages/api-entrypoint` and run `wrangler publish`\n3. To test the functionality:\n\n- `cd packages/api-runner`\n- `yarn build`\n- `node`\n- `const { pool, pools } = require( './dist/index')`\n- `pool({ url: 'https://example.com/pools/1/0xEBfb47A7ad0FD6e57323C8A42B2E5A6a4F68fc1a.json' })`\n\n#### Publishing\n\n- [Publishing @pooltogether/api-runner](./packages/api-runner/README.md)\n- [Publishing API Entry point](./workers/api-entrypoint/README.md#deploying)\n- [Publishing Pool Updaters](./workers/api-pool-updater/README.md#deploying-a-single-network)\n- [Publishing Yield Source Data](./workers/api-pool-updater/README.md#deploying)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpooltogether%2Fpooltogether-api-monorepo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpooltogether%2Fpooltogether-api-monorepo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpooltogether%2Fpooltogether-api-monorepo/lists"}