{"id":20002074,"url":"https://github.com/pooltogether/buidler-console","last_synced_at":"2026-06-13T09:32:29.725Z","repository":{"id":98739953,"uuid":"299438494","full_name":"pooltogether/buidler-console","owner":"pooltogether","description":"A project that makes interacting with on-chain pools much easier","archived":false,"fork":false,"pushed_at":"2020-09-28T21:45:18.000Z","size":131,"stargazers_count":3,"open_issues_count":0,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-27T15:28:30.123Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"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":null,"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":"2020-09-28T21:43:44.000Z","updated_at":"2022-03-29T04:28:17.000Z","dependencies_parsed_at":"2023-03-03T15:45:33.004Z","dependency_job_id":null,"html_url":"https://github.com/pooltogether/buidler-console","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pooltogether/buidler-console","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pooltogether%2Fbuidler-console","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pooltogether%2Fbuidler-console/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pooltogether%2Fbuidler-console/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pooltogether%2Fbuidler-console/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pooltogether","download_url":"https://codeload.github.com/pooltogether/buidler-console/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pooltogether%2Fbuidler-console/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34279898,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"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:40.379Z","updated_at":"2026-06-13T09:32:29.707Z","avatar_url":"https://github.com/pooltogether.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PoolTogether Buidler Console\n\nEasily interact with PoolTogether contracts using a node repl.\n\nThis project is a basic [Buidler](https://buidler.dev/) project that users Ethers.js and includes the PoolTogether contracts.\n\n## Setup\n\nFirst clone the repository then run:\n\n```bash\n$ yarn\n```\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.  You'll want to administer any pools you create, so be sure to use a mnemonic that you used to create a prize pool.\n\nNow enable the env vars using [direnv](https://direnv.net/docs/installation.html)\n\n```\n$ direnv allow\n```\n\n## Console\n\nLoad up the Buidler console.  It will connect to Rinkeby by default:\n\n```bash\n$ buidler console\n```\n\nGrab the Contract loader helpers:\n\n```js\n\u003e const { poolAt, singleRandomWinnerAt, erc20At } = require('./loaders')\n```\n\nThese helpers will instantiate Ethers.js [Contract](https://docs.ethers.io/v5/api/contract/) objects.\n\nNow let's start talking a pool that was created using the [Prize Pool Builder](https://builder.pooltogether.com):\n\n```js\n\u003e pool = await poolAt('0xe6D68A3295Ba8ce28B5F21cBCEc562c804DF6e5F')\n```\n\nLet's also connect to its prize strategy:\n\n```js\n\u003e prizeStrategy = await singleRandomWinnerAt('0xed7E59eFffF107E0424931D76bE2De6cF42E6F73')\n```\n\nIf you've configured the mnemonic in the envrc to be the owner of the pool and strategy, you can configure them now!\n\n## External ERC20 Award\n\nThe Single Random Winner can award (almost) any tokens held by the Prize Pool to the winner.  Let's award Compound Rinkeby Dai to the winner.\n\nIn the Buidler console, add Dai (Compound Rinkeby version) as an external ERC20 award to the strategy:\n\n```js\n\u003e await ps.addExternalErc20Award('0x5592EC0cfb4dbc12D3aB100b257153436a1f0FEa')\n```\n\nNow transfer 50 Dai to the prize pool:\n\n```js\n\u003e dai = await erc20At('0x5592EC0cfb4dbc12D3aB100b257153436a1f0FEa')\n\u003e await dai.transfer(pool.address, ethers.utils.parseEther('50'))\n```\n\nNext time the prize strategy awards the prize, it'll also give away 50 dai!\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpooltogether%2Fbuidler-console","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpooltogether%2Fbuidler-console","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpooltogether%2Fbuidler-console/lists"}