Skip to content

Latest commit

 

History

History
92 lines (58 loc) · 2.22 KB

README.md

File metadata and controls

92 lines (58 loc) · 2.22 KB

PoolTogether Brand


PoolTogether mStable Yield Source

PoolTogether Yield Source that uses mStable to generate yield by depositing a mStable asset, eg mUSD, into a mStable interest-bearing savings contract, eg imUSD.

Usage

Installation

Install dependencies:

yarn

Compile

To compile the Solidity contracts and generate the contract types and factories:

yarn run compile 

The contract ABIs are output to /abis.

The Hardhat build artifacts are output to /build.

The contract types are output to /types/pooltogether.

Typescript outputs to /dist.

Test

We use Hardhat, Ethers V5, Waffle and Chai matchers for testing.

To run unit tests:

yarn test

To run coverage:

yarn coverage

Mainnet fork

To run tests against local fork of mainnet

export NODE_URL=https://eth-mainnet.alchemyapi.io/v2/<your key>
yarn test:fork

The forks tests are in test-fork/poolTogether.spec.ts.

Deployment

A Hardhat task is used for deployment to mainnet using Open Zeppelin's Defender Relay wallet. Create and API key for the Relay wallet; export the API key and secret as per the below; and then delete the API key so it can not be used again.

export DEFENDER_API_KEY=<Open Zeppelin Defender Relay API key>
export DEFENDER_API_SECRET=<Open Zeppelin Defender Relay API secret>
yarn deploy --masset mUSD

The deployment task can be found in tasks/poolTogether.ts.

Code quality

Prettier is used to format TypeScript code. Use it by running:

yarn format

Flatten for contract verification

yarn run flatten

Output to the _flat folder.