-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* move to package/core * fix * update * update * update * update * watch * start * rename * add core * fix lint * fix * fix ci * update * exclude lib * update port * fix * change script * fix * fixes * update script * update action --------- Co-authored-by: Ermal Kaleci <[email protected]>
- Loading branch information
1 parent
d27e43b
commit 62318df
Showing
117 changed files
with
450 additions
and
535 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -125,3 +125,5 @@ dist | |
.DS_store | ||
|
||
preview/ | ||
|
||
lib |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,3 @@ executor/ | |
vendor/ | ||
.pnp.cjs | ||
.pnp.loader.mjs | ||
dist/ | ||
preview/ |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
vitest.config.ts | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
substrate-api-sidecar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"name": "@acala-network/chopsticks-e2e", | ||
"author": "Bryan Chen <[email protected]>", | ||
"license": "Apache-2.0", | ||
"scripts": { | ||
"lint": "tsc --noEmit --project tsconfig.json && eslint . --ext .js,.ts && prettier --check .", | ||
"fix": "eslint . --ext .js,.ts --fix && prettier -w .", | ||
"test": "vitest --silent", | ||
"sidecar": "sh ./scripts/sidecar-chopsticks.sh" | ||
}, | ||
"engines": { | ||
"node": ">=v14" | ||
}, | ||
"dependencies": { | ||
"@acala-network/chopsticks": "workspace:*", | ||
"@polkadot/api": "^9.12.1" | ||
}, | ||
"devDependencies": { | ||
"@types/prettier": "^2", | ||
"@typescript-eslint/eslint-plugin": "^5.50.0", | ||
"@typescript-eslint/parser": "^5.50.0", | ||
"eslint": "^8.32.0", | ||
"eslint-config-prettier": "^8.6.0", | ||
"eslint-plugin-import": "^2.27.5", | ||
"eslint-plugin-sort-imports-es6-autofix": "^0.6.0", | ||
"prettier": "^2.8.4", | ||
"vitest": "^0.28.3" | ||
}, | ||
"prettier": { | ||
"tabWidth": 2, | ||
"semi": false, | ||
"singleQuote": true | ||
}, | ||
"lint-staged": { | ||
"*.{js,ts}": "eslint --cache --fix", | ||
"*.{js,ts,css,md}": "prettier --write" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -xe | ||
|
||
rm -rf substrate-api-sidecar | ||
|
||
# clone sidecard | ||
git clone https://github.com/paritytech/substrate-api-sidecar.git | ||
|
||
# run chopsticks node | ||
yarn workspace @acala-network/chopsticks run start dev --endpoint wss://rpc.polkadot.io --port 8011 & POLKADOT_PID=$! | ||
yarn workspace @acala-network/chopsticks run start dev --endpoint wss://statemint-rpc.polkadot.io --port 8012 & STATEMINT_PID=$! | ||
|
||
# run tests | ||
(cd substrate-api-sidecar && \ | ||
yarn && \ | ||
yarn test:latest-e2e-tests --local ws://localhost:8011 --chain polkadot && \ | ||
yarn test:latest-e2e-tests --local ws://localhost:8012 --chain statemint) | ||
|
||
# cleanup | ||
rm -rf substrate-api-sidecar | ||
kill $POLKADOT_PID | ||
kill $STATEMINT_PID |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "../tsconfig.base.json" | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,81 +1,28 @@ | ||
{ | ||
"name": "@acala-network/chopsticks", | ||
"version": "0.3.12", | ||
"main": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"author": "Bryan Chen <[email protected]>", | ||
"license": "Apache-2.0", | ||
"packageManager": "[email protected]", | ||
"workspaces": [ | ||
".", | ||
"executor/pkg" | ||
"packages/*", | ||
"executor/pkg", | ||
"e2e" | ||
], | ||
"bin": "./chopsticks.js", | ||
"scripts": { | ||
"lint": "tsc --noEmit --project tsconfig.json && eslint . --ext .js,.ts && prettier --check .", | ||
"fix": "eslint . --ext .js,.ts --fix && prettier -w .", | ||
"lint": "yarn workspaces foreach run lint", | ||
"fix": "yarn workspaces foreach run fix", | ||
"prepare": "husky install", | ||
"start": "ts-node --transpile-only src/cli.ts", | ||
"build": "rm -rf dist && tsc -p tsconfig.prod.json", | ||
"build": "yarn workspaces foreach run build", | ||
"build-wasm": "wasm-pack build executor --target nodejs --scope acala-network", | ||
"build-wasm-logging": "yarn build-wasm --features=logging", | ||
"check": "cd executor && cargo check --locked", | ||
"test": "vitest --silent", | ||
"test:dev": "LOG_LEVEL=trace vitest --inspect", | ||
"dev": "LOG_LEVEL=trace ts-node-dev --transpile-only --inspect --notify=false src/cli.ts -- dev --config=configs/dev.yml", | ||
"dev:karura": "ts-node-dev --transpile-only --inspect --notify=false src/cli.ts -- dev --config=configs/karura.yml", | ||
"dev:acala": "ts-node-dev --transpile-only --inspect --notify=false src/cli.ts -- dev --config=configs/acala.yml", | ||
"dev:moonriver": "ts-node-dev --transpile-only --inspect --notify=false src/cli.ts -- dev --config=configs/moonriver.yml", | ||
"dev:moonbeam": "ts-node-dev --transpile-only --inspect --notify=false src/cli.ts -- dev --config=configs/moonbeam.yml" | ||
"test": "yarn workspaces foreach run test", | ||
"start": "yarn workspace @acala-network/chopsticks run start", | ||
"dev": "yarn workspace @acala-network/chopsticks run dev", | ||
"dev:karura": "yarn workspace @acala-network/chopsticks run dev:karura", | ||
"dev:acala": "yarn workspace @acala-network/chopsticks run dev:acala", | ||
"dev:moonriver": "yarn workspace @acala-network/chopsticks run dev:moonriver", | ||
"dev:moonbeam": "yarn workspace @acala-network/chopsticks run dev:moonbeam" | ||
}, | ||
"dependencies": { | ||
"@acala-network/chopsticks-executor": "workspace:*", | ||
"@polkadot/api": "^9.12.1", | ||
"@polkadot/rpc-provider": "^9.12.1", | ||
"@polkadot/types": "^9.12.1", | ||
"@polkadot/types-codec": "^9.12.1", | ||
"@polkadot/types-known": "^9.12.1", | ||
"@polkadot/util": "^10.2.6", | ||
"@polkadot/util-crypto": "^10.2.6", | ||
"axios": "^1.2.5", | ||
"js-yaml": "^4.1.0", | ||
"jsondiffpatch": "^0.4.1", | ||
"lodash": "^4.17.21", | ||
"pino": "^8.8.0", | ||
"pino-pretty": "^9.1.1", | ||
"reflect-metadata": "^0.1.13", | ||
"sqlite3": "^5.1.4", | ||
"typeorm": "^0.3.11", | ||
"typescript": "^4.9.4", | ||
"ws": "^8.12.0", | ||
"yargs": "^17.6.2", | ||
"zod": "^3.20.2" | ||
}, | ||
"devDependencies": { | ||
"@types/js-yaml": "^4.0.5", | ||
"@types/lodash": "^4.14.191", | ||
"@types/node": "^18.11.18", | ||
"@types/ws": "^8.5.4", | ||
"@types/yargs": "^17.0.20", | ||
"@typescript-eslint/eslint-plugin": "^5.50.0", | ||
"@typescript-eslint/parser": "^5.50.0", | ||
"eslint": "^8.32.0", | ||
"eslint-config-prettier": "^8.6.0", | ||
"eslint-plugin-import": "^2.27.5", | ||
"eslint-plugin-sort-imports-es6-autofix": "^0.6.0", | ||
"husky": "^8.0.3", | ||
"lint-staged": "^13.1.0", | ||
"prettier": "^2.8.3", | ||
"ts-node": "^10.9.1", | ||
"ts-node-dev": "^2.0.0", | ||
"vitest": "^0.28.3", | ||
"wasm-pack": "^0.10.3" | ||
}, | ||
"files": [ | ||
"dist", | ||
"bin", | ||
"template" | ||
], | ||
"engines": { | ||
"node": ">=v14" | ||
}, | ||
|
@@ -87,5 +34,9 @@ | |
"lint-staged": { | ||
"*.{js,ts}": "eslint --cache --fix", | ||
"*.{js,ts,css,md}": "prettier --write" | ||
}, | ||
"devDependencies": { | ||
"husky": "^8.0.3", | ||
"wasm-pack": "^0.10.3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
vitest.config.ts | ||
.eslintrc.js | ||
node_modules/ | ||
executor/ | ||
vendor/ | ||
dist/ | ||
lib/ | ||
preview/ | ||
chopsticks.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
lib/ | ||
preview/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/usr/bin/env node | ||
require('./lib/cli.js') |
Oops, something went wrong.