{"id":20030816,"url":"https://github.com/generationsoftware/pt-v5-rng-contracts","last_synced_at":"2026-04-27T00:31:55.794Z","repository":{"id":180776260,"uuid":"665262698","full_name":"GenerationSoftware/pt-v5-rng-contracts","owner":"GenerationSoftware","description":"PoolTogether RNG Service","archived":false,"fork":false,"pushed_at":"2024-02-16T01:12:33.000Z","size":968,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-29T17:49:38.785Z","etag":null,"topics":["pooltogether","solidity"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/GenerationSoftware.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2023-07-11T20:08:32.000Z","updated_at":"2023-11-17T22:12:49.000Z","dependencies_parsed_at":"2023-07-12T20:34:01.553Z","dependency_job_id":"b836f089-b00e-42e3-86ad-e78dfb658b4f","html_url":"https://github.com/GenerationSoftware/pt-v5-rng-contracts","commit_stats":null,"previous_names":["generationsoftware/pt-v5-rng-contracts"],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/GenerationSoftware/pt-v5-rng-contracts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GenerationSoftware%2Fpt-v5-rng-contracts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GenerationSoftware%2Fpt-v5-rng-contracts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GenerationSoftware%2Fpt-v5-rng-contracts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GenerationSoftware%2Fpt-v5-rng-contracts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GenerationSoftware","download_url":"https://codeload.github.com/GenerationSoftware/pt-v5-rng-contracts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GenerationSoftware%2Fpt-v5-rng-contracts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32318417,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"ssl_error","status_checked_at":"2026-04-26T23:26:25.802Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["pooltogether","solidity"],"created_at":"2024-11-13T09:28:28.989Z","updated_at":"2026-04-27T00:31:55.770Z","avatar_url":"https://github.com/GenerationSoftware.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PoolTogether Prize Savings Protocol - RNG Service\n\n![Tests](https://github.com/pooltogether/pooltogether-rng-contracts/actions/workflows/main.yml/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/github/pooltogether/pooltogether-rng-contracts/badge.svg?branch=master)](https://coveralls.io/github/pooltogether/pooltogether-rng-contracts?branch=master)\n[![built-with openzeppelin](https://img.shields.io/badge/built%20with-OpenZeppelin-3677FF)](https://docs.openzeppelin.com/)\n[![GPLv3 license](https://img.shields.io/badge/License-GPLv3-blue.svg)](http://perso.crans.org/besson/LICENSE.html)\n\nThe [PoolTogether](https://www.pooltogether.com/) Prize Savings Protocol Ethereum smart contracts.\n\nSee the [documentation](https://v4.docs.pooltogether.com)\n\n# Deployments\n\n- [Ethereum](https://v4.docs.pooltogether.com/protocol/deployments/rng#ethereum)\n- [Polygon](https://v4.docs.pooltogether.com/protocol/deployments/rng#polygon)\n\n# RNG contracts in this repository\n- [RNGBlockhash](/contracts/RNGBlockhash.sol)\n- [RNGChainlink](/contracts/RNGChainlink.sol)\n- [RNGChainlinkV2](/contracts/RNGChainlinkV2.sol)\n\n# External RNG contracts\n- [RNGWitnet](https://github.com/drcpu-github/rng-witnet-pooltogether)\n\nThe RNGWitnet contract is a custom-built solution to request a [random number](https://docs.witnet.io/smart-contracts/witnet-randomness-oracle) from the [Witnet oracle](https://witnet.io/). It is hosted in a separate repository as it is built using the Python-based Brownie development suite.\n\n# Setup\n\nInstall Dependencies\n\n```sh\n$ yarn\n```\n\nCopy over .envrc.example to .envrc\n\n```sh\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```sh\n$ direnv allow\n```\n\n# Interacting using Hardhat Console\n\nYou can interact with the contract using the buidler console:\n\n```sh\n$ npx hardhat console --network [network]\n```\n\nThen you can interact with deployed contracts:\n\n```javascript\n\u003e const signer = (await ethers.getSigners())[0]\n\u003e const d = await deployments.all()\n\u003e const chainlink = await ethers.getContractAt('RNGChainlink', d.RNGChainlink.address, signer)\n\u003e const link = await ethers.getContractAt('IERC20', (await chainlink.getLink()), signer)\n```\n\n# Deploying\n\nYou can deploy using the deploy script:\n\n```sh\n$ yarn deploy [network]\n```\n\nWhere [network] can be `mainnet`, `rinkeby`, `ropsten`, or `kovan`.\n\nNow you should verify the contracts on Etherscan:\n\n```sh\n$ yarn etherscan-verify [network]\n```\n\nThe network option is the same as above.\n\n# Development\n\nVerify Codebase (hint + test)\n\n```sh\n$ yarn verify\n```\n\nRun Static Code Analysis\n\n```sh\n$ yarn hint\n```\n\nRun Tests\n\n```sh\n$ yarn test\n```\n\nRun Coverage\n\n```sh\n$ yarn coverage\n```\n\nRun Gas Report\n\n```sh\n$ yarn gas\n```\n\nStart Local TestRPC \u0026 Deploy\n\n```sh\n$ yarn start\n```\n\nDeploy to an Ethereum Network\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenerationsoftware%2Fpt-v5-rng-contracts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgenerationsoftware%2Fpt-v5-rng-contracts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenerationsoftware%2Fpt-v5-rng-contracts/lists"}