Skip to content

Commit

Permalink
docs: add basic usage for developers to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
danceratopz committed Jun 14, 2022
1 parent 5e5ad46 commit 00adbe4
Showing 1 changed file with 26 additions and 5 deletions.
31 changes: 26 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Example Implementations

A collection of Solidity contract examples that implement, integrate with or demonstrate the use of Toucan's contracts and infrastructure. Some of these may be used in production.
A collection of Solidity contract examples that integrate with or demonstrate the use of Toucan's contracts and infrastructure. Some of these may be used in production.

## Contracts

Expand All @@ -16,12 +16,33 @@ See [./docs/OffsetHelper.md](./docs/OffsetHelper.md) for detailed documentation.

### Development

Install the requirements:
## Preqrequisites

1. Install the required packages:
```
yarn
```
2. Copy `.env.example` to `.env` and modify values of the required environment variables:
1. `POLYGON_URL`/`MUMBAI_URL` to specify custom RPC endpoints for Polygon Mainnet, respectively, the Mumbai Testnet.
2. `PRIVATE_KEY` and `POLYGONSCAN_KEY` in order to deploy contract and publish source code on [polygonscan](https://polygonscan.com).

## Commands

Use the following commands to compile, test and deploy the contracts:
```
yarn install
yarn compile
yarn test # test using a polygon fork
yarn coverage # test using a polygon fork with coverage report
yarn deploy
```

Generate documentation from the contract's [natspec](https://docs.soliditylang.org/en/latest/natspec-format.html) comments in [./docs/](./docs/) using
Documentation can be auto-generated from the contract's [natspec](https://docs.soliditylang.org/en/latest/natspec-format.html) in [./docs/](./docs/) using
```
npx hardhat docgen
yarn doc
```

Deploy the contract locally with:
```
yarn hardhat --network hardhat deployOffsetHelper --verify false
```

0 comments on commit 00adbe4

Please sign in to comment.