Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
Small changes from work on weights (paritytech#720)
Browse files Browse the repository at this point in the history
* Update parachain test commands

* Shorten pnpm commands

* Whitespace

* Remove unused imports & constants

* Use struct shorthand

* Simplify benchmark commands

* Enable linting for api

* Include ts scripts in test package

* Install missing dependencies for test scripts

* Ignore XCM transfer script & remove types package
  • Loading branch information
doubledup authored Nov 10, 2022
1 parent ff2b986 commit 7115546
Show file tree
Hide file tree
Showing 11 changed files with 260 additions and 79 deletions.
6 changes: 3 additions & 3 deletions core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ pnpm install
Build all artifacts:

```bash
pnpm run build
pnpm build
```

Run all unit tests:

```bash
pnpm run test
pnpm test
```

Lint all the code:

```bash
pnpm run lint
pnpm lint
```
2 changes: 1 addition & 1 deletion core/packages/api/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
"ignoreReadBeforeAssign": false
}]
},
"ignorePatterns": ["dist", "artifacts", "build", "contracts", "src/**/*.ts", "truffle-config.js"]
"ignorePatterns": ["dist", "artifacts", "build", "contracts", "truffle-config.js"]
}
3 changes: 3 additions & 0 deletions core/packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
},
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"lint": "eslint ."
},
"devDependencies": {
"@types/node": "^18.11.9",
"@typescript-eslint/eslint-plugin": "^5.42.0",
Expand Down
1 change: 1 addition & 0 deletions core/packages/api/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class PolkadotContext {
}
}

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const contextFactory = async (config: Config): Promise<Context> => {
let ethApi = new ethers.providers.WebSocketProvider(config.ethereum.url)
let polApi = await ApiPromise.create({
Expand Down
1 change: 1 addition & 0 deletions core/packages/test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"devDependencies": {
"@chainsafe/lodestar": "1.1.0",
"@polkadot/api": "^9.6.2",
"@polkadot/types": "^9.6.2",
"@polkadot/util": "^10.1.11",
"@polkadot/util-crypto": "^10.1.11",
"@types/keccak": "^3.0.1",
Expand Down
1 change: 0 additions & 1 deletion core/packages/test/scripts/make-xcm-transfer.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { ApiPromise, WsProvider } from "@polkadot/api";
import { createType } from "@polkadot/types";
import { Keyring } from "@polkadot/api";
import { bundle } from "@snowfork/snowbridge-types";
import yargs from "yargs"
Expand Down
4 changes: 2 additions & 2 deletions core/packages/test/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"resolveJsonModule": true,
"baseUrl": "."
},
"include": ["src"],
"files": ["scripts/detect-fork.ts"],
"include": ["src", "scripts/*.ts"],
"exclude": ["scripts/make-xcm-transfer.ts"],
"references": [
{
"path": "../contracts"
Expand Down
Loading

0 comments on commit 7115546

Please sign in to comment.