Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
**/coverage
**/.env
**/.editorconfig
**/dist
/dist
**/*.pem
Dockerfile
**/*.e2e.ts
Expand Down
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ const conf = getConfiguration({ typescript: { rootDir: __dirname } });

conf.overrides[0].rules["@typescript-eslint/no-misused-promises"] = "off";
conf.overrides[0].rules["no-async-promise-executor"] = "off";
conf.overrides[0].rules["spaced-comment"] = ["error", "always", { markers: ["/"] }];

module.exports = conf;
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ npm-debug.log
.eslintcache
yarn-error.log
.yarn/install-state.gz
.claude/settings.local.json
4 changes: 2 additions & 2 deletions .papi/descriptors/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.1.0-autogenerated.16785956117721718482",
"version": "0.1.0-autogenerated.6123878226670557876",
"name": "@polkadot-api/descriptors",
"files": [
"dist"
Expand All @@ -19,6 +19,6 @@
"types": "./dist/index.d.ts",
"sideEffects": false,
"peerDependencies": {
"polkadot-api": ">=1.11.2"
"polkadot-api": ">=1.21.0"
}
}
Binary file modified .papi/metadata/kusama.scale
Binary file not shown.
Binary file modified .papi/metadata/polkadot.scale
Binary file not shown.
Binary file modified .papi/metadata/westend.scale
Binary file not shown.
18 changes: 9 additions & 9 deletions .papi/polkadot-api.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
"descriptorPath": ".papi/descriptors",
"entries": {
"polkadot": {
"wsUrl": "wss://rpc.polkadot.io",
"chain": "polkadot",
"wsUrl": "wss://polkadot-asset-hub-rpc.polkadot.io",
"chain": "polkadot_asset_hub",
"metadata": ".papi/metadata/polkadot.scale",
"genesis": "0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3",
"codeHash": "0x716bb701ec19452fa522cdaa83ef101d368ba2bcfd89fde9acb6f793a420a616"
"genesis": "0x68d56f15f85d3136970ec16946040bc1752654e906147f7e43e9d539d7c3de2f",
"codeHash": "0xc9a41123542a13aefbf7f98350fd1284c9eb403385697412d697fc1c955abb65"
},
"kusama": {
"wsUrl": "wss://kusama-rpc.polkadot.io",
"chain": "ksmcc3",
"wsUrl": "wss://kusama-asset-hub-rpc.polkadot.io",
"chain": "ksmcc3_asset_hub",
"metadata": ".papi/metadata/kusama.scale",
"genesis": "0xb0a8d493285c2df73290dfb7e61f870f17b41801197a149ca93654499ea3dafe",
"codeHash": "0xf45689276dfdcf05b6defd26da68e3283a96190d789f7a311ff31f64b455b421"
"genesis": "0x48239ef607d7928874027a43a67689209727dfb3d3dc5e5b03a39bdc2eda771a",
"codeHash": "0xdefa3628d113f815fda8bbf9874c879adec02779df43737d77473347e72138c6"
},
"westend": {
"wsUrl": "wss://westend-asset-hub-rpc.polkadot.io",
"chain": "westend2_asset_hub",
"metadata": ".papi/metadata/westend.scale",
"genesis": "0x67f9723393ef76214df0118c34bbbd3dbebc8ed46a10973a8c969d48fe7598c9",
"codeHash": "0x4d4e036d59a3f54d499c935535a847b1f9885226ff776baf7c92e2bd0bf4a55e"
"codeHash": "0xd195ae6fe231497569f212f12ae64eee3c2c8b7525f2aae65535149a9b1386e7"
},
"rococo": {
"wsUrl": "wss://rococo-rpc.polkadot.io",
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
dist
node_modules
.papi/descriptors/generated.json
940 changes: 940 additions & 0 deletions .yarn/releases/yarn-4.13.0.cjs

Large diffs are not rendered by default.

894 changes: 0 additions & 894 deletions .yarn/releases/yarn-4.3.0.cjs

This file was deleted.

3 changes: 2 additions & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
yarnPath: .yarn/releases/yarn-4.3.0.cjs
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.13.0.cjs
12 changes: 0 additions & 12 deletions jest.config.js

This file was deleted.

6 changes: 0 additions & 6 deletions jest.e2e.config.js

This file was deleted.

9 changes: 0 additions & 9 deletions jest.integration.config.js

This file was deleted.

16 changes: 0 additions & 16 deletions jest.resolver.js

This file was deleted.

16 changes: 7 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
"postinstall": "yarn papi",
"dev": "concurrently \"tsc -w\" \"node --env-file=.env --watch --enable-source-maps dist/src/bot.js\"",
"start": "node --env-file=.env --enable-source-maps dist/src/bot.js",
"test": "jest",
"test:e2e": "jest -c jest.e2e.config.js",
"test:integration": "jest --runInBand -c jest.integration.config.js",
"test": "vitest run",
"test:e2e": "vitest run -c vitest.e2e.config.ts",
"test:integration": "vitest run -c vitest.integration.config.ts",
"typecheck": "tsc --noEmit"
},
"imports": {
Expand All @@ -40,26 +40,24 @@
"concurrently": "^8.2.2",
"ethers": "^5.7.2",
"matrix-js-sdk": "^26.1.0",
"polkadot-api": "^1.13.1",
"polkadot-api": "^1.23.3",
"probot": "^12.2.8",
"prom-client": "^14.2.0"
},
"devDependencies": {
"@eng-automation/js-style": "^3.1.0",
"@eng-automation/testing": "^1.5.2",
"@types/jest": "^29.5.12",
"@types/node": "^20.14.2",
"dotenv": "^16.0.1",
"jest": "^29.7.0",
"rimraf": "^3.0.2",
"rxjs": "^7.8.1",
"smee-client": "^1.2.2",
"testcontainers": "^10.13.0",
"ts-jest": "^29.2.4",
"typescript": "^5.4.5"
"typescript": "^5.4.5",
"vitest": "^3"
},
"engines": {
"node": "^22 && !22.5.0"
},
"packageManager": "yarn@4.3.0"
"packageManager": "yarn@4.13.0"
}
2 changes: 1 addition & 1 deletion src/tip.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createClient, PolkadotClient, TypedApi } from "polkadot-api";
import { getWsProvider } from "polkadot-api/ws-provider/node";
import { getWsProvider } from "polkadot-api/ws-provider";

import { ChainDescriptor, getDescriptor, getWsUrl } from "./chain-config";
import { tipOpenGov, tipOpenGovReferendumExtrinsic } from "./tip-opengov";
Expand Down
1 change: 1 addition & 0 deletions src/vitest.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="vitest/globals" />
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
"strict": true,
"target": "ES2022",
"typeRoots": ["./node_modules/@types", "./src"],
"types": ["node", "jest"],
"types": ["node"],
"useUnknownInCatchVariables": false
},
"include": ["src/**/*", "package.json"],
"include": ["src/**/*", "package.json", "vitest.config.ts", "vitest.e2e.config.ts", "vitest.integration.config.ts"],
"exclude": ["node_modules/**/*"]
}
16 changes: 16 additions & 0 deletions vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import path from "path";
import { defineConfig } from "vitest/config";

export default defineConfig({
resolve: {
alias: {
"#src": path.resolve(__dirname, "src"),
},
},
test: {
root: "./src",
testTimeout: 30_000,
include: ["**/*.test.ts"],
globals: true,
},
});
19 changes: 19 additions & 0 deletions vitest.e2e.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import path from "path";
import { defineConfig } from "vitest/config";

export default defineConfig({
resolve: {
alias: {
"#src": path.resolve(__dirname, "src"),
},
},
test: {
root: "./src",
testTimeout: 10 * 60_000,
include: ["**/*.e2e.ts"],
globals: true,
env: {
LOCAL_NETWORKS: "true",
},
},
});
23 changes: 23 additions & 0 deletions vitest.integration.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import path from "path";
import { defineConfig } from "vitest/config";

export default defineConfig({
resolve: {
alias: {
"#src": path.resolve(__dirname, "src"),
},
},
test: {
root: "./src",
testTimeout: 2 * 60_000,
include: ["**/*.integration.ts"],
globals: true,
pool: "forks",
poolOptions: {
forks: {
singleFork: true,
},
},
silent: false,
},
});
Loading
Loading