{"id":13722366,"url":"https://github.com/pooltogether/pooltogether-pool-contracts","last_synced_at":"2026-02-09T03:32:34.285Z","repository":{"id":41157869,"uuid":"174190800","full_name":"pooltogether/pooltogether-pool-contracts","owner":"pooltogether","description":"PoolTogether prize-linked savings game Solidity smart contracts.","archived":false,"fork":false,"pushed_at":"2023-11-10T17:56:29.000Z","size":9817,"stargazers_count":368,"open_issues_count":13,"forks_count":169,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-08-04T21:13:43.741Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pooltogether.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pooltogether.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2019-03-06T17:34:43.000Z","updated_at":"2025-06-18T12:41:34.000Z","dependencies_parsed_at":"2024-05-10T15:06:17.014Z","dependency_job_id":null,"html_url":"https://github.com/pooltogether/pooltogether-pool-contracts","commit_stats":null,"previous_names":["pooltogether/pooltogether-contracts"],"tags_count":89,"template":false,"template_full_name":null,"purl":"pkg:github/pooltogether/pooltogether-pool-contracts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pooltogether%2Fpooltogether-pool-contracts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pooltogether%2Fpooltogether-pool-contracts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pooltogether%2Fpooltogether-pool-contracts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pooltogether%2Fpooltogether-pool-contracts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pooltogether","download_url":"https://codeload.github.com/pooltogether/pooltogether-pool-contracts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pooltogether%2Fpooltogether-pool-contracts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269434322,"owners_count":24416261,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-08T02:00:09.200Z","response_time":72,"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-08-03T01:01:27.857Z","updated_at":"2026-02-09T03:32:34.247Z","avatar_url":"https://github.com/pooltogether.png","language":"JavaScript","funding_links":[],"categories":["Contracts"],"sub_categories":[],"readme":"\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/pooltogether/pooltogether--brand-assets\"\u003e\n    \u003cimg src=\"https://github.com/pooltogether/pooltogether--brand-assets/blob/977e03604c49c63314450b5d432fe57d34747c66/logo/pooltogether-logo--purple-gradient.png?raw=true\" alt=\"PoolTogether Brand\" style=\"max-width:100%;\" width=\"200\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cbr /\u003e\n\n# PoolTogether Prize Savings Protocol\n\n[![\u003cPoolTogether\u003e](https://circleci.com/gh/pooltogether/pooltogether-pool-contracts.svg?style=shield)](https://circleci.com/gh/pooltogether/pooltogether-pool-contracts) [![Coverage Status](https://coveralls.io/repos/github/pooltogether/pooltogether-pool-contracts/badge.svg?branch=master\u0026service=github\u0026kill_cache=2)](https://coveralls.io/github/pooltogether/pooltogether-pool-contracts?branch=master) [![built-with openzeppelin](https://img.shields.io/badge/built%20with-OpenZeppelin-3677FF)](https://docs.openzeppelin.com/)\n\nThe [PoolTogether](https://www.pooltogether.com/) Prize Savings Protocol Ethereum smart contracts.\n\nFor an overview of the concepts and API please see the [documentation](https://v3.docs.pooltogether.com/)\n\n# Setup\n\nThis project is available as an NPM package:\n\n```bash\n$ yarn add @pooltogether/pooltogether-contracts\n```\n\n# Usage\n\n## Artifacts\n\nThere are deployment artifacts available in the `deployments/` directory. For example, to pull in the PoolWithMultipleWinnersBuilder artifact:\n\n```javascript\nconst PoolWithMultipleWinnersBuilder = require('@pooltogether/pooltogether-contracts/deployments/rinkeby/PoolWithMultipleWinnersBuilder.json')\nconst {\n  abi, \n  address, \n  receipt\n } = PoolWithMultipleWinnersBuilder\n```\n\n## ABIs\n\nApplication Binary Interfaces for all PoolTogether contracts and related contracts are available in the `abis/` directory.\n\nFor example, to pull in the PrizePool ABI:\n\n```javascript\nconst PrizePool = require('@pooltogether/pooltogether-contracts/abis/PrizePool.json')\n```\n\n# Development\n\nFirst clone this repository and enter the directory.\n\nInstall dependencies:\n\n```\n$ yarn\n```\n\nWe use [direnv](https://direnv.net/) to manage environment variables.  You'll likely need to install it.\n\n# Testing\n\nWe use [Hardhat](https://hardhat.dev) and [hardhat-deploy](https://github.com/wighawag/hardhat-deploy)\n\nTo run unit \u0026 integration tests:\n\n```sh\n$ yarn test\n```\n\nTo run coverage:\n\n```sh\n$ yarn coverage\n```\n\nTo run fuzz tests:\n\n```sh\n$ yarn echidna\n```\n\n# Fork Testing\n\nEnsure your environment variables are set up.  Make sure your Alchemy URL is set.  Now start a local fork:\n\n```sh\n$ yarn start-fork\n```\n\nSetup account impersonation and transfer eth:\n\n```sh\n$ ./scripts/setup.sh\n```\n\n# Deployment\n\n## Deploy Locally\n\nStart a local node and deploy the top-level contracts:\n\n```bash\n$ yarn start\n```\n\nNOTE: When you run this command it will reset the local blockchain.\n\n## Connect Locally\n\nStart up a [Hardhat Console](https://hardhat.dev/guides/hardhat-console.html):\n\n```bash\n$ hardhat console --network localhost\n```\n\nNow you can load up the deployed contracts using [hardhat-deploy](https://github.com/wighawag/hardhat-deploy):\n\n```javascript\n\u003e await deployments.all()\n```\n\nIf you want to send transactions, you can get the signers like so:\n\n```javascript\n\u003e let signers = await ethers.getSigners()\n```\n\nLet's mint some Dai for ourselves:\n\n```javascript\n\u003e let dai = await ethers.getContractAt('ERC20Mintable', (await deployments.get('Dai')).address, signers[0])\n\u003e await dai.mint(signers[0]._address, ethers.utils.parseEther('10000'))\n\u003e ethers.utils.formatEther(await dai.balanceOf(signers[0]._address))\n```\n\n## Deploy to Live Networks\n\nCopy over .envrc.example to .envrc\n\n```\n$ cp .envrc.example .envrc\n```\n\nMake sure to update the enviroment variables with suitable values.\n\nNow enable the env vars using [direnv](https://direnv.net/docs/installation.html)\n\n```\n$ direnv allow\n```\n\nNow deploy to a network like so:\n\n```\n$ yarn deploy rinkeby\n```\n\nIt will update the `deployments/` dir.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpooltogether%2Fpooltogether-pool-contracts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpooltogether%2Fpooltogether-pool-contracts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpooltogether%2Fpooltogether-pool-contracts/lists"}