@pooltogether/pooltogether-rng-contracts v1.5.3
PoolTogether Prize Savings Protocol - RNG Service
The PoolTogether Prize Savings Protocol Ethereum smart contracts.
See the documentation
Deployments
RNG contracts in this repository
External RNG contracts
The RNGWitnet contract is a custom-built solution to request a random number from the Witnet oracle. It is hosted in a separate repository as it is built using the Python-based Brownie development suite.
Setup
Install Dependencies
$ yarnCopy over .envrc.example to .envrc
$ cp .envrc.example .envrcMake sure to update the enviroment variables with suitable values.
Now enable the env vars using direnv
$ direnv allowInteracting using Hardhat Console
You can interact with the contract using the buidler console:
$ npx hardhat console --network [network]Then you can interact with deployed contracts:
> const signer = (await ethers.getSigners())[0]
> const d = await deployments.all()
> const chainlink = await ethers.getContractAt('RNGChainlink', d.RNGChainlink.address, signer)
> const link = await ethers.getContractAt('IERC20', (await chainlink.getLink()), signer)Deploying
You can deploy using the deploy script:
$ yarn deploy [network]Where network can be mainnet, rinkeby, ropsten, or kovan.
Now you should verify the contracts on Etherscan:
$ yarn etherscan-verify [network]The network option is the same as above.
Development
Verify Codebase (hint + test)
$ yarn verifyRun Static Code Analysis
$ yarn hintRun Tests
$ yarn testRun Coverage
$ yarn coverageRun Gas Report
$ yarn gasStart Local TestRPC & Deploy
$ yarn startDeploy to an Ethereum Network
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago