Skip to content

Commit

Permalink
Merge pull request #9 from interlay/brendon/chore-merge-upstream-0.9.3
Browse files Browse the repository at this point in the history
Chore: merge upstream 0.9.3
  • Loading branch information
bvotteler committed Nov 28, 2023
2 parents 166d27f + 90403da commit 6823e78
Show file tree
Hide file tree
Showing 50 changed files with 4,362 additions and 5,218 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "vendor/smoldot"]
path = vendor/smoldot
url = https://github.com/smol-dot/smoldot.git
url = https://github.com/ermalkaleci/smoldot.git
55 changes: 0 additions & 55 deletions .yarn/patches/@polkadot-rpc-provider-npm-10.10.1-c60ba50fe2.patch

This file was deleted.

541 changes: 0 additions & 541 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

This file was deleted.

9 changes: 0 additions & 9 deletions .yarn/plugins/@yarnpkg/plugin-typescript.cjs

This file was deleted.

550 changes: 0 additions & 550 deletions .yarn/plugins/@yarnpkg/plugin-version.cjs

This file was deleted.

28 changes: 0 additions & 28 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

This file was deleted.

873 changes: 0 additions & 873 deletions .yarn/releases/yarn-3.5.0.cjs

This file was deleted.

893 changes: 893 additions & 0 deletions .yarn/releases/yarn-4.0.2.cjs

Large diffs are not rendered by default.

12 changes: 1 addition & 11 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,4 @@ npmPublishRegistry: "https://registry.npmjs.org/"

npmRegistryServer: "https://registry.npmjs.org/"

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
- path: .yarn/plugins/@yarnpkg/plugin-typescript.cjs
spec: "@yarnpkg/plugin-typescript"
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
spec: "@yarnpkg/plugin-version"
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"

yarnPath: .yarn/releases/yarn-3.5.0.cjs
yarnPath: .yarn/releases/yarn-4.0.2.cjs
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,14 @@ npx @acala-network/chopsticks@latest dry-run --config=configs/mandala.yml --prei
}
]
]
},
"Whitelist": {
"WhitelistedCall": [
[
["0x3146d2141cdb95de80488d6cecbb5d7577dd59069efc366cb1be7fe64f02e62c"],
"0x" // please use 0x for null values
],
]
}
}
```
Expand Down
4 changes: 3 additions & 1 deletion configs/acala.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
endpoint: wss://acala-rpc.dwellir.com
endpoint:
- wss://acala-rpc.aca-api.network
- wss://acala-rpc.dwellir.com
mock-signature-host: true
block: ${env.ACALA_BLOCK_NUMBER}
db: ./db.sqlite
Expand Down
50 changes: 50 additions & 0 deletions configs/centrifuge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
endpoint: wss://centrifuge-parachain.api.onfinality.io/public-ws/
mock-signature-host: true
block: ${env.CENTRIFUGE_BLOCK_NUMBER}
db: ./db.sqlite
# wasm-override: centrifuge-1023.wasm

import-storage:
# Sudo:
# Key: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY # Alice
System:
Account:
-
-
- "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
- providers: 1
data:
free: "1000000000000000000000000"
Council:
Members: [5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY]
Elections:
Members:
- who: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY
stake: "10000000000000000000000"
deposit: "10000000000000000000000"
OrmlTokens:
Accounts:
-
-
- 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY
- ForeignAsset: 6
- free: 1000000000000
-
-
- 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY
- ForeignAsset: 4
- free: "1000000000000000000000"
Proxy:
Proxies:
-
-
- 4dTeMxuPJCK7zQGhFcgCivSJqBs9Wo2SuMSQeYCCuVJ9xrE2
-
-
- delegate: "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
- proxyType: "Any"
- delay: 0
- "350000000000000000"



4 changes: 3 additions & 1 deletion configs/polkadot.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
endpoint: wss://rpc.polkadot.io
endpoint:
- wss://rpc.polkadot.io
- wss://polkadot-rpc.dwellir.com
mock-signature-host: true
block: ${env.POLKADOT_BLOCK_NUMBER}
db: ./db.sqlite
Expand Down
4 changes: 2 additions & 2 deletions executor/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion executor/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "chopsticks-executor"
version = "0.9.2-6"
version = "0.0.0" # DO NOT CHANGE
description = "Chopsticks executor"
repository = "https://github.com/AcalaNetwork/chopsticks"
license = "Apache-2.0"
Expand Down
6 changes: 3 additions & 3 deletions executor/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@acala-network/chopsticks-executor",
"description": "Chopsticks executor",
"version": "0.9.2-6",
"version": "0.9.3",
"license": "Apache-2.0",
"type": "module",
"repository": {
Expand All @@ -20,8 +20,8 @@
"@polkadot/wasm-util": "^7.2.2"
},
"devDependencies": {
"@swc/cli": "0.1.62",
"@swc/core": "^1.3.96",
"@swc/cli": "0.1.63",
"@swc/core": "^1.3.99",
"fflate": "^0.8.1"
},
"files": [
Expand Down
5 changes: 2 additions & 3 deletions executor/scripts/pack-wasm.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ const BYTES = '${base64}';
import { base64Decode, unzlibSync } from '@polkadot/wasm-util';
const WASM_BYTES = unzlibSync(base64Decode(BYTES, new Uint8Array(LEN_IN)), new Uint8Array(LEN_OUT));
import wasmInit, { initSync } from "./chopsticks_executor.js";
const blob = new Blob([WASM_BYTES], { type: "application/wasm" });
export const wasmReady = typeof Bun !== undefined ? Promise.resolve(initSync(WASM_BYTES)) : wasmInit(URL.createObjectURL(blob));
import { initSync } from "./chopsticks_executor.js";
initSync(new WebAssembly.Module(WASM_BYTES));
export * from "./chopsticks_executor.js";
`);
Expand Down
25 changes: 11 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "chopsticks-monorepo",
"author": "Acala Developers <[email protected]>",
"license": "Apache-2.0",
"packageManager": "yarn@3.5.0",
"packageManager": "yarn@4.0.2",
"private": true,
"type": "module",
"workspaces": [
Expand All @@ -13,8 +13,8 @@
"lint": "tsc --noEmit --project tsconfig.lint.json && eslint . --ext .js,.ts && prettier --check .",
"fix": "eslint . --ext .js,.ts --fix && prettier -w .",
"prepare": "husky install",
"clean": "yarn workspaces foreach -pvit run clean",
"build": "yarn workspaces foreach -pvit --include '@acala-network/*' run build",
"clean": "yarn workspaces foreach --all -pvit run clean",
"build": "yarn workspaces foreach --all -pvit --include '@acala-network/*' run build",
"build-wasm": "yarn workspace @acala-network/chopsticks-executor run build",
"build:web-test": "yarn build && yarn workspace web-test run build",
"check": "cd executor && cargo check --locked",
Expand All @@ -23,7 +23,7 @@
"start": "NODE_OPTIONS='--loader ts-node/esm --loader ./loader.js --no-warnings' node packages/chopsticks/src/cli.ts",
"dev": "NODE_OPTIONS='--loader ts-node/esm --loader ./loader.js --no-warnings' LOG_LEVEL=trace node packages/chopsticks/src/cli.ts -- --config=configs/dev.yml",
"script:start": "yarn start",
"docs:prep": "yarn workspaces foreach -pvit run docs:prep && cp docs/* docs-src",
"docs:prep": "yarn workspaces foreach --all -pvit run docs:prep && cp docs/* docs-src",
"docs:dev": "yarn docs:prep && vitepress dev",
"docs:build": "yarn docs:prep && vitepress build",
"docs:preview": "yarn docs:build && vitepress preview"
Expand All @@ -41,29 +41,26 @@
"*.{js,ts,css,md}": "prettier --write"
},
"devDependencies": {
"@swc/core": "^1.3.96",
"@types/node": "^20.9.0",
"@swc/core": "^1.3.99",
"@types/node": "^20.9.3",
"@types/prettier": "^3.0.0",
"@typescript-eslint/eslint-plugin": "^6.10.0",
"@typescript-eslint/parser": "^6.10.0",
"eslint": "^8.53.0",
"@typescript-eslint/eslint-plugin": "^6.12.0",
"@typescript-eslint/parser": "^6.12.0",
"eslint": "^8.54.0",
"eslint-config-prettier": "^9.0.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-sort-imports-es6-autofix": "^0.6.0",
"husky": "^8.0.3",
"prettier": "^3.0.3",
"prettier": "^3.1.0",
"ts-node": "^10.9.1",
"typedoc": "^0.25.3",
"typedoc-plugin-markdown": "^3.17.1",
"typescript": "^5.2.2",
"unplugin-swc": "^1.4.3",
"vite-tsconfig-paths": "^4.2.1",
"vitepress": "^1.0.0-rc.23",
"vitest": "^0.34.6",
"vitest": "^1.0.0-beta.5",
"wasm-pack": "^0.12.1"
},
"resolutions": {
"@polkadot/[email protected]": "patch:@polkadot/rpc-provider@npm%3A10.10.1#./.yarn/patches/@polkadot-rpc-provider-npm-10.10.1-c60ba50fe2.patch"
}
}
29 changes: 20 additions & 9 deletions packages/chopsticks/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@acala-network/chopsticks",
"version": "0.9.2-6",
"version": "0.9.3",
"author": "Acala Developers <[email protected]>",
"license": "Apache-2.0",
"bin": "./chopsticks.cjs",
Expand All @@ -17,7 +17,11 @@
"@acala-network/chopsticks-core": "workspace:*",
"@acala-network/chopsticks-db": "workspace:*",
"@pnpm/npm-conf": "^2.2.2",
"axios": "^1.6.0",
"@polkadot/api-augment": "^10.10.1",
"@polkadot/types": "^10.10.1",
"@polkadot/util": "^12.5.1",
"@polkadot/util-crypto": "^12.5.1",
"axios": "^1.6.2",
"dotenv": "^16.3.1",
"global-agent": "^3.0.0",
"js-yaml": "^4.1.0",
Expand All @@ -28,15 +32,16 @@
"zod": "^3.22.4"
},
"devDependencies": {
"@swc/cli": "0.1.62",
"@swc/core": "^1.3.96",
"@swc/cli": "0.1.63",
"@swc/core": "^1.3.99",
"@types/global-agent": "^2.1.3",
"@types/js-yaml": "^4.0.9",
"@types/lodash": "^4.14.201",
"@types/node": "^20.9.0",
"@types/ws": "^8.5.9",
"@types/yargs": "^17.0.31",
"typescript": "^5.2.2"
"@types/lodash": "^4.14.202",
"@types/node": "^20.9.3",
"@types/ws": "^8.5.10",
"@types/yargs": "^17.0.32",
"typescript": "^5.2.2",
"vitest": "^1.0.0-beta.5"
},
"files": [
"dist/esm/**",
Expand Down Expand Up @@ -66,6 +71,12 @@
"import": "./dist/esm/plugins/*.js",
"default": "./dist/esm/plugins/*.js"
},
"./utils/*": {
"types": "./dist/types/utils/*.d.ts",
"require": "./dist/cjs/utils/*.js",
"import": "./dist/esm/utils/*.js",
"default": "./dist/esm/utils/*.js"
},
"./package.json": "./package.json",
"./package.cjs.json": "./dist/cjs/package.json"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/chopsticks/src/schema/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const zHash = z.string().length(66).and(zHex)
export const configSchema = z
.object({
port: z.number().optional(),
endpoint: z.string().optional(),
endpoint: z.union([z.string(), z.array(z.string())]).optional(),
block: z.union([z.string().length(66).startsWith('0x'), z.number(), z.null()]).optional(),
'build-block-mode': z.nativeEnum(BuildBlockMode).optional(),
'import-storage': z.any().optional(),
Expand Down
22 changes: 14 additions & 8 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@acala-network/chopsticks-core",
"version": "0.9.2-6",
"version": "0.9.3",
"author": "Acala Developers <[email protected]>",
"license": "Apache-2.0",
"type": "module",
Expand All @@ -14,21 +14,27 @@
},
"dependencies": {
"@acala-network/chopsticks-executor": "workspace:*",
"@polkadot/api": "^10.10.1",
"@polkadot/rpc-provider": "^10.10.1",
"@polkadot/types": "^10.10.1",
"@polkadot/types-codec": "^10.10.1",
"@polkadot/types-known": "^10.10.1",
"@polkadot/util": "^12.5.1",
"@polkadot/util-crypto": "^12.5.1",
"comlink": "^4.4.1",
"eventemitter3": "^5.0.1",
"lodash": "^4.17.21",
"lru-cache": "^10.0.1",
"pino": "^8.16.1",
"lru-cache": "^10.0.3",
"pino": "^8.16.2",
"pino-pretty": "^10.2.3",
"rxjs": "^7.8.1",
"zod": "^3.22.4"
},
"devDependencies": {
"@swc/cli": "0.1.62",
"@swc/core": "^1.3.96",
"@types/lodash": "^4.14.201",
"typescript": "^5.2.2"
"@swc/cli": "0.1.63",
"@swc/core": "^1.3.99",
"@types/lodash": "^4.14.202",
"typescript": "^5.2.2",
"vitest": "^1.0.0-beta.5"
},
"files": [
"dist/esm/**",
Expand Down
Loading

0 comments on commit 6823e78

Please sign in to comment.