Skip to content

Commit c04fa9c

Browse files
committed
restructure as monorepo
1 parent f5df11f commit c04fa9c

23 files changed

+11227
-11195
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
with:
1414
path: "**/node_modules"
1515
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
16+
- run: cd packages/contracts
1617
- run: yarn
1718
- run: yarn build
1819
- run: yarn coverage

.gitignore

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,2 @@
1-
node_modules
2-
build
31
.DS_Store
4-
artifacts/
5-
env/
6-
.env
7-
.openzeppelin
8-
coverage*
9-
deployments
10-
typechain-types
2+
node_modules

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
# Token Lock Contract
1+
# Token Lock
2+
3+
Lock ERC-20 token for a pre-defined amount of time
4+
5+
## Contract
26

37
[![Build Status](https://github.com/gnosis/token-lock/actions/workflows/ci.yml/badge.svg)](https://github.com/gnosis/token-lock/actions/workflows/ci.yml)
48
[![Coverage Status](https://coveralls.io/repos/github/gnosis/token-lock/badge.svg?branch=master)](https://coveralls.io/github/gnosis/token-lock)
@@ -32,6 +36,7 @@ Deploys the implementation contract and an upgradable proxy.
3236
When run multiple times, it will create multiple proxies sharing the same implementation contract.
3337

3438
```
39+
cd packages/contracts
3540
yarn build
3641
yarn deploy rinkeby \
3742
--owner <OWNER> \
@@ -50,6 +55,7 @@ You can also find these values in .openzeppelin/<network>.json.
5055
Verifies the implementation contract at the specified address in Etherscan.
5156

5257
```
58+
cd packages/contracts
5359
yarn verify rinkeby --implementation <IMPLEMENTATION_CONTRACT>
5460
```
5561

@@ -61,6 +67,7 @@ This is done with a [simple click on a button](https://medium.com/etherscan-blog
6167
Deploys the latest version of the implementation contract (if necessary) and upgrades the existing proxy contract to use this one.
6268

6369
```
70+
cd packages/contracts
6471
yarn run upgrade rinkeby --proxy <PROXY_CONTRACT>
6572
```
6673

@@ -74,6 +81,10 @@ The contracts have been developed with [Solidity 0.8.6](https://github.com/ether
7481

7582
All contracts are WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7683

77-
### License
84+
## App
85+
86+
A front-end for the token lock contract based on next.js.
87+
88+
## License
7889

7990
Created under the [LGPL-3.0+ license](LICENSE).

package.json

Lines changed: 7 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,19 @@
11
{
2-
"name": "token-lock",
3-
"version": "1.0.0",
2+
"name": "token-lock-monorepo",
3+
"private": true,
44
"description": "Lock ERC-20 tokens for a pre-defined amount of time",
5-
"directories": {
6-
"test": "test"
7-
},
85
"scripts": {
9-
"build": "hardhat compile",
10-
"test": "hardhat test",
11-
"test:watch": "mocha -w",
12-
"deploy": "hardhat initialDeploy --network",
13-
"verify": "hardhat verifyEtherscan --network",
14-
"upgrade": "hardhat upgrade --network",
15-
"coverage": "hardhat coverage",
16-
"lint": "yarn lint:sol && yarn lint:ts",
17-
"lint:sol": "solhint 'contracts/**/*.sol'",
18-
"lint:ts": "eslint --max-warnings 0 .",
19-
"fmt:sol": "prettier 'contracts/**/*.sol' -w",
20-
"fmt:ts": "prettier '(src|test)/**/*.ts' -w",
21-
"prepack": "yarn build",
22-
"prepare": "husky install"
6+
"prepare": "husky install",
7+
"postinstall": "yarn contracts:install",
8+
"contracts:install": "cd packages/contracts && yarn install",
9+
"app:install": "cd packages/app && yarn install"
2310
},
2411
"repository": {
2512
"type": "git"
2613
},
2714
"author": "[email protected]",
2815
"license": "LGPL-3.0+",
2916
"devDependencies": {
30-
"@gnosis.pm/zodiac": "1.0.3",
31-
"@nomiclabs/hardhat-ethers": "2.0.3",
32-
"@nomiclabs/hardhat-etherscan": "2.1.8",
33-
"@nomiclabs/hardhat-waffle": "2.0.1",
34-
"@openzeppelin/hardhat-upgrades": "1.12.0",
35-
"@typechain/ethers-v5": "8.0.5",
36-
"@typechain/hardhat": "3.1.0",
37-
"@types/chai": "4.3.0",
38-
"@types/dotenv": "8.2.0",
39-
"@types/mocha": "9.0.0",
40-
"@types/node": "17.0.8",
41-
"@types/yargs": "17.0.8",
42-
"@typescript-eslint/eslint-plugin": "5.9.0",
43-
"@typescript-eslint/parser": "5.9.0",
44-
"argv": "0.0.2",
45-
"chai": "4.3.4",
46-
"debug": "4.3.3",
47-
"dotenv": "10.0.0",
48-
"eslint": "8.6.0",
49-
"eslint-config-prettier": "8.3.0",
50-
"eslint-plugin-import": "2.25.4",
51-
"eslint-plugin-no-only-tests": "2.6.0",
52-
"eslint-plugin-prettier": "4.0.0",
53-
"ethereum-waffle": "3.4.0",
54-
"ethers": "5.5.2",
55-
"hardhat": "2.8.0",
56-
"hardhat-deploy": "0.9.24",
57-
"hardhat-gas-reporter": "1.0.6",
58-
"husky": "7.0.4",
59-
"prettier": "2.5.1",
60-
"prettier-plugin-solidity": "1.0.0-beta.19",
61-
"solc": "0.8.11",
62-
"solhint": "3.3.6",
63-
"solhint-plugin-prettier": "0.0.5",
64-
"solidity-coverage": "0.7.17",
65-
"ts-node": "10.4.0",
66-
"typechain": "6.1.0",
67-
"typescript": "4.5.4",
68-
"yargs": "17.3.1"
69-
},
70-
"dependencies": {
71-
"@gnosis.pm/mock-contract": "4.0.0",
72-
"@gnosis.pm/safe-contracts": "1.3.0",
73-
"@openzeppelin/contracts": "4.4.1",
74-
"@openzeppelin/contracts-upgradeable": "4.4.1"
75-
},
76-
"resolutions": {
77-
"bitcore-lib": "8.25.0"
17+
"husky": "7.0.4"
7818
}
7919
}
File renamed without changes.
File renamed without changes.

packages/contracts/.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
build/
3+
.openzeppelin/
4+
typechain-types/
5+
env
6+
.env
7+
coverage*
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)