@pooltogether/pooltogether-rng-contracts

    1.4.0 • Public • Published

    PoolTogether Prize Savings Protocol - RNG Service

    Coverage Status

    built-with openzeppelin

    The PoolTogether Prize Savings Protocol Ethereum smart contracts.

    See the documentation

    Deployments

    The Chainlink RNG is supported on mainnet, rinkeby and kovan.

    The Blockhash RNG is supported on mainnet, rinkeby, kovan, and ropsten.

    Setup

    Install Dependencies

    $ yarn

    Copy over .envrc.example to .envrc

    $ cp .envrc.example .envrc

    Make sure to update the enviroment variables with suitable values.

    Now enable the env vars using direnv

    $ direnv allow

    Interacting using Buidler Console

    You can interact with the contract using the buidler console:

    $ buidler 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 verify

    Run Static Code Analysis

    $ yarn hint

    Run Tests

    $ yarn test

    Run Coverage

    $ yarn coverage

    Run Gas Report

    $ yarn gas

    Start Local TestRPC & Deploy

    $ yarn start

    Deploy to an Ethereum Network

    Keywords

    none

    Install

    npm i @pooltogether/pooltogether-rng-contracts

    DownloadsWeekly Downloads

    39

    Version

    1.4.0

    License

    GPL-3.0

    Unpacked Size

    2.22 MB

    Total Files

    99

    Last publish

    Collaborators

    • asselstine
    • chuckbergeron
    • dylandesrosier
    • aodhgan
    • pierrick
    • kamesdev