GithubHelp home page GithubHelp logo

panademo / pooltogether-rng-contracts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pooltogether/pooltogether-rng-contracts

0.0 0.0 0.0 756 KB

PoolTogether RNG Service

License: GNU General Public License v3.0

JavaScript 50.92% Solidity 48.65% Shell 0.42%

pooltogether-rng-contracts's Introduction

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

pooltogether-rng-contracts's People

Contributors

robsecord avatar asselstine avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.