🚀. Socket Launch Week Day 3:Socket Firewall Now Blocks Malicious VS Code and Open VSX Extensions.Learn more
Sign In

@leap-network/pooltogether-rng-contracts

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leap-network/pooltogether-rng-contracts

PoolTogether RNG Service Smart Contracts

latest
npmnpm
Version
1.5.5
Version published
Maintainers
1
Created
Source

PoolTogether Prize Savings Protocol - RNG Service

Tests Coverage Status built-with openzeppelin GPLv3 license

The PoolTogether Prize Savings Protocol Ethereum smart contracts.

See the documentation

Deployments

  • Ethereum
  • Polygon

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

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

FAQs

Package last updated on 07 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts