Skip to content

Commit 00adbe4

Browse files
committed
docs: add basic usage for developers to readme
1 parent 5e5ad46 commit 00adbe4

File tree

1 file changed

+26
-5
lines changed

1 file changed

+26
-5
lines changed

README.md

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Example Implementations
22

3-
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.
3+
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.
44

55
## Contracts
66

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

1717
### Development
1818

19-
Install the requirements:
19+
## Preqrequisites
20+
21+
1. Install the required packages:
22+
```
23+
yarn
24+
```
25+
2. Copy `.env.example` to `.env` and modify values of the required environment variables:
26+
1. `POLYGON_URL`/`MUMBAI_URL` to specify custom RPC endpoints for Polygon Mainnet, respectively, the Mumbai Testnet.
27+
2. `PRIVATE_KEY` and `POLYGONSCAN_KEY` in order to deploy contract and publish source code on [polygonscan](https://polygonscan.com).
28+
29+
## Commands
30+
31+
Use the following commands to compile, test and deploy the contracts:
2032
```
21-
yarn install
33+
yarn compile
34+
yarn test # test using a polygon fork
35+
yarn coverage # test using a polygon fork with coverage report
36+
yarn deploy
2237
```
2338

24-
Generate documentation from the contract's [natspec](https://docs.soliditylang.org/en/latest/natspec-format.html) comments in [./docs/](./docs/) using
39+
Documentation can be auto-generated from the contract's [natspec](https://docs.soliditylang.org/en/latest/natspec-format.html) in [./docs/](./docs/) using
2540
```
26-
npx hardhat docgen
41+
yarn doc
2742
```
43+
44+
Deploy the contract locally with:
45+
```
46+
yarn hardhat --network hardhat deployOffsetHelper --verify false
47+
```
48+

0 commit comments

Comments
 (0)