Skip to content

Commit

Permalink
Merge pull request #6 from pooltogether/fixes/c4-audit
Browse files Browse the repository at this point in the history
C4 audit mitigations
  • Loading branch information
PierrickGT committed Jul 12, 2021
2 parents 1e3e652 + 67a45f4 commit bd390c0
Show file tree
Hide file tree
Showing 117 changed files with 434 additions and 23,641 deletions.
19 changes: 19 additions & 0 deletions .envrc.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Used to deploy to testnets
export HDWALLET_MNEMONIC=''

# Used to deploy to testnets
export INFURA_API_KEY=''

# Used for verifying contracts on Etherscan
export ETHERSCAN_API_KEY=''

# Required for forking
export ALCHEMY_URL=''
export FORK_ENABLED=''

# Used to hide deploy logs
export HIDE_DEPLOY_LOG=''

# Used to generate a gas usage report
export REPORT_GAS=''
export COINMARKETCAP_API_KEY=''
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
node_modules

#Hardhat files
abi
abis
cache
artifacts
.env
.envrc
demo.ts
test/idleYieldSourceOld.test.ts
test/IdleYielSourceUnitTest.test.ts
Expand All @@ -20,4 +22,4 @@ coverage
coverage.json

# VS Code
.history
.history
35 changes: 20 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,36 @@

# IdleYieldSource for PoolTogether Prize Pool

![Tests](https://github.com/sunnyRK/IdleYieldSource-PoolTogether/actions/workflows/main.yml/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/sunnyRK/IdleYieldSource-PoolTogether/badge.svg?branch=master)](https://coveralls.io/github/sunnyRK/IdleYieldSource-PoolTogether?branch=master)
[![built-with openzeppelin](https://img.shields.io/badge/built%20with-OpenZeppelin-3677FF)](https://docs.openzeppelin.com/)
![Tests](https://github.com/pooltogether/idle-yield-source/actions/workflows/main.yml/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/pooltogether/idle-yield-source/badge.svg)](https://coveralls.io/github/pooltogether/idle-yield-source)
[![built-with openzeppelin](https://img.shields.io/badge/built%20with-OpenZeppelin-3677FF)](https://docs.openzeppelin.com/)

PoolTogether Yield Source that uses [Idle](https://idle.finance/) to generate yield by lending ERC20 token supported by Idle and deposited into the Idle Yield Source.

## Setup

1). Make `.env` file on root folder and add below variable with your config,
1). We use [direnv](https://direnv.net) to manage environment variables. You'll likely need to install it.

i). MNEMONIC=''
ii). INFURA_API_KEY=
iii). ALCHEMY_API_KEY=
iv). FORK_ENABLED="false"
Copy `.envrc.example` and write down the env variables needed to run this project.
```
cp .envrc.example .envrc
```

2). Install Dependency by

yarn
Once your env variables are setup, load them with:
```
direnv allow
```

2). Install Dependency by running:

yarn

3). To compile Smart contract code:

yarn compile

3). To run unit tests:

yarn test

4). Check test coverage
Expand All @@ -58,4 +63,4 @@ PoolTogether Yield Source that uses [Idle](https://idle.finance/) to generate yi
Deployed Yield Source...
Initializing Yield Source
Initialized!!
Deployed New IdleYieldSource Address 0xecD4b75E7ccf571CF99B0F51955866657469bB49
Deployed New IdleYieldSource Address 0xecD4b75E7ccf571CF99B0F51955866657469bB49

This file was deleted.

Loading

0 comments on commit bd390c0

Please sign in to comment.