{"_id":"@avedith/pooltogether-rng-contracts","name":"@avedith/pooltogether-rng-contracts","dist-tags":{"latest":"1.5.2"},"versions":{"1.5.2":{"name":"@avedith/pooltogether-rng-contracts","author":{"name":"Avedith"},"version":"1.5.2","description":"PoolTogether RNG Service Smart Contracts","license":"GPL-3.0","main":"index.js","scripts":{"docs":"solidity-docgen --solc-module solc-0.8 -i contracts -o docs -t templates","reinstall":"rm -rf node_modules/ && rm -f yarn.lock && yarn clean && yarn","verify":"yarn hint && yarn test","hint":"solhint \"contracts/**/*.sol\"","test":"yarn clean-test && hardhat test","compile":"hardhat --show-stack-traces --max-memory 8192 compile","coverage":"HIDE_DEPLOY_LOG=true OPTIMIZER_DISABLED=true hardhat coverage","coverage:file":"HIDE_DEPLOY_LOG=true OPTIMIZER_DISABLED=true hardhat coverage --testfiles","gas":"REPORT_GAS=true hardhat test","start":"DEBUG=* hardhat node","deploy":"hardhat deploy --write true --network","clean":"rm -rf build cache","clean-test":"rm -rf deployments/hardhatevm_31337 test-results.xml","format":"prettier --config .prettierrc --write \"**/*.*.{ts,js}\" \"contracts/**/*.sol\"","format:file":"prettier --config .prettierrc --write","prepack":"rm -rf build cache && hardhat compile","etherscan-verify":"hardhat etherscan-verify --solc-input --api-key $ETHERSCAN_API_KEY --network","postpublish":"PACKAGE_VERSION=$(./scripts/package-version.sh) && git tag -ae v$PACKAGE_VERSION && git push --tags"},"dependencies":{"@pooltogether/owner-manager-contracts":"1.1.0"},"devDependencies":{"@chainlink/contracts":"0.4.0","@chainlink/test-helpers":"0.0.6","@nomiclabs/hardhat-ethers":"2.0.4","@nomiclabs/hardhat-etherscan":"3.0.0","@nomiclabs/hardhat-waffle":"2.0.2","@openzeppelin/contracts":"4.4.2","@resolver-engine/core":"0.3.3","@types/node":"17.0.12","chai":"4.3.6","debug":"4.3.3","ethereum-waffle":"3.4.0","ethers":"5.5.3","hardhat":"2.8.3","hardhat-abi-exporter":"2.8.0","hardhat-dependency-compiler":"1.1.2","hardhat-deploy":"0.9.28","hardhat-deploy-ethers":"0.3.0-beta.13","hardhat-gas-reporter":"1.0.7","mocha-junit-reporter":"2.0.2","prettier":"2.5.1","prettier-plugin-solidity":"1.0.0-beta.19","solc":"0.8.6","solc-0.8":"npm:solc@0.8.6solc","solhint":"3.3.6","solidity-coverage":"0.7.18","solidity-docgen":"0.5.16","ts-node":"10.4.0","typescript":"4.5.5"},"gitHead":"0bccdbc4a2867872fc962f8ba6568b1b68b445c9","_id":"@avedith/pooltogether-rng-contracts@1.5.2","_nodeVersion":"16.9.0","_npmVersion":"7.21.1","dist":{"integrity":"sha512-8CTv2W9375Q4Byy30y/AGWIC/VGs8a0fh/eDz4tJifzul4DV92ZNLAWH2LO2tj4xxI4Gu8IlkGhSIcTFm7zVlQ==","shasum":"3eac738330fff01ce6cd40027285d3c425c4575c","tarball":"https://registry.npmjs.org/@avedith/pooltogether-rng-contracts/-/pooltogether-rng-contracts-1.5.2.tgz","fileCount":51,"unpackedSize":2278020,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDWtpaDy8CY4fm8VQzKUovd/rnXz7zd35FrUrOUl7cbHAIgKGmelji4QVZU0CLw6wPi3WG8pQk6DQAuTH3UnGg20v4="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiZxgsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoh7g//bxKK/UY1/+p4WhDuU7uU2HxSzgCOImE+rHQGi1bbwf51MSLF\r\nQDLIelF8rlAB6NXl7N1H0LTRgtnKAEYgBMJzAGg5skM8lpeCK7+79UNrjr3m\r\nRam5X80lseAYTSc7ygVL7ESYpilEDGggUZmRyRapvdKkNCqiPh8Cz48+TAsF\r\n87oqgnYEbyfTJ+R8WxNdiCUwZlMCRRGVQmlMMB7vB86oaTPHwUV3i7zthmbR\r\na2d/DmQfojtKsk4UuuIMhe+sF3Cgq9lZGFn/SxP2F1E6vW5FmIx5cMlho9MX\r\niIcNioNxuMboeoC6NRZK+GhlvWOGG7rMeyxbOjB2hJWOXNvUZSYDXdC7N80m\r\n6GK8gjbfiXRNVxLFR0l+DKh7n73T9US94AR2OczM6mSnk/GNofGG5NkHXk0a\r\nrDAiabaRFcikb7zGHB7o2lAIq+romZ93wV20GBB0X0ORnWpH101ZViwDvXZV\r\nS6dBpXPWbNTtIgIkjZjwpPSyZOqHluKHE9EI6Lu2Qseh+q9K1NJy74yKcBaS\r\nZF3D6s9wNz3+8Fh8I4iHkZ1HNDMV+VNBgAgBSNam056w/zTCmREaEVRnqPuE\r\nVGRGBOopv5YmmT+cpz/UTeshywCQBFbaDXqTfFuVZLuv13FUsslDdrL+rlpO\r\n5B5EKwqJ/ZvFCU4Ub7UneZqL3jKHDejT6YU=\r\n=kwj1\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"avedith","email":"avedith@avedith.dev"},"directories":{},"maintainers":[{"name":"avedith","email":"avedith@avedith.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pooltogether-rng-contracts_1.5.2_1650923563842_0.31723452901586957"},"_hasShrinkwrap":false}},"time":{"created":"2022-04-25T21:52:43.756Z","1.5.2":"2022-04-25T21:52:44.087Z","modified":"2022-04-25T21:52:44.225Z"},"maintainers":[{"name":"avedith","email":"avedith@avedith.dev"}],"description":"PoolTogether RNG Service Smart Contracts","author":{"name":"Avedith"},"license":"GPL-3.0","readme":"# PoolTogether Prize Savings Protocol - RNG Service\r\n\r\n![Tests](https://github.com/pooltogether/pooltogether-rng-contracts/actions/workflows/main.yml/badge.svg)\r\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)\r\n[![built-with openzeppelin](https://img.shields.io/badge/built%20with-OpenZeppelin-3677FF)](https://docs.openzeppelin.com/)\r\n[![GPLv3 license](https://img.shields.io/badge/License-GPLv3-blue.svg)](http://perso.crans.org/besson/LICENSE.html)\r\n\r\nThe [PoolTogether](https://www.pooltogether.com/) Prize Savings Protocol Ethereum smart contracts.\r\n\r\nSee the [documentation](https://v4.docs.pooltogether.com)\r\n\r\n# Deployments\r\n\r\n- [Ethereum](https://v4.docs.pooltogether.com/protocol/deployments/rng#ethereum)\r\n- [Polygon](https://v4.docs.pooltogether.com/protocol/deployments/rng#polygon)\r\n\r\n# Overview\r\n- [RNGBlockhash](/contracts/RNGBlockhash.sol)\r\n- [RNGChainlink](/contracts/RNGChainlink.sol)\r\n- [RNGChainlinkV2](/contracts/RNGChainlinkV2.sol)\r\n\r\n# Setup\r\n\r\nInstall Dependencies\r\n\r\n```sh\r\n$ yarn\r\n```\r\n\r\nCopy over .envrc.example to .envrc\r\n\r\n```sh\r\n$ cp .envrc.example .envrc\r\n```\r\n\r\nMake sure to update the enviroment variables with suitable values.\r\n\r\nNow enable the env vars using [direnv](https://direnv.net/docs/installation.html)\r\n\r\n```sh\r\n$ direnv allow\r\n```\r\n\r\n# Interacting using Hardhat Console\r\n\r\nYou can interact with the contract using the buidler console:\r\n\r\n```sh\r\n$ npx hardhat console --network [network]\r\n```\r\n\r\nThen you can interact with deployed contracts:\r\n\r\n```javascript\r\n> const signer = (await ethers.getSigners())[0]\r\n> const d = await deployments.all()\r\n> const chainlink = await ethers.getContractAt('RNGChainlink', d.RNGChainlink.address, signer)\r\n> const link = await ethers.getContractAt('IERC20', (await chainlink.getLink()), signer)\r\n```\r\n\r\n# Deploying\r\n\r\nYou can deploy using the deploy script:\r\n\r\n```sh\r\n$ yarn deploy [network]\r\n```\r\n\r\nWhere [network] can be `mainnet`, `rinkeby`, `ropsten`, or `kovan`.\r\n\r\nNow you should verify the contracts on Etherscan:\r\n\r\n```sh\r\n$ yarn etherscan-verify [network]\r\n```\r\n\r\nThe network option is the same as above.\r\n\r\n# Development\r\n\r\nVerify Codebase (hint + test)\r\n\r\n```sh\r\n$ yarn verify\r\n```\r\n\r\nRun Static Code Analysis\r\n\r\n```sh\r\n$ yarn hint\r\n```\r\n\r\nRun Tests\r\n\r\n```sh\r\n$ yarn test\r\n```\r\n\r\nRun Coverage\r\n\r\n```sh\r\n$ yarn coverage\r\n```\r\n\r\nRun Gas Report\r\n\r\n```sh\r\n$ yarn gas\r\n```\r\n\r\nStart Local TestRPC & Deploy\r\n\r\n```sh\r\n$ yarn start\r\n```\r\n\r\nDeploy to an Ethereum Network\r\n","readmeFilename":"README.md"}