mirror of
https://github.com/zkopru-network/zkopru.git
synced 2026-01-10 06:57:58 -05:00
chore: update config files
This commit is contained in:
@@ -3,9 +3,9 @@ workflows:
|
||||
test_app:
|
||||
jobs:
|
||||
- build
|
||||
- lint:
|
||||
requires:
|
||||
- build
|
||||
# - lint:
|
||||
# requires:
|
||||
# - build
|
||||
- load_keys:
|
||||
requires:
|
||||
- build
|
||||
@@ -51,9 +51,6 @@ jobs:
|
||||
- run:
|
||||
name: Install
|
||||
command: yarn
|
||||
- run:
|
||||
name: Build Contract
|
||||
command: yarn build:contract
|
||||
- run:
|
||||
name: Build TS
|
||||
command: yarn build:ts:serial
|
||||
@@ -99,9 +96,6 @@ jobs:
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: ~/
|
||||
- run:
|
||||
name: Build Testnet
|
||||
command: docker-compose -f compose/docker-compose.yml build contracts
|
||||
- run:
|
||||
name: Coordinator Tests
|
||||
command: yarn test --scope=@zkopru/coordinator
|
||||
@@ -111,9 +105,6 @@ jobs:
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: ~/
|
||||
- run:
|
||||
name: Build Testnet
|
||||
command: docker-compose -f compose/docker-compose.yml build contracts-for-integration-test
|
||||
- run:
|
||||
name: Generate Block Data
|
||||
command: |
|
||||
@@ -191,9 +182,6 @@ jobs:
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: ~/
|
||||
- run:
|
||||
name: Build Testnet
|
||||
command: docker-compose -f compose/docker-compose.yml build contracts-for-integration-test
|
||||
- run:
|
||||
name: Integration Tests
|
||||
command: DEBUG=1 yarn test --scope=@zkopru/integration-test
|
||||
command: LOG_LEVEL=debug yarn test --scope=@zkopru/integration-test
|
||||
|
||||
@@ -17,7 +17,7 @@ const common = {
|
||||
'jest/no-focused-tests': 'error',
|
||||
'jest/no-identical-title': 'error',
|
||||
'jest/prefer-to-have-length': 'warn',
|
||||
'jest/valid-expect': 'error',
|
||||
'jest/valid-expect': 'off',
|
||||
'jest/expect-expect': 'off',
|
||||
'jest/prefer-expect-assertions': 'off',
|
||||
'jest/no-test-return-statement': 'off',
|
||||
@@ -35,6 +35,7 @@ const common = {
|
||||
'no-shadow': 'off',
|
||||
'no-bitwise': 'off',
|
||||
'no-unused-vars': 'off',
|
||||
'no-underscore-dangle': 'off',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -14,6 +14,9 @@ junit.xml
|
||||
dist
|
||||
browser
|
||||
.build-cache
|
||||
**/*/cache
|
||||
**/*/artifacts
|
||||
**/*/typechain
|
||||
keys.tgz
|
||||
keys/
|
||||
# Created by https://www.gitignore.io/api/node,intellij+all,visualstudiocode
|
||||
|
||||
@@ -4,7 +4,7 @@ services:
|
||||
contracts:
|
||||
image: zkoprunet/contracts:2.0.0-beta.0
|
||||
build:
|
||||
context: ../packages/contracts/
|
||||
context: ../
|
||||
dockerfile: ../../dockerfiles/Contract.dockerfile
|
||||
contracts-for-integration-test:
|
||||
image: zkoprunet/contracts-integration-test:2.0.0-beta.0
|
||||
|
||||
@@ -9,16 +9,15 @@ RUN apk add --no-cache --virtual .gyp \
|
||||
python3 \
|
||||
make \
|
||||
g++ \
|
||||
&& yarn global add truffle ganache-cli \
|
||||
&& yarn global add ganache-cli \
|
||||
&& yarn install \
|
||||
&& apk del .gyp
|
||||
|
||||
COPY ./contracts /proj/contracts
|
||||
COPY ./utils /proj/utils
|
||||
COPY ./migrations /proj/migrations
|
||||
COPY ./truffle-config.js /proj/truffle-config.js
|
||||
RUN truffle compile
|
||||
COPY ./hardhat.config.ts /proj/hardhat.config.ts
|
||||
RUN yarn compile
|
||||
EXPOSE 5000
|
||||
COPY ./keys /proj/keys
|
||||
RUN ganache-cli --db=/data -i 20200406 -p 5000 --gasLimit 12000000 --deterministic --host 0.0.0.0 & sleep 5 && truffle migrate --network testnet
|
||||
RUN ganache-cli --db=/data -i 20200406 -p 5000 --gasLimit 12000000 --deterministic --host 0.0.0.0 & sleep 5 && yarn hardhat run scripts/deploy.ts --network testnet
|
||||
CMD ganache-cli --db=/data -b 5 -i 20200406 -p 5000 --gasLimit 12000000 --deterministic --host 0.0.0.0 --gasPrice 2000000000
|
||||
|
||||
@@ -13,7 +13,7 @@ RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.10/m
|
||||
make \
|
||||
g++ \
|
||||
chromium \
|
||||
&& yarn global add truffle ganache-cli \
|
||||
&& yarn global add hardhat ganache-cli \
|
||||
&& yarn \
|
||||
&& yarn install \
|
||||
&& npx lerna run build --scope=@zkopru/cli \
|
||||
@@ -22,7 +22,7 @@ RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.10/m
|
||||
WORKDIR /proj/zkopru/packages/cli
|
||||
|
||||
RUN ganache-cli --db=/proj/data -i 20200406 -p 5000 --gasLimit 12000000 --deterministic --host 0.0.0.0 & \
|
||||
sleep 5 && cd /proj/zkopru/packages/contracts && truffle migrate --network testnet
|
||||
sleep 5 && cd /proj/zkopru/packages/contracts && hardhat run --network testnet
|
||||
|
||||
COPY ./packages/circuits/keys /proj/zkopru/packages/cli/keys
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ module.exports = {
|
||||
transform: {
|
||||
'^.+\\.ts$': 'ts-jest',
|
||||
},
|
||||
setupFilesAfterEnv: ['jest-expect-message'],
|
||||
testRegex: '(/tests/.*.(test|spec)).(jsx?|tsx?)$',
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
|
||||
collectCoverage: true,
|
||||
|
||||
95
package.json
95
package.json
@@ -1,52 +1,51 @@
|
||||
{
|
||||
"name": "zkopru",
|
||||
"nams": "zkopru",
|
||||
"version": "2.0.0-beta.8",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"private": true,
|
||||
"license": "GPL-3.0-or-later",
|
||||
"workspaces": [
|
||||
"packages/*"
|
||||
],
|
||||
"scripts": {
|
||||
"bootstrap": "yarn && yarn images pull && yarn build && lerna run gendata",
|
||||
"postinstall": "lerna bootstrap && yarn clean && shx rm -rf packages/*/node_modules",
|
||||
"images": "docker-compose -f compose/docker-compose.yml",
|
||||
"images:pull": "docker-compose -f compose/docker-compose.yml pull",
|
||||
"images:build": "docker-compose -f compose/docker-compose.yml build",
|
||||
"images:push": "docker-compose -f compose/docker-compose.yml push",
|
||||
"predevelop": "yarn build:ts && docker-compose -f compose/docker-compose.dev.yml build",
|
||||
"develop": "(sleep 10; open-cli http://localhost:4321) & (sleep 10; open-cli http://localhost:1234) & docker-compose -f compose/docker-compose.dev.yml up --force-recreate -V",
|
||||
"develop:instant": "yarn build:ts && docker-compose -f compose/docker-compose.instant-block.yml up --build --force-recreate -V",
|
||||
"build": "lerna run build:contract && yarn build:ts",
|
||||
"build": "yarn build:ts",
|
||||
"build:fresh": "yarn clean && shx rm -rf packages/*/node_modules && yarn build",
|
||||
"build:keys": "lerna run build-keys --scope=@zkopru/circuits",
|
||||
"build:ts": "lerna run --parallel build && yarn link-modules",
|
||||
"build:ts:serial": "lerna run build && yarn link-modules",
|
||||
"circuit:setup": "lerna run setup:build",
|
||||
"build:contract": "lerna run --parallel build:contract",
|
||||
"build:keys": "lerna run build-keys --scope=@zkopru/circuits",
|
||||
"build:fresh": "yarn clean && shx rm -rf packages/*/node_modules && yarn build",
|
||||
"clean": "lerna run --parallel clean && shx rm -rf packages/*/node_modules && shx rm -rf .build-cache *.log coverage junit.xml",
|
||||
"clean:db": "shx rm -rf **/*/.mockup",
|
||||
"test": "yarn test:parallel",
|
||||
"test:parallel": "yarn test:serial --parallel",
|
||||
"test:serial": "lerna run test --stream",
|
||||
"test:trace": "LOG_LEVEL=trace PRINT_LOG=true yarn test:serial",
|
||||
"posttest:all": "yarn clean:db",
|
||||
"pretest:integrate": "docker-compose up -d --build",
|
||||
"test:integrate": "lerna run test:integrate --parallel || true",
|
||||
"posttest:integrate": "docker-compose down",
|
||||
"test:ci": "jest --coverage --ci --reporters='jest-junit'",
|
||||
"precommit": "lint-staged && lerna run --concurrency 1 --stream precommit --since HEAD",
|
||||
"commit": "git cz",
|
||||
"coverage": "jest --coverage",
|
||||
"coverage:unit": "yarn test:unit --coverage",
|
||||
"coverage:integration": "yarn test:integration --coverage",
|
||||
"coverage:show": "live-server coverage",
|
||||
"coverage:unit": "yarn test:unit --coverage",
|
||||
"predevelop": "yarn build:ts && docker-compose -f compose/docker-compose.dev.yml build",
|
||||
"develop": "(sleep 10; open-cli http://localhost:4321) & (sleep 10; open-cli http://localhost:1234) & docker-compose -f compose/docker-compose.dev.yml up --force-recreate -V",
|
||||
"develop:instant": "yarn build:ts && docker-compose -f compose/docker-compose.instant-block.yml up --build --force-recreate -V",
|
||||
"format": "yarn lint --fix",
|
||||
"format:md": "yarn lint:md --fix",
|
||||
"husky-skip": "cross-env HUSKY_SKIP_HOOKS=1",
|
||||
"images": "docker-compose -f compose/docker-compose.yml",
|
||||
"images:build": "docker-compose -f compose/docker-compose.yml build",
|
||||
"images:pull": "docker-compose -f compose/docker-compose.yml pull",
|
||||
"images:push": "docker-compose -f compose/docker-compose.yml push",
|
||||
"postinstall": "yarn workspace @zkopru/circuits download-keys",
|
||||
"link-modules": "lerna run --parallel link-modules",
|
||||
"lint": "eslint --ext js --ext ts --ext md",
|
||||
"lint:ci": "yarn lint . --format junit",
|
||||
"lint:md": "markdownlint --ignore node_modules --ignore .git",
|
||||
"format": "yarn lint --fix",
|
||||
"format:md": "yarn lint:md --fix",
|
||||
"husky-skip": "cross-env HUSKY_SKIP_HOOKS=1",
|
||||
"precommit": "lint-staged && lerna run --concurrency 1 --stream precommit --since HEAD",
|
||||
"commit": "git cz"
|
||||
"posttest:all": "yarn clean:db",
|
||||
"test": "yarn test:parallel",
|
||||
"test:ci": "jest --coverage --ci --reporters='jest-junit'",
|
||||
"test:integration": "yarn workspace @zkopru/integration-test test",
|
||||
"test:integration:debug": "LOG_LEVEL=debug yarn workspace @zkopru/integration-test test",
|
||||
"test:parallel": "yarn test:serial --parallel",
|
||||
"test:serial": "lerna run test --stream",
|
||||
"test:trace": "LOG_LEVEL=trace yarn test:serial",
|
||||
"test:debug": "LOG_LEVEL=debug yarn test:serial"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
@@ -72,11 +71,16 @@
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^8.1.0",
|
||||
"@commitlint/config-conventional": "^8.1.0",
|
||||
"@truffle/artifactor": "^4.0.30",
|
||||
"@typechain/web3-v1": "^2.2.0",
|
||||
"@nomiclabs/hardhat-ethers": "^2.0.3",
|
||||
"@nomiclabs/hardhat-etherscan": "^2.1.8",
|
||||
"@nomiclabs/hardhat-waffle": "^2.0.1",
|
||||
"@truffle/artifactor": "^4.0.54",
|
||||
"@typechain/ethers-v5": "^7.2.0",
|
||||
"@typechain/hardhat": "^2.3.1",
|
||||
"@types/async-lock": "^1.1.1",
|
||||
"@types/blessed": "^0.1.17",
|
||||
"@types/bs58": "^4.0.1",
|
||||
"@types/chai": "^4.3.0",
|
||||
"@types/express": "^4.17.4",
|
||||
"@types/figlet": "^1.2.0",
|
||||
"@types/fs-extra": "^8.1.0",
|
||||
@@ -84,6 +88,8 @@
|
||||
"@types/jest": "^24.0.23",
|
||||
"@types/js-yaml": "^3.12.5",
|
||||
"@types/keccak": "^3.0.1",
|
||||
"@types/mocha": "^9.0.0",
|
||||
"@types/node": "^12.20.37",
|
||||
"@types/node-fetch": "^2.5.7",
|
||||
"@types/node-schedule": "^1.3.0",
|
||||
"@types/pino": "^6.0.0",
|
||||
@@ -94,10 +100,11 @@
|
||||
"@types/tar": "^4.0.3",
|
||||
"@types/tar-fs": "^2.0.0",
|
||||
"@types/uuid": "^8.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "^2.34.0",
|
||||
"@typescript-eslint/parser": "^2.34.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.18.0",
|
||||
"@typescript-eslint/parser": "^5.18.0",
|
||||
"bignumber.js": "^9.0.0",
|
||||
"bn.js": "^5.2.0",
|
||||
"chai": "^4.3.4",
|
||||
"circom": "0.5.42",
|
||||
"circomlib": "0.5.1",
|
||||
"commitizen": "^4.0.3",
|
||||
@@ -106,19 +113,25 @@
|
||||
"cz-conventional-changelog": "^3.0.2",
|
||||
"docker-compose": "^0.23.4",
|
||||
"dotenv": "^10.0.0",
|
||||
"eslint": "^6.4.0",
|
||||
"eslint": "^8.12.0",
|
||||
"eslint-config-airbnb-base": "^14.0.0",
|
||||
"eslint-config-prettier": "^6.0.0",
|
||||
"eslint-config-standard": "^16.0.3",
|
||||
"eslint-import-resolver-lerna": "^1.1.0",
|
||||
"eslint-import-resolver-typescript": "^1.1.1",
|
||||
"eslint-plugin-import": "^2.18.2",
|
||||
"eslint-plugin-jest": "^22.9.0",
|
||||
"eslint-plugin-markdown": "^1.0.0",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-prettier": "^3.1.0",
|
||||
"eslint-plugin-truffle": "^0.3.1",
|
||||
"eslint-plugin-promise": "^5.2.0",
|
||||
"eth-gas-reporter": "^0.2.16",
|
||||
"ethereum-waffle": "^3.4.0",
|
||||
"ethers": "^5.5.2",
|
||||
"ffjavascript": "0.2.22",
|
||||
"fs-extra": "^9.0.0",
|
||||
"hardhat": "^2.8.0",
|
||||
"hardhat-gas-reporter": "^1.0.6",
|
||||
"husky": "^3.1.0",
|
||||
"jest": "^24.7.1",
|
||||
"jest-junit": "^10.0.0",
|
||||
@@ -131,6 +144,7 @@
|
||||
"node-docker-api": "^1.1.22",
|
||||
"open-cli": "^6.0.1",
|
||||
"prettier": "^1.16.4",
|
||||
"prettier-plugin-solidity": "^1.0.0-beta.19",
|
||||
"puppeteer": "^5.0.0",
|
||||
"serve": "^11.2.0",
|
||||
"shx": "^0.3.2",
|
||||
@@ -138,17 +152,20 @@
|
||||
"snarkjs": "0.3.33",
|
||||
"solc": "^0.6.4",
|
||||
"solc5": "npm:solc@0.5.15",
|
||||
"solhint": "^3.3.6",
|
||||
"solidity-coverage": "^0.7.17",
|
||||
"solium": "^1.2.5",
|
||||
"tar": "^6.0.2",
|
||||
"tar-fs": "^2.1.0",
|
||||
"truffle": "5.4.10",
|
||||
"truffle-artifactor": "^4.0.30",
|
||||
"ts-jest": "^24.2.0",
|
||||
"ts-node": "^10.4.0",
|
||||
"ts-node-dev": "^1.0.0-pre.44",
|
||||
"tsconfig-paths": "^3.9.0",
|
||||
"typechain": "^4.0.3",
|
||||
"typescript": "3.8.3",
|
||||
"uuid": "^8.1.0"
|
||||
"typechain": "^5.2.0",
|
||||
"typescript": "^4.6.2",
|
||||
"uuid": "^8.1.0",
|
||||
"web3-utils": "1.2.11"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
"allowJs": true,
|
||||
"resolveJsonModule": true,
|
||||
"noImplicitAny": false,
|
||||
"skipLibCheck": true,
|
||||
"lib": ["es2020", "DOM", "DOM.Iterable", "ScriptHost"]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user