diff --git a/packages/status-page/.babelrc b/packages/status-page/.babelrc new file mode 100644 index 00000000000..7ae1eb65a8f --- /dev/null +++ b/packages/status-page/.babelrc @@ -0,0 +1,8 @@ +{ + "presets": [["@babel/preset-env", {"targets": {"node": "current"}}]], + "env": { + "test": { + "plugins": ["transform-es2015-modules-commonjs"] + } + } + } \ No newline at end of file diff --git a/packages/status-page/.default.env b/packages/status-page/.default.env new file mode 100644 index 00000000000..c618b0fcf03 --- /dev/null +++ b/packages/status-page/.default.env @@ -0,0 +1,9 @@ +VITE_NODE_ENV=dev +VITE_L1_RPC_URL="https://l1rpc.a1.taiko.xyz" +VITE_L2_RPC_URL="https://l2rpc.a1.taiko.xyz" +VITE_TAIKO_L2_ADDRESS="0x0000777700000000000000000000000000000001" +VITE_TAIKO_L1_ADDRESS="0x7B3AF414448ba906f02a1CA307C56c4ADFF27ce7" +VITE_L2_BOOTNODE_URL="http://104.198.208.154:8545" +VITE_TOKENOMICS_ENABLED=false +VITE_L1_EXPLORER_URL="https://l1explorer.a1.taiko.xyz" +VITE_L2_EXPLORER_URL="https://l2explorer.a1.taiko.xyz" \ No newline at end of file diff --git a/packages/status-page/.eslintignore b/packages/status-page/.eslintignore new file mode 100644 index 00000000000..4f8aac2c914 --- /dev/null +++ b/packages/status-page/.eslintignore @@ -0,0 +1,6 @@ +build +coverage +node_modules +example +LICENSES +public \ No newline at end of file diff --git a/packages/status-page/.eslintrc.cjs b/packages/status-page/.eslintrc.cjs new file mode 100644 index 00000000000..93f2f346d30 --- /dev/null +++ b/packages/status-page/.eslintrc.cjs @@ -0,0 +1,81 @@ +module.exports = { + env: { + node: true, + browser: true, + es2021: true, + webextensions: true, + }, + extends: ["eslint:recommended"], + parser: "@typescript-eslint/parser", + parserOptions: { + ecmaVersion: "latest", + sourceType: "module", + extraFileExtensions: [".svelte"], + }, + plugins: ["svelte3", "@typescript-eslint"], + rules: { + "linebreak-style": ["error", "unix"], + quotes: ["error", "double"], + semi: ["error", "always"], + }, + ignorePatterns: ["node_modules"], // todo: lets lint that separately, or move it to its own package + settings: { + "svelte3/typescript": require("typescript"), + }, + overrides: [ + { + files: ["*.ts", "*.svelte"], + extends: [ + "plugin:@typescript-eslint/recommended", + "plugin:@typescript-eslint/recommended-requiring-type-checking", + ], + parserOptions: { + project: ["./tsconfig.json"], + tsconfigRootDir: __dirname, + }, + rules: { + "@typescript-eslint/no-inferrable-types": 0, + "@typescript-eslint/unbound-method": "off", + "@typescript-eslint/no-empty-interface": "off", + }, + }, + { + files: ["*.svelte"], + processor: "svelte3/svelte3", + // typescript and svelte dont work with template handlers yet. + // https://stackoverflow.com/questions/63337868/svelte-typescript-unexpected-tokensvelteparse-error-when-adding-type-to-an-ev + // we need these 3 rules to be able to do: + // on:change=(e) => anyFunctionHere(). + // when svelte is updated, we can remove these 5 rules for svelte files. + rules: { + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-implicit-any": "off", + "@typescript-eslint/no-unsafe-assignment": "off", + "@typescript-eslint/no-unsafe-member-access": "off", + "@typescript-eslint/no-unsafe-argument": "off", + "@typescript-eslint/no-unsafe-call": "off", + "@typescript-eslint/restrict-template-expressions": [ + "warn", + { + allowNumber: true, + allowBoolean: true, + allowNullish: true, + allowAny: true, + }, + ], + }, + }, + { + files: ["*.spec.ts"], + plugins: ["jest"], + rules: { + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-empty-function": "off", + "@typescript-eslint/no-unused-vars": "off", + "@typescript-eslint/no-unsafe-assignment": "off", + "@typescript-eslint/unbound-method": "off", + "jest/unbound-method": "error", + }, + }, + ], +}; diff --git a/packages/status-page/.gitignore b/packages/status-page/.gitignore new file mode 100644 index 00000000000..d99f7853c92 --- /dev/null +++ b/packages/status-page/.gitignore @@ -0,0 +1,30 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? +.env +.a1.env +.s.env + +# vite +vite.config.ts.timestamp-*.mjs \ No newline at end of file diff --git a/packages/status-page/README.md b/packages/status-page/README.md new file mode 100644 index 00000000000..5ded6356da5 --- /dev/null +++ b/packages/status-page/README.md @@ -0,0 +1,9 @@ +# Status Page + +## Installation + +`pnpm install` + +## Usage + +`pnpm start` diff --git a/packages/status-page/index.html b/packages/status-page/index.html new file mode 100644 index 00000000000..27fc0bed3d8 --- /dev/null +++ b/packages/status-page/index.html @@ -0,0 +1,20 @@ + + + + + + + + + + + Taiko Status + + +
+ + + diff --git a/packages/status-page/jest.config.js b/packages/status-page/jest.config.js new file mode 100644 index 00000000000..7f2d5f3b015 --- /dev/null +++ b/packages/status-page/jest.config.js @@ -0,0 +1,55 @@ +/** @type {import('@ts-jest/dist/types').InitialOptionsTsJest} */ +export default { + transform: { + "^.+\\.js$": "babel-jest", + "^.+\\.ts$": "ts-jest", + "^.+\\.svelte$": [ + "svelte-jester", + { + preprocess: true, + }, + ], + }, + globals: { + 'ts-jest': { + diagnostics: { + ignoreCodes: [1343] + }, + astTransformers: { + before: [ + { + path: 'node_modules/ts-jest-mock-import-meta', + } + ], + } + } + }, + transformIgnorePatterns: ["node_modules/(?!(svelte-i18n)/)"], + moduleFileExtensions: ["ts", "js", "svelte", "json"], + collectCoverage: true, + coverageDirectory: "coverage", + coverageReporters: [ + "lcov", + "text", + "cobertura", + "json-summary", + "json", + "text-summary", + "json", + ], + coverageThreshold: { + global: { + statements: 98.36, + branches: 79, + functions: 96, + lines: 100, + }, + }, + modulePathIgnorePatterns: ["/public/build/"], + preset: "ts-jest", + testEnvironment: "jsdom", + testPathIgnorePatterns: ["/node_modules/"], + coveragePathIgnorePatterns: ["/src/components/"], + testTimeout: 40 * 1000, + watchPathIgnorePatterns: ["node_modules"], +}; diff --git a/packages/status-page/package.json b/packages/status-page/package.json new file mode 100644 index 00000000000..74c3df46072 --- /dev/null +++ b/packages/status-page/package.json @@ -0,0 +1,75 @@ +{ + "name": "@taiko/status-page", + "version": "0.0.0", + "private": true, + "type": "module", + "scripts": { + "start": "pnpm run dev", + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-check --tsconfig ./tsconfig.json", + "test": "pnpm exec jest", + "prettier": "pnpm exec prettier '**/*.{ts,svelte}'", + "prettier:write": "pnpm run prettier -- --write", + "prettier:check": "pnpm run prettier -- --check", + "svelte:check": "npx svelte-check --ignore test-app", + "lint": "pnpm exec eslint './**/*.{ts,svelte}' --ignore-path .eslintignore", + "lint:fix": "pnpm exec eslint --fix './**/*.{ts,svelte}' --ignore-path .eslintignore" + }, + "devDependencies": { + "@babel/preset-env": "^7.16.0", + "@sveltejs/vite-plugin-svelte": "^1.0.1", + "@tsconfig/svelte": "^3.0.0", + "@types/eslint": "^8.2.1", + "@types/estree": "^0.0.50", + "@types/jest": "^27.0.2", + "@types/mixpanel": "^2.14.3", + "@types/sanitize-html": "^2.6.2", + "@typescript-eslint/eslint-plugin": "^5.16.0", + "@typescript-eslint/parser": "^5.16.0", + "@zerodevx/svelte-toast": "^0.6.3", + "autoprefixer": "^10.4.13", + "babel-jest": "^27.3.1", + "babel-plugin-transform-es2015-modules-commonjs": "^6.26.2", + "daisyui": "1.16.6", + "jest": "^27.5.1", + "node-sass": "^7.0.1", + "postcss": "^8.4.19", + "postcss-cli": "^7.1.2", + "postcss-loader": "^6.2.0", + "prettier": "2.7.1", + "rollup-plugin-node-builtins": "^2.0.0", + "rollup-plugin-polyfill-node": "^0.10.2", + "svelte": "^3.53.1", + "svelte-check": "^2.8.0", + "svelte-heros-v2": "^0.3.10", + "svelte-jester": "^2.1.5", + "svelte-loader": "^3.1.2", + "svelte-preprocess": "^4.10.7", + "tailwindcss": "^3.2.4", + "theme-change": "^2.2.0", + "ts-jest": "^27.0.7", + "ts-jest-mock-import-meta": "^0.12.0", + "ts-loader": "^9.2.6", + "tslib": "^2.4.0", + "typescript": "^4.6.4", + "vite": "^3.0.0", + "vite-plugin-static-copy": "^0.12.0" + }, + "dependencies": { + "@coinbase/wallet-sdk": "^3.6.3", + "@ethersproject/experimental": "^5.7.0", + "@lottiefiles/svelte-lottie-player": "^0.2.0", + "@sveltestack/svelte-query": "^1.6.0", + "@wagmi/connectors": "^0.1.1", + "@wagmi/core": "^0.8.0", + "axios": "^1.2.0", + "buffer": "^6.0.3", + "ethers": "^5.7.1", + "extend-expect": "link:@testing-library/jest-dom/extend-expect", + "identicon.js": "^2.3.3", + "svelte-i18n": "^3.5.1", + "svelte-spa-router": "^3.2.0" + } +} diff --git a/packages/status-page/postcss.config.cjs b/packages/status-page/postcss.config.cjs new file mode 100644 index 00000000000..e2dc47804ed --- /dev/null +++ b/packages/status-page/postcss.config.cjs @@ -0,0 +1,6 @@ +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + } +} \ No newline at end of file diff --git a/packages/status-page/public/taiko-favicon.png b/packages/status-page/public/taiko-favicon.png new file mode 100644 index 00000000000..28da6ff1343 Binary files /dev/null and b/packages/status-page/public/taiko-favicon.png differ diff --git a/packages/status-page/src/App.svelte b/packages/status-page/src/App.svelte new file mode 100644 index 00000000000..ddbe6f66d21 --- /dev/null +++ b/packages/status-page/src/App.svelte @@ -0,0 +1,66 @@ + + + +
+ + +
+
+ + diff --git a/packages/status-page/src/app.css b/packages/status-page/src/app.css new file mode 100644 index 00000000000..9fd61216e50 --- /dev/null +++ b/packages/status-page/src/app.css @@ -0,0 +1,67 @@ +.btn.btn-wide { + width: 194px; + height: 56px; +} + +@media (min-width: 768px) { + .btn.md\:btn-wide { + width: 194px; + height: 56px; + } +} + +.btn.btn-token-select { + width: 140px; + height: 60px; +} + +.btn.btn-square { + border-radius: 4px; +} + +/* Invert accent button colors */ +.btn.btn-accent { + background-color: hsla(var(--af) / var(--tw-bg-opacity, 1)); + border-color: hsla(var(--af) / var(--tw-bg-opacity, 1)); + height: 60px; +} + +.btn.btn-accent:hover { + background-color: hsla(var(--a) / var(--tw-bg-opacity, 1)); + border-color: hsla(var(--a) / var(--tw-bg-opacity, 1)); +} + +.dropdown .dropdown-content { + border-radius: 0 0 var(--rounded-box) var(--rounded-box); +} + +.input-group .input.input-primary { + border-radius: 0.5rem; +} + +.form-control .input-group :first-child { + border-radius: 0.5rem; +} + +.form-control .input-group :last-child { + border-radius: 0.5rem; +} + +.taiko-banner { + background-image: url('assets/taiko-banner.svg'); + background-repeat: no-repeat; +} + +.dropdown-content.address-dropdown-content { + border-radius: 6px; +} + +input[type=number]::-webkit-outer-spin-button, +input[type=number]::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; +} + +input[type=number] { + -moz-appearance: textfield; +} \ No newline at end of file diff --git a/packages/status-page/src/assets/lottie/loader.json b/packages/status-page/src/assets/lottie/loader.json new file mode 100644 index 00000000000..7c288a43a3d --- /dev/null +++ b/packages/status-page/src/assets/lottie/loader.json @@ -0,0 +1 @@ +{"nm":"Comp 1","mn":"","layers":[{"ty":4,"nm":"Shape Layer 2","mn":"","sr":1,"st":0,"op":300,"ip":0,"hd":false,"cl":"","ln":"","ddd":0,"bm":0,"tt":0,"hasMask":false,"td":0,"ao":0,"ks":{"a":{"a":0,"k":[-22.637,19.301,0],"ix":1},"s":{"a":0,"k":[33.33333333333334,33.33333333333334,100],"ix":6},"sk":{"a":0,"k":0},"p":{"a":0,"k":[100.02066666666668,100.00000000000003,0],"ix":2},"sa":{"a":0,"k":0},"o":{"a":0,"k":80,"ix":11},"r":{"a":1,"k":[{"o":{"x":0.472,"y":0.326},"i":{"x":0.526,"y":0.673},"s":[0],"t":0},{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[183],"t":60}],"ix":10}},"ef":[],"shapes":[{"ty":"gr","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Group","nm":"Ellipse 1","ix":1,"cix":2,"np":3,"it":[{"ty":"el","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Shape - Ellipse","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,0],"ix":3},"s":{"a":0,"k":[368.602,368.602],"ix":2}},{"ty":"st","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":2,"lj":1,"ml":4,"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":49,"ix":5},"d":[],"c":{"a":0,"k":[0.9882,0.0588,0.7529],"ix":3}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[-22.699,19.301],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]},{"ty":"tm","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Filter - Trim","nm":"Trim Paths 1","ix":2,"e":{"a":1,"k":[{"o":{"x":0.559,"y":0},"i":{"x":0.504,"y":1},"s":[1],"t":0},{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[50],"t":30}],"ix":2},"o":{"a":0,"k":0,"ix":3},"s":{"a":1,"k":[{"o":{"x":0.579,"y":0},"i":{"x":0.438,"y":1},"s":[0],"t":30},{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[49],"t":60}],"ix":1},"m":1}],"ind":0},{"ty":4,"nm":"Shape Layer 1","mn":"","sr":1,"st":0,"op":300,"ip":0,"hd":false,"cl":"","ln":"","ddd":0,"bm":0,"tt":0,"hasMask":false,"td":0,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[33.33333333333334,33.33333333333334,100],"ix":6},"sk":{"a":0,"k":0},"p":{"a":0,"k":[107.56633333333339,93.56633333333338,0],"ix":2},"sa":{"a":0,"k":0},"o":{"a":0,"k":10,"ix":11},"r":{"a":0,"k":0,"ix":10}},"ef":[],"shapes":[{"ty":"gr","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Group","nm":"Ellipse 1","ix":1,"cix":2,"np":3,"it":[{"ty":"el","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Shape - Ellipse","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,0],"ix":3},"s":{"a":0,"k":[368.602,368.602],"ix":2}},{"ty":"st","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":2,"lj":1,"ml":4,"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":49,"ix":5},"d":[],"c":{"a":0,"k":[0.698,0.0588,0.5373],"ix":3}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[-22.699,19.301],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":1}],"ddd":0,"h":200,"w":200,"meta":{"a":"","k":"","d":"","g":"@lottiefiles/toolkit-js 0.17.3","tc":"#ffffff"},"v":"5.5.0","fr":30,"op":60,"ip":0,"assets":[]} \ No newline at end of file diff --git a/packages/status-page/src/assets/taiko-banner.svg b/packages/status-page/src/assets/taiko-banner.svg new file mode 100644 index 00000000000..e351b7b9ab4 --- /dev/null +++ b/packages/status-page/src/assets/taiko-banner.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/packages/status-page/src/components/Loader.svelte b/packages/status-page/src/components/Loader.svelte new file mode 100644 index 00000000000..70a3a93064c --- /dev/null +++ b/packages/status-page/src/components/Loader.svelte @@ -0,0 +1,16 @@ + + + diff --git a/packages/status-page/src/components/Navbar.svelte b/packages/status-page/src/components/Navbar.svelte new file mode 100644 index 00000000000..9b4489dd3bc --- /dev/null +++ b/packages/status-page/src/components/Navbar.svelte @@ -0,0 +1,7 @@ + + + diff --git a/packages/status-page/src/components/StatusIndicator.svelte b/packages/status-page/src/components/StatusIndicator.svelte new file mode 100644 index 00000000000..44bc7a941c2 --- /dev/null +++ b/packages/status-page/src/components/StatusIndicator.svelte @@ -0,0 +1,85 @@ + + +
+

{header}

+ {#if loading} + + {:else if statusValue || typeof statusValue === "number"} + onClick(statusValue)} + > + + {displayStatusValue(statusValue)} + + + {/if} +
diff --git a/packages/status-page/src/components/icons/Loader.svelte b/packages/status-page/src/components/icons/Loader.svelte new file mode 100644 index 00000000000..a342c73fe82 --- /dev/null +++ b/packages/status-page/src/components/icons/Loader.svelte @@ -0,0 +1,16 @@ + + + + diff --git a/packages/status-page/src/components/icons/TaikoLogo.svelte b/packages/status-page/src/components/icons/TaikoLogo.svelte new file mode 100644 index 00000000000..26595968c90 --- /dev/null +++ b/packages/status-page/src/components/icons/TaikoLogo.svelte @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + diff --git a/packages/status-page/src/components/providers/BaseQueries.svelte b/packages/status-page/src/components/providers/BaseQueries.svelte new file mode 100644 index 00000000000..4fa864ce7aa --- /dev/null +++ b/packages/status-page/src/components/providers/BaseQueries.svelte @@ -0,0 +1 @@ + diff --git a/packages/status-page/src/components/providers/QueryProvider.svelte b/packages/status-page/src/components/providers/QueryProvider.svelte new file mode 100644 index 00000000000..91774c4acb8 --- /dev/null +++ b/packages/status-page/src/components/providers/QueryProvider.svelte @@ -0,0 +1,13 @@ + + + + + + + diff --git a/packages/status-page/src/constants/abi/Bridge.ts b/packages/status-page/src/constants/abi/Bridge.ts new file mode 100644 index 00000000000..444f5fbcfc2 --- /dev/null +++ b/packages/status-page/src/constants/abi/Bridge.ts @@ -0,0 +1,744 @@ +export default [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "chainId", + type: "uint256", + }, + { + indexed: false, + internalType: "bool", + name: "enabled", + type: "bool", + }, + ], + name: "DestChainEnabled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint8", + name: "version", + type: "uint8", + }, + ], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "signal", + type: "bytes32", + }, + { + components: [ + { + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "uint256", + name: "srcChainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "destChainId", + type: "uint256", + }, + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "address", + name: "refundAddress", + type: "address", + }, + { + internalType: "uint256", + name: "depositValue", + type: "uint256", + }, + { + internalType: "uint256", + name: "callValue", + type: "uint256", + }, + { + internalType: "uint256", + name: "processingFee", + type: "uint256", + }, + { + internalType: "uint256", + name: "gasLimit", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + internalType: "string", + name: "memo", + type: "string", + }, + ], + indexed: false, + internalType: "struct IBridge.Message", + name: "message", + type: "tuple", + }, + ], + name: "MessageSent", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "signal", + type: "bytes32", + }, + { + indexed: false, + internalType: "enum LibBridgeData.MessageStatus", + name: "status", + type: "uint8", + }, + ], + name: "MessageStatusChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "bytes32", + name: "signal", + type: "bytes32", + }, + ], + name: "SignalSent", + type: "event", + }, + { + inputs: [], + name: "addressManager", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "context", + outputs: [ + { + components: [ + { + internalType: "bytes32", + name: "signal", + type: "bytes32", + }, + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "uint256", + name: "srcChainId", + type: "uint256", + }, + ], + internalType: "struct IBridge.Context", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "bool", + name: "enabled", + type: "bool", + }, + ], + name: "enableDestChain", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "signal", + type: "bytes32", + }, + ], + name: "getMessageStatus", + outputs: [ + { + internalType: "enum LibBridgeData.MessageStatus", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_addressManager", + type: "address", + }, + ], + name: "init", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + ], + name: "isDestChainEnabled", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "signal", + type: "bytes32", + }, + { + internalType: "uint256", + name: "srcChainId", + type: "uint256", + }, + { + internalType: "bytes", + name: "proof", + type: "bytes", + }, + ], + name: "isMessageReceived", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "signal", + type: "bytes32", + }, + ], + name: "isMessageSent", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "signal", + type: "bytes32", + }, + { + internalType: "uint256", + name: "srcChainId", + type: "uint256", + }, + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "bytes", + name: "proof", + type: "bytes", + }, + ], + name: "isSignalReceived", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "bytes32", + name: "signal", + type: "bytes32", + }, + ], + name: "isSignalSent", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "uint256", + name: "srcChainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "destChainId", + type: "uint256", + }, + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "address", + name: "refundAddress", + type: "address", + }, + { + internalType: "uint256", + name: "depositValue", + type: "uint256", + }, + { + internalType: "uint256", + name: "callValue", + type: "uint256", + }, + { + internalType: "uint256", + name: "processingFee", + type: "uint256", + }, + { + internalType: "uint256", + name: "gasLimit", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + internalType: "string", + name: "memo", + type: "string", + }, + ], + internalType: "struct IBridge.Message", + name: "message", + type: "tuple", + }, + { + internalType: "bytes", + name: "proof", + type: "bytes", + }, + ], + name: "processMessage", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "renounceOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "name", + type: "string", + }, + ], + name: "resolve", + outputs: [ + { + internalType: "address payable", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "chainId", + type: "uint256", + }, + { + internalType: "string", + name: "name", + type: "string", + }, + ], + name: "resolve", + outputs: [ + { + internalType: "address payable", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "uint256", + name: "srcChainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "destChainId", + type: "uint256", + }, + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "address", + name: "refundAddress", + type: "address", + }, + { + internalType: "uint256", + name: "depositValue", + type: "uint256", + }, + { + internalType: "uint256", + name: "callValue", + type: "uint256", + }, + { + internalType: "uint256", + name: "processingFee", + type: "uint256", + }, + { + internalType: "uint256", + name: "gasLimit", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + internalType: "string", + name: "memo", + type: "string", + }, + ], + internalType: "struct IBridge.Message", + name: "message", + type: "tuple", + }, + { + internalType: "bool", + name: "lastAttempt", + type: "bool", + }, + ], + name: "retryMessage", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "uint256", + name: "srcChainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "destChainId", + type: "uint256", + }, + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "address", + name: "refundAddress", + type: "address", + }, + { + internalType: "uint256", + name: "depositValue", + type: "uint256", + }, + { + internalType: "uint256", + name: "callValue", + type: "uint256", + }, + { + internalType: "uint256", + name: "processingFee", + type: "uint256", + }, + { + internalType: "uint256", + name: "gasLimit", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + internalType: "string", + name: "memo", + type: "string", + }, + ], + internalType: "struct IBridge.Message", + name: "message", + type: "tuple", + }, + ], + name: "sendMessage", + outputs: [ + { + internalType: "bytes32", + name: "signal", + type: "bytes32", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "signal", + type: "bytes32", + }, + ], + name: "sendSignal", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + stateMutability: "payable", + type: "receive", + }, +]; diff --git a/packages/status-page/src/constants/abi/HeaderSync.ts b/packages/status-page/src/constants/abi/HeaderSync.ts new file mode 100644 index 00000000000..0ce81c2ba66 --- /dev/null +++ b/packages/status-page/src/constants/abi/HeaderSync.ts @@ -0,0 +1,59 @@ +export default [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "height", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "srcHeight", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes32", + name: "srcHash", + type: "bytes32", + }, + ], + name: "HeaderSynced", + type: "event", + }, + { + inputs: [], + name: "getLatestSyncedHeader", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "number", + type: "uint256", + }, + ], + name: "getSyncedHeader", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, +]; diff --git a/packages/status-page/src/constants/abi/TaikoL1.ts b/packages/status-page/src/constants/abi/TaikoL1.ts new file mode 100644 index 00000000000..421cb7fb58a --- /dev/null +++ b/packages/status-page/src/constants/abi/TaikoL1.ts @@ -0,0 +1,915 @@ +export default [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint64", + name: "commitSlot", + type: "uint64", + }, + { + indexed: false, + internalType: "uint64", + name: "commitHeight", + type: "uint64", + }, + { + indexed: false, + internalType: "bytes32", + name: "commitHash", + type: "bytes32", + }, + ], + name: "BlockCommitted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + components: [ + { + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + internalType: "uint256", + name: "l1Height", + type: "uint256", + }, + { + internalType: "bytes32", + name: "l1Hash", + type: "bytes32", + }, + { + internalType: "address", + name: "beneficiary", + type: "address", + }, + { + internalType: "bytes32", + name: "txListHash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "mixHash", + type: "bytes32", + }, + { + internalType: "bytes", + name: "extraData", + type: "bytes", + }, + { + internalType: "uint64", + name: "gasLimit", + type: "uint64", + }, + { + internalType: "uint64", + name: "timestamp", + type: "uint64", + }, + { + internalType: "uint64", + name: "commitHeight", + type: "uint64", + }, + { + internalType: "uint64", + name: "commitSlot", + type: "uint64", + }, + ], + indexed: false, + internalType: "struct TaikoData.BlockMetadata", + name: "meta", + type: "tuple", + }, + ], + name: "BlockProposed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes32", + name: "parentHash", + type: "bytes32", + }, + { + indexed: false, + internalType: "bytes32", + name: "blockHash", + type: "bytes32", + }, + { + indexed: false, + internalType: "uint64", + name: "timestamp", + type: "uint64", + }, + { + indexed: false, + internalType: "uint64", + name: "provenAt", + type: "uint64", + }, + { + indexed: false, + internalType: "address", + name: "prover", + type: "address", + }, + ], + name: "BlockProven", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes32", + name: "blockHash", + type: "bytes32", + }, + ], + name: "BlockVerified", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bool", + name: "halted", + type: "bool", + }, + ], + name: "Halted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "height", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "srcHeight", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes32", + name: "srcHash", + type: "bytes32", + }, + ], + name: "HeaderSynced", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint8", + name: "version", + type: "uint8", + }, + ], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + inputs: [], + name: "addressManager", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint64", + name: "commitSlot", + type: "uint64", + }, + { + internalType: "bytes32", + name: "commitHash", + type: "bytes32", + }, + ], + name: "commitBlock", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getBlockFee", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + internalType: "bytes32", + name: "parentHash", + type: "bytes32", + }, + ], + name: "getBlockProvers", + outputs: [ + { + internalType: "address[]", + name: "", + type: "address[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getConfig", + outputs: [ + { + components: [ + { + internalType: "uint256", + name: "chainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "maxNumBlocks", + type: "uint256", + }, + { + internalType: "uint256", + name: "blockHashHistory", + type: "uint256", + }, + { + internalType: "uint256", + name: "zkProofsPerBlock", + type: "uint256", + }, + { + internalType: "uint256", + name: "maxVerificationsPerTx", + type: "uint256", + }, + { + internalType: "uint256", + name: "commitConfirmations", + type: "uint256", + }, + { + internalType: "uint256", + name: "maxProofsPerForkChoice", + type: "uint256", + }, + { + internalType: "uint256", + name: "blockMaxGasLimit", + type: "uint256", + }, + { + internalType: "uint256", + name: "maxTransactionsPerBlock", + type: "uint256", + }, + { + internalType: "uint256", + name: "maxBytesPerTxList", + type: "uint256", + }, + { + internalType: "uint256", + name: "minTxGasLimit", + type: "uint256", + }, + { + internalType: "uint256", + name: "anchorTxGasLimit", + type: "uint256", + }, + { + internalType: "uint256", + name: "feePremiumLamda", + type: "uint256", + }, + { + internalType: "uint256", + name: "rewardBurnBips", + type: "uint256", + }, + { + internalType: "uint256", + name: "proposerDepositPctg", + type: "uint256", + }, + { + internalType: "uint256", + name: "feeBaseMAF", + type: "uint256", + }, + { + internalType: "uint256", + name: "blockTimeMAF", + type: "uint256", + }, + { + internalType: "uint256", + name: "proofTimeMAF", + type: "uint256", + }, + { + internalType: "uint64", + name: "rewardMultiplierPctg", + type: "uint64", + }, + { + internalType: "uint64", + name: "feeGracePeriodPctg", + type: "uint64", + }, + { + internalType: "uint64", + name: "feeMaxPeriodPctg", + type: "uint64", + }, + { + internalType: "uint64", + name: "blockTimeCap", + type: "uint64", + }, + { + internalType: "uint64", + name: "proofTimeCap", + type: "uint64", + }, + { + internalType: "uint64", + name: "boostrapDiscountHalvingPeriod", + type: "uint64", + }, + { + internalType: "uint64", + name: "initialUncleDelay", + type: "uint64", + }, + { + internalType: "bool", + name: "enableTokenomics", + type: "bool", + }, + ], + internalType: "struct TaikoData.Config", + name: "", + type: "tuple", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "getLatestSyncedHeader", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint64", + name: "provenAt", + type: "uint64", + }, + { + internalType: "uint64", + name: "proposedAt", + type: "uint64", + }, + ], + name: "getProofReward", + outputs: [ + { + internalType: "uint256", + name: "reward", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "id", + type: "uint256", + }, + ], + name: "getProposedBlock", + outputs: [ + { + components: [ + { + internalType: "bytes32", + name: "metaHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "deposit", + type: "uint256", + }, + { + internalType: "address", + name: "proposer", + type: "address", + }, + { + internalType: "uint64", + name: "proposedAt", + type: "uint64", + }, + ], + internalType: "struct TaikoData.ProposedBlock", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getStateVariables", + outputs: [ + { + internalType: "uint64", + name: "", + type: "uint64", + }, + { + internalType: "uint64", + name: "", + type: "uint64", + }, + { + internalType: "uint64", + name: "", + type: "uint64", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "number", + type: "uint256", + }, + ], + name: "getSyncedHeader", + outputs: [ + { + internalType: "bytes32", + name: "header", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "blockId", + type: "uint256", + }, + ], + name: "getUncleProofDelay", + outputs: [ + { + internalType: "uint64", + name: "", + type: "uint64", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bool", + name: "toHalt", + type: "bool", + }, + ], + name: "halt", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_addressManager", + type: "address", + }, + { + internalType: "bytes32", + name: "_genesisBlockHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "_feeBase", + type: "uint256", + }, + ], + name: "init", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "commitSlot", + type: "uint256", + }, + { + internalType: "uint256", + name: "commitHeight", + type: "uint256", + }, + { + internalType: "bytes32", + name: "commitHash", + type: "bytes32", + }, + ], + name: "isCommitValid", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "isHalted", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes[]", + name: "inputs", + type: "bytes[]", + }, + ], + name: "proposeBlock", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "blockId", + type: "uint256", + }, + { + internalType: "bytes[]", + name: "inputs", + type: "bytes[]", + }, + ], + name: "proveBlock", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "blockId", + type: "uint256", + }, + { + internalType: "bytes[]", + name: "inputs", + type: "bytes[]", + }, + ], + name: "proveBlockInvalid", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "renounceOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "name", + type: "string", + }, + ], + name: "resolve", + outputs: [ + { + internalType: "address payable", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "chainId", + type: "uint256", + }, + { + internalType: "string", + name: "name", + type: "string", + }, + ], + name: "resolve", + outputs: [ + { + internalType: "address payable", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "hash", + type: "bytes32", + }, + { + internalType: "uint8", + name: "k", + type: "uint8", + }, + ], + name: "signWithGoldenTouch", + outputs: [ + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "uint256", + name: "r", + type: "uint256", + }, + { + internalType: "uint256", + name: "s", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "state", + outputs: [ + { + internalType: "uint64", + name: "genesisHeight", + type: "uint64", + }, + { + internalType: "uint64", + name: "genesisTimestamp", + type: "uint64", + }, + { + internalType: "uint64", + name: "__reservedA1", + type: "uint64", + }, + { + internalType: "uint64", + name: "statusBits", + type: "uint64", + }, + { + internalType: "uint256", + name: "feeBase", + type: "uint256", + }, + { + internalType: "uint64", + name: "nextBlockId", + type: "uint64", + }, + { + internalType: "uint64", + name: "lastProposedAt", + type: "uint64", + }, + { + internalType: "uint64", + name: "avgBlockTime", + type: "uint64", + }, + { + internalType: "uint64", + name: "__avgGasLimit", + type: "uint64", + }, + { + internalType: "uint64", + name: "latestVerifiedHeight", + type: "uint64", + }, + { + internalType: "uint64", + name: "latestVerifiedId", + type: "uint64", + }, + { + internalType: "uint64", + name: "avgProofTime", + type: "uint64", + }, + { + internalType: "uint64", + name: "__reservedC1", + type: "uint64", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "maxBlocks", + type: "uint256", + }, + ], + name: "verifyBlocks", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; diff --git a/packages/status-page/src/domain/status.ts b/packages/status-page/src/domain/status.ts new file mode 100644 index 00000000000..64fc47b822c --- /dev/null +++ b/packages/status-page/src/domain/status.ts @@ -0,0 +1,3 @@ +type Status = string | number | boolean; + +export default Status; diff --git a/packages/status-page/src/i18n.js b/packages/status-page/src/i18n.js new file mode 100644 index 00000000000..8f994bd81b8 --- /dev/null +++ b/packages/status-page/src/i18n.js @@ -0,0 +1,41 @@ +import { _, dictionary, locale } from "svelte-i18n"; + +function setupI18n({ withLocale: _locale } = { withLocale: "en" }) { + dictionary.set({ + en: { + home: { + title: "Taiko Bridge", + selectToken: "Select Token", + to: "To", + bridge: "Bridge", + approve: "Approve", + }, + bridgeForm: { + fieldLabel: "Amount", + maxLabel: "Max:", + processingFeeLabel: "Processing Fee", + bridge: "Bridge", + approve: "Approve", + }, + nav: { + connect: "Connect Wallet", + }, + toast: { + transactionSent: "Transaction sent", + errorSendingTransaction: "Error sending transaction", + errorDisconneting: "Could not disconnect", + }, + switchChainModal: { + title: "Not on the right network", + subtitle: "Your current network is not supported. Please select one:", + }, + connectModal: { + title: "Connect Wallet", + }, + }, + }); + + locale.set(_locale); +} + +export { _, setupI18n }; diff --git a/packages/status-page/src/main.ts b/packages/status-page/src/main.ts new file mode 100644 index 00000000000..3bbaf7b1fe4 --- /dev/null +++ b/packages/status-page/src/main.ts @@ -0,0 +1,12 @@ +import "./app.css"; +import App from "./App.svelte"; +import {Buffer} from 'buffer'; + +const app = new App({ + target: document.getElementById("app"), +}); + +// @ts-ignore +window.Buffer = Buffer; + +export default app; diff --git a/packages/status-page/src/pages/home/Home.svelte b/packages/status-page/src/pages/home/Home.svelte new file mode 100644 index 00000000000..7ad5a464cf1 --- /dev/null +++ b/packages/status-page/src/pages/home/Home.svelte @@ -0,0 +1,223 @@ + + +
+

Taiko Protocol Status

+
+
+ {#each statusIndicators as statusIndicator} + + {/each} +
diff --git a/packages/status-page/src/utils/displayStatusValue.ts b/packages/status-page/src/utils/displayStatusValue.ts new file mode 100644 index 00000000000..627a7477cee --- /dev/null +++ b/packages/status-page/src/utils/displayStatusValue.ts @@ -0,0 +1,14 @@ +import { ethers } from "ethers"; + +export const displayStatusValue = (value: string | number | boolean) => { + if (typeof value === "string") { + if (!value) return "0x"; + if (ethers.utils.isHexString(value)) { + return value.substring(0, 14); + } + return value; + } + + if (typeof value === "number") return value; + if (typeof value === "boolean") return value.toString(); +}; diff --git a/packages/status-page/src/utils/getAvailableSlots.ts b/packages/status-page/src/utils/getAvailableSlots.ts new file mode 100644 index 00000000000..831a985e228 --- /dev/null +++ b/packages/status-page/src/utils/getAvailableSlots.ts @@ -0,0 +1,14 @@ +import { Contract, ethers } from "ethers"; +import TaikoL1 from "../constants/abi/TaikoL1"; + +export const getAvailableSlots = async ( + provider: ethers.providers.JsonRpcProvider, + contractAddress: string +): Promise => { + const contract: Contract = new Contract(contractAddress, TaikoL1, provider); + const stateVariables = await contract.getStateVariables(); + const nextBlockId = stateVariables[3]; + const latestVerifiedId = stateVariables[2]; + const pendingBlocks = nextBlockId - latestVerifiedId - 1; + return Math.abs(pendingBlocks - 2048); +}; diff --git a/packages/status-page/src/utils/getBlockFee.ts b/packages/status-page/src/utils/getBlockFee.ts new file mode 100644 index 00000000000..6c73f972096 --- /dev/null +++ b/packages/status-page/src/utils/getBlockFee.ts @@ -0,0 +1,11 @@ +import { Contract, ethers } from "ethers"; +import TaikoL1 from "../constants/abi/TaikoL1"; + +export const getBlockFee = async ( + provider: ethers.providers.JsonRpcProvider, + contractAddress: string +): Promise => { + const contract: Contract = new Contract(contractAddress, TaikoL1, provider); + const fee = await contract.getBlockFee(); + return fee; +}; diff --git a/packages/status-page/src/utils/getGasPrice.ts b/packages/status-page/src/utils/getGasPrice.ts new file mode 100644 index 00000000000..fb29f3ce5ab --- /dev/null +++ b/packages/status-page/src/utils/getGasPrice.ts @@ -0,0 +1,9 @@ +import { ethers } from "ethers"; + +export const getGasPrice = async ( + provider: ethers.providers.JsonRpcProvider, + contractAddress: string +): Promise => { + const gasPrice = await provider.getGasPrice(); + return ethers.utils.formatUnits(gasPrice, "gwei"); +}; diff --git a/packages/status-page/src/utils/getIsHalted.ts b/packages/status-page/src/utils/getIsHalted.ts new file mode 100644 index 00000000000..4eabb1857d0 --- /dev/null +++ b/packages/status-page/src/utils/getIsHalted.ts @@ -0,0 +1,11 @@ +import { Contract, ethers } from "ethers"; +import TaikoL1 from "../constants/abi/TaikoL1"; + +export const getIsHalted = async ( + provider: ethers.providers.JsonRpcProvider, + contractAddress: string +): Promise => { + const contract: Contract = new Contract(contractAddress, TaikoL1, provider); + const isHalted = await contract.isHalted(); + return isHalted.toString(); +}; diff --git a/packages/status-page/src/utils/getLastVerifiedBlockId.ts b/packages/status-page/src/utils/getLastVerifiedBlockId.ts new file mode 100644 index 00000000000..e36c455557a --- /dev/null +++ b/packages/status-page/src/utils/getLastVerifiedBlockId.ts @@ -0,0 +1,12 @@ +import { BigNumber, Contract, ethers } from "ethers"; +import TaikoL1 from "../constants/abi/TaikoL1"; + +export const getLastVerifiedBlockId = async ( + provider: ethers.providers.JsonRpcProvider, + contractAddress: string +): Promise => { + const contract: Contract = new Contract(contractAddress, TaikoL1, provider); + const stateVariables = await contract.getStateVariables(); + const latestVerifiedId = stateVariables[2]; + return BigNumber.from(latestVerifiedId).toNumber(); +}; diff --git a/packages/status-page/src/utils/getLatestSyncedHeader.ts b/packages/status-page/src/utils/getLatestSyncedHeader.ts new file mode 100644 index 00000000000..292fafc29b6 --- /dev/null +++ b/packages/status-page/src/utils/getLatestSyncedHeader.ts @@ -0,0 +1,11 @@ +import { Contract, ethers } from "ethers"; +import TaikoL1 from "../constants/abi/TaikoL1"; + +export const getLatestSyncedHeader = async ( + provider: ethers.providers.JsonRpcProvider, + contractAddress: string +): Promise => { + const contract: Contract = new Contract(contractAddress, TaikoL1, provider); + const header = await contract.getLatestSyncedHeader(); + return header; +}; diff --git a/packages/status-page/src/utils/getNextBlockId.ts b/packages/status-page/src/utils/getNextBlockId.ts new file mode 100644 index 00000000000..6a397f51cce --- /dev/null +++ b/packages/status-page/src/utils/getNextBlockId.ts @@ -0,0 +1,13 @@ +import { next } from "cheerio/lib/api/traversing"; +import { BigNumber, Contract, ethers } from "ethers"; +import TaikoL1 from "../constants/abi/TaikoL1"; + +export const getNextBlockId = async ( + provider: ethers.providers.JsonRpcProvider, + contractAddress: string +): Promise => { + const contract: Contract = new Contract(contractAddress, TaikoL1, provider); + const stateVariables = await contract.getStateVariables(); + const nextBlockId = stateVariables[3]; + return BigNumber.from(nextBlockId).toNumber(); +}; diff --git a/packages/status-page/src/utils/getPeerCount.ts b/packages/status-page/src/utils/getPeerCount.ts new file mode 100644 index 00000000000..ecde006f68f --- /dev/null +++ b/packages/status-page/src/utils/getPeerCount.ts @@ -0,0 +1,9 @@ +import { BigNumber, ethers } from "ethers"; + +export const getPeerCount = async ( + provider: ethers.providers.JsonRpcProvider, + contractAddress: string +): Promise => { + const peers = await provider.send("net_peerCount", []); + return BigNumber.from(peers).toNumber(); +}; diff --git a/packages/status-page/src/utils/getPendingBlocks.ts b/packages/status-page/src/utils/getPendingBlocks.ts new file mode 100644 index 00000000000..f74452c3c37 --- /dev/null +++ b/packages/status-page/src/utils/getPendingBlocks.ts @@ -0,0 +1,13 @@ +import { Contract, ethers } from "ethers"; +import TaikoL1 from "../constants/abi/TaikoL1"; + +export const getPendingBlocks = async ( + provider: ethers.providers.JsonRpcProvider, + contractAddress: string +): Promise => { + const contract: Contract = new Contract(contractAddress, TaikoL1, provider); + const stateVariables = await contract.getStateVariables(); + const nextBlockId = stateVariables[3]; + const latestVerifiedId = stateVariables[2]; + return nextBlockId - latestVerifiedId - 1; +}; diff --git a/packages/status-page/src/utils/getPendingTransactions.ts b/packages/status-page/src/utils/getPendingTransactions.ts new file mode 100644 index 00000000000..87bf317ff87 --- /dev/null +++ b/packages/status-page/src/utils/getPendingTransactions.ts @@ -0,0 +1,9 @@ +import { BigNumber, ethers } from "ethers"; + +export const getPendingTransactions = async ( + provider: ethers.providers.JsonRpcProvider, + contractAddress: string +): Promise => { + const mempool = await provider.send("txpool_status", []); + return BigNumber.from(mempool.pending).toNumber(); +}; diff --git a/packages/status-page/src/utils/getProofReward.ts b/packages/status-page/src/utils/getProofReward.ts new file mode 100644 index 00000000000..d7fb4fa33c0 --- /dev/null +++ b/packages/status-page/src/utils/getProofReward.ts @@ -0,0 +1,11 @@ +import { Contract, ethers } from "ethers"; +import TaikoL1 from "../constants/abi/TaikoL1"; + +export const getProofReward = async ( + provider: ethers.providers.JsonRpcProvider, + contractAddress: string +): Promise => { + const contract: Contract = new Contract(contractAddress, TaikoL1, provider); + const fee = await contract.getProofReward(); + return fee; +}; diff --git a/packages/status-page/src/utils/getProposers.ts b/packages/status-page/src/utils/getProposers.ts new file mode 100644 index 00000000000..eecc013cdb3 --- /dev/null +++ b/packages/status-page/src/utils/getProposers.ts @@ -0,0 +1,26 @@ +import { Contract, ethers } from "ethers"; +import TaikoL1 from "../constants/abi/TaikoL1"; + +export const getProposers = async ( + provider: ethers.providers.JsonRpcProvider, + contractAddress: string +): Promise => { + const contract: Contract = new Contract(contractAddress, TaikoL1, provider); + let events = []; + const latestBlock = await provider.getBlockNumber(); + const batchSize = 1000; + for (let i = 0; i < latestBlock; i += batchSize) { + const end = i + batchSize > latestBlock ? latestBlock : i + batchSize; + const e = await contract.queryFilter("BlockProposed", i, end); + events = events.concat(e); + } + + const proposers = []; + events.map((event) => { + if (!proposers.includes(event.args.meta.beneficiary)) { + proposers.push(event.args.meta.beneficiary); + } + }); + + return proposers.length; +}; diff --git a/packages/status-page/src/utils/getQueuedTransactions.ts b/packages/status-page/src/utils/getQueuedTransactions.ts new file mode 100644 index 00000000000..7af83e52e3b --- /dev/null +++ b/packages/status-page/src/utils/getQueuedTransactions.ts @@ -0,0 +1,9 @@ +import { BigNumber, ethers } from "ethers"; + +export const getQueuedTransactions = async ( + provider: ethers.providers.JsonRpcProvider, + contractAddress: string +): Promise => { + const mempool = await provider.send("txpool_status", []); + return BigNumber.from(mempool.queued).toNumber(); +}; diff --git a/packages/status-page/src/utils/watchHeaderSynced.ts b/packages/status-page/src/utils/watchHeaderSynced.ts new file mode 100644 index 00000000000..e101647e35e --- /dev/null +++ b/packages/status-page/src/utils/watchHeaderSynced.ts @@ -0,0 +1,13 @@ +import { Contract, ethers } from "ethers"; +import TaikoL1 from "../constants/abi/TaikoL1"; + +export const watchHeaderSynced = async ( + provider: ethers.providers.JsonRpcProvider, + taikoL1Address: string, + onEvent: (value: string | number | boolean) => void +) => { + const contract: Contract = new Contract(taikoL1Address, TaikoL1, provider); + contract.on("HeaderSynced", (height, srcHeight, srcHash) => { + onEvent(srcHash); + }); +}; diff --git a/packages/status-page/src/vite-env.d.ts b/packages/status-page/src/vite-env.d.ts new file mode 100644 index 00000000000..4078e7476a2 --- /dev/null +++ b/packages/status-page/src/vite-env.d.ts @@ -0,0 +1,2 @@ +/// +/// diff --git a/packages/status-page/svelte.config.cjs b/packages/status-page/svelte.config.cjs new file mode 100644 index 00000000000..8bf5d4b3f50 --- /dev/null +++ b/packages/status-page/svelte.config.cjs @@ -0,0 +1,7 @@ +const sveltePreprocess = require('svelte-preprocess'); + +module.exports = { + // Consult https://github.com/sveltejs/svelte-preprocess + // for more information about preprocessors + preprocess: sveltePreprocess() +} diff --git a/packages/status-page/tailwind.config.cjs b/packages/status-page/tailwind.config.cjs new file mode 100644 index 00000000000..4de26d4f8ab --- /dev/null +++ b/packages/status-page/tailwind.config.cjs @@ -0,0 +1,53 @@ +module.exports = { + content: ["./src/**/*.{html,js,svelte,ts}"], + plugins: [require("daisyui")], + theme: { + extend: { + colors: { + "dark-1": "var(--color-dark-1)", + "dark-2": "var(--color-dark-2)", + "dark-3": "var(--color-dark-3)", + "dark-4": "var(--color-dark-4)", + "dark-5": "var(--color-dark-5)", + "dark-6": "var(--color-dark-6)", + } + } + }, + daisyui: { + styled: true, + themes: true, + base: true, + utils: true, + logs: true, + rtl: false, + prefix: "", + darkTheme: "dark", + themes: [ + { + dark: { + ...require("daisyui/colors/themes")["[data-theme=black]"], + "primary": "#242424", + "secondary": "#181818", + "accent": "#FC0FC0", + "accent-focus": "#B20F89", + "accent-content": "#F3F3F3", + "neutral": "#242424", + "base-100": "#0f0f0f", + "info": "#373737", + "success": "#008000", + "warning": "#FFFF00", + "error": "#FF0000", + "--color-dark-1": "#000000", + "--color-dark-2": "#0F0F0F", + "--color-dark-3": "#181818", + "--color-dark-4": "#242424", + "--color-dark-5": "#373737", + "--color-dark-6": "#4F4F4F", + "--rounded-btn": "1rem", + "--btn-text-case": "capitalize", + "--rounded-box": "18px", + }, + }, + ], + } +}; diff --git a/packages/status-page/tsconfig.json b/packages/status-page/tsconfig.json new file mode 100644 index 00000000000..9094dab45e5 --- /dev/null +++ b/packages/status-page/tsconfig.json @@ -0,0 +1,21 @@ +{ + "extends": "@tsconfig/svelte/tsconfig.json", + "compilerOptions": { + "target": "es2022", + "useDefineForClassFields": true, + "module": "es2022", + "resolveJsonModule": true, + "baseUrl": ".", + /** + * Typecheck JS in `.svelte` and `.js` files by default. + * Disable checkJs if you'd like to use dynamic types in JS. + * Note that setting allowJs false does not prevent the use + * of JS in `.svelte` files. + */ + "allowJs": true, + "checkJs": true, + "isolatedModules": false + }, + "include": ["src/**/*.d.ts", "src/**/*.ts", "src/**/*.js", "src/**/*.svelte"], + "references": [{ "path": "./tsconfig.node.json" }] +} diff --git a/packages/status-page/tsconfig.node.json b/packages/status-page/tsconfig.node.json new file mode 100644 index 00000000000..65dbdb96ae5 --- /dev/null +++ b/packages/status-page/tsconfig.node.json @@ -0,0 +1,8 @@ +{ + "compilerOptions": { + "composite": true, + "module": "ESNext", + "moduleResolution": "Node" + }, + "include": ["vite.config.ts"] +} diff --git a/packages/status-page/vite.config.ts b/packages/status-page/vite.config.ts new file mode 100644 index 00000000000..e90bff74dde --- /dev/null +++ b/packages/status-page/vite.config.ts @@ -0,0 +1,26 @@ +import { defineConfig } from "vite"; +import { svelte } from "@sveltejs/vite-plugin-svelte"; +import polyfillNode from "rollup-plugin-polyfill-node"; +import { viteStaticCopy } from "vite-plugin-static-copy"; + +// https://vitejs.dev/config/ +export default defineConfig({ + define: { + global: 'globalThis', + 'process.env.NODE_DEBUG': false, + 'process.env.LINK_API_URL': false, + 'process.env.SDK_VERSION': "'unknown'" + }, + plugins: [ + svelte(), + polyfillNode(), + viteStaticCopy({ + targets: [ + { + src: "src/assets/lottie/loader.json", + dest: "lottie", + }, + ], + }), + ], +}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a1044844ed7..4ace754cdf5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -208,6 +208,113 @@ importers: typechain: 5.2.0_typescript@4.9.3 typescript: 4.9.3 + packages/status-page: + specifiers: + '@babel/preset-env': ^7.16.0 + '@coinbase/wallet-sdk': ^3.6.3 + '@ethersproject/experimental': ^5.7.0 + '@lottiefiles/svelte-lottie-player': ^0.2.0 + '@sveltejs/vite-plugin-svelte': ^1.0.1 + '@sveltestack/svelte-query': ^1.6.0 + '@tsconfig/svelte': ^3.0.0 + '@types/eslint': ^8.2.1 + '@types/estree': ^0.0.50 + '@types/jest': ^27.0.2 + '@types/mixpanel': ^2.14.3 + '@types/sanitize-html': ^2.6.2 + '@typescript-eslint/eslint-plugin': ^5.16.0 + '@typescript-eslint/parser': ^5.16.0 + '@wagmi/connectors': ^0.1.1 + '@wagmi/core': ^0.8.0 + '@zerodevx/svelte-toast': ^0.6.3 + autoprefixer: ^10.4.13 + axios: ^1.2.0 + babel-jest: ^27.3.1 + babel-plugin-transform-es2015-modules-commonjs: ^6.26.2 + buffer: ^6.0.3 + daisyui: 1.16.6 + ethers: ^5.7.1 + extend-expect: link:@testing-library/jest-dom/extend-expect + identicon.js: ^2.3.3 + jest: ^27.5.1 + node-sass: ^7.0.1 + postcss: ^8.4.19 + postcss-cli: ^7.1.2 + postcss-loader: ^6.2.0 + prettier: 2.7.1 + rollup-plugin-node-builtins: ^2.0.0 + rollup-plugin-polyfill-node: ^0.10.2 + svelte: ^3.53.1 + svelte-check: ^2.8.0 + svelte-heros-v2: ^0.3.10 + svelte-i18n: ^3.5.1 + svelte-jester: ^2.1.5 + svelte-loader: ^3.1.2 + svelte-preprocess: ^4.10.7 + svelte-spa-router: ^3.2.0 + tailwindcss: ^3.2.4 + theme-change: ^2.2.0 + ts-jest: ^27.0.7 + ts-jest-mock-import-meta: ^0.12.0 + ts-loader: ^9.2.6 + tslib: ^2.4.0 + typescript: ^4.6.4 + vite: ^3.0.0 + vite-plugin-static-copy: ^0.12.0 + dependencies: + '@coinbase/wallet-sdk': 3.6.3_@babel+core@7.20.2 + '@ethersproject/experimental': 5.7.0 + '@lottiefiles/svelte-lottie-player': 0.2.0 + '@sveltestack/svelte-query': 1.6.0 + '@wagmi/connectors': 0.1.1_igzkohdkbvuxwssjqsbqwxprka + '@wagmi/core': 0.8.4_3yqrazoypcxohxu3uqfcqjka5u + axios: 1.2.0 + buffer: 6.0.3 + ethers: 5.7.2 + extend-expect: link:@testing-library/jest-dom/extend-expect + identicon.js: 2.3.3 + svelte-i18n: 3.5.2_svelte@3.53.1 + svelte-spa-router: 3.3.0 + devDependencies: + '@babel/preset-env': 7.20.2_@babel+core@7.20.2 + '@sveltejs/vite-plugin-svelte': 1.3.1_svelte@3.53.1+vite@3.2.4 + '@tsconfig/svelte': 3.0.0 + '@types/eslint': 8.4.10 + '@types/estree': 0.0.50 + '@types/jest': 27.5.2 + '@types/mixpanel': 2.14.4 + '@types/sanitize-html': 2.6.2 + '@typescript-eslint/eslint-plugin': 5.44.0_e2lvjb2eg2mgv3h5oqf6kw3to4 + '@typescript-eslint/parser': 5.44.0_77fvizpdb3y4icyeo2mf4eo7em + '@zerodevx/svelte-toast': 0.6.3 + autoprefixer: 10.4.13_postcss@8.4.19 + babel-jest: 27.5.1_@babel+core@7.20.2 + babel-plugin-transform-es2015-modules-commonjs: 6.26.2 + daisyui: 1.16.6 + jest: 27.5.1 + node-sass: 7.0.3 + postcss: 8.4.19 + postcss-cli: 7.1.2 + postcss-loader: 6.2.1_upg3rk2kpasnbk27hkqapxaxfq + prettier: 2.7.1 + rollup-plugin-node-builtins: 2.1.2 + rollup-plugin-polyfill-node: 0.10.2_rollup@2.79.1 + svelte: 3.53.1 + svelte-check: 2.9.2_abcb4yglsprjylcfcbep3tcqgq + svelte-heros-v2: 0.3.10 + svelte-jester: 2.3.2_jest@27.5.1+svelte@3.53.1 + svelte-loader: 3.1.4_svelte@3.53.1 + svelte-preprocess: 4.10.7_axwq5llc4jwkf7awicvy3hu32q + tailwindcss: 3.2.4_postcss@8.4.19 + theme-change: 2.2.0 + ts-jest: 27.1.5_hf2lt5tikeukj66wl5cvus5z2u + ts-jest-mock-import-meta: 0.12.0_ts-jest@27.1.5 + ts-loader: 9.4.1_vfotqvx6lgcbf3upbs6hgaza4q + tslib: 2.4.1 + typescript: 4.9.3 + vite: 3.2.4 + vite-plugin-static-copy: 0.12.0_vite@3.2.4 + packages/website: specifiers: '@docusaurus/core': 2.2.0 @@ -793,7 +900,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 + '@babel/helper-plugin-utils': 7.20.2 '@babel/plugin-syntax-object-rest-spread': 7.8.3_@babel+core@7.12.9 '@babel/plugin-transform-parameters': 7.20.3_@babel+core@7.12.9 @@ -3188,7 +3295,7 @@ packages: '@jest/schemas': 29.0.0 '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 - '@types/node': 17.0.45 + '@types/node': 18.11.9 '@types/yargs': 17.0.14 chalk: 4.1.2 @@ -4277,12 +4384,12 @@ packages: resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} dependencies: '@types/connect': 3.4.35 - '@types/node': 17.0.45 + '@types/node': 18.11.9 /@types/bonjour/3.5.10: resolution: {integrity: sha512-p7ienRMiS41Nu2/igbJxxLDWrSZ0WxM8UQgCeO9KhoVF7cOVFkrKsiDr1EsJIla8vV3oEEjGcz11jc5yimhzZw==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.11.9 /@types/cacheable-request/6.0.3: resolution: {integrity: sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==} @@ -4301,14 +4408,14 @@ packages: /@types/concat-stream/1.6.1: resolution: {integrity: sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.11.9 dev: true /@types/connect-history-api-fallback/1.3.5: resolution: {integrity: sha512-h8QJa8xSb1WD4fpKBDcATDNGXghFj6/3GRWG6dhmRcu0RX1Ubasur2Uvx5aeEwlf0MwblEC2bMzzMQntxnw/Cw==} dependencies: '@types/express-serve-static-core': 4.17.31 - '@types/node': 12.20.55 + '@types/node': 18.11.9 /@types/connect/3.4.35: resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} @@ -4341,7 +4448,7 @@ packages: /@types/express-serve-static-core/4.17.31: resolution: {integrity: sha512-DxMhY+NAsTwMMFHBTtJFNp5qiHKJ7TeqOo23zVEM9alT1Ml27Q3xcTH0xwxn7Q0BbMcVEJOs/7aQtUWupUQN3Q==} dependencies: - '@types/node': 17.0.45 + '@types/node': 18.11.9 '@types/qs': 6.9.7 '@types/range-parser': 1.2.4 @@ -4356,14 +4463,14 @@ packages: /@types/form-data/0.0.33: resolution: {integrity: sha512-8BSvG1kGm83cyJITQMZSulnl6QV8jqAGreJsc5tPu1Jq0vTSOiY/k24Wx82JRpWwZSqrala6sd5rWi6aNXvqcw==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.11.9 dev: true /@types/glob/7.2.0: resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} dependencies: '@types/minimatch': 5.1.2 - '@types/node': 12.20.55 + '@types/node': 18.11.9 dev: true /@types/graceful-fs/4.1.5: @@ -4391,7 +4498,7 @@ packages: /@types/http-proxy/1.17.9: resolution: {integrity: sha512-QsbSjA/fSk7xB+UXlCT3wHBy5ai9wOcNDWwZAtud+jXhwOM3l+EYZh8Lng4+/6n8uar0J7xILzqftJdJ/Wdfkw==} dependencies: - '@types/node': 17.0.45 + '@types/node': 18.11.9 /@types/istanbul-lib-coverage/2.0.4: resolution: {integrity: sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==} @@ -4468,7 +4575,7 @@ packages: /@types/mkdirp/0.5.2: resolution: {integrity: sha512-U5icWpv7YnZYGsN4/cmh3WD2onMY0aJIiTE6+51TwJCttdHvtCYmkBNOobHlXwrJRL0nkH9jH4kD+1FAdMN4Tg==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.11.9 dev: true /@types/mocha/9.1.1: @@ -4478,7 +4585,7 @@ packages: /@types/node-fetch/2.6.2: resolution: {integrity: sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.11.9 form-data: 3.0.1 dev: true @@ -4491,6 +4598,7 @@ packages: /@types/node/17.0.45: resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==} + dev: false /@types/node/18.11.9: resolution: {integrity: sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==} @@ -4561,7 +4669,7 @@ packages: /@types/resolve/0.0.8: resolution: {integrity: sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.11.9 dev: true /@types/responselike/1.0.0: @@ -4587,7 +4695,7 @@ packages: /@types/sax/1.2.4: resolution: {integrity: sha512-pSAff4IAxJjfAXUG6tFkO7dsSbTmf8CtUpfhhZ5VhkRpC4628tJhh3+V6H1E+/Gs9piSzYKT5yzHO5M4GG9jkw==} dependencies: - '@types/node': 17.0.45 + '@types/node': 18.11.9 dev: false /@types/scheduler/0.16.2: @@ -4611,7 +4719,7 @@ packages: resolution: {integrity: sha512-z5xyF6uh8CbjAu9760KDKsH2FcDxZ2tFCsA4HIMWE6IkiYMXfVoa+4f9KX+FN0ZLsaMw1WNG2ETLA6N+/YA+cg==} dependencies: '@types/mime': 3.0.1 - '@types/node': 12.20.55 + '@types/node': 18.11.9 /@types/sinon-chai/3.2.9: resolution: {integrity: sha512-/19t63pFYU0ikrdbXKBWj9PCdnKyTd0Qkz0X91Ta081cYsq90OxYdcWwK/dwEoDa6dtXgj2HJfmzgq+QZTHdmQ==} @@ -4633,7 +4741,7 @@ packages: /@types/sockjs/0.3.33: resolution: {integrity: sha512-f0KEEe05NvUnat+boPTZ0dgaLZ4SfSouXUgv5noUiefG2ajgKjmETo9ZJyuqsl7dfl2aHlLJUiki6B4ZYldiiw==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.11.9 /@types/stack-utils/2.0.1: resolution: {integrity: sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==} @@ -4662,7 +4770,7 @@ packages: /@types/ws/8.5.3: resolution: {integrity: sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.11.9 /@types/yargs-parser/21.0.0: resolution: {integrity: sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==} @@ -5965,7 +6073,7 @@ packages: /async/2.6.2: resolution: {integrity: sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==} dependencies: - lodash: 4.17.20 + lodash: 4.17.21 dev: true /async/2.6.4: @@ -6064,7 +6172,7 @@ packages: convert-source-map: 1.9.0 debug: 2.6.9 json5: 0.5.1 - lodash: 4.17.20 + lodash: 4.17.21 minimatch: 3.1.2 path-is-absolute: 1.0.1 private: 0.1.8 @@ -6082,7 +6190,7 @@ packages: babel-types: 6.26.0 detect-indent: 4.0.0 jsesc: 1.3.0 - lodash: 4.17.20 + lodash: 4.17.21 source-map: 0.5.7 trim-right: 1.0.1 dev: true @@ -6114,7 +6222,7 @@ packages: babel-helper-function-name: 6.24.1 babel-runtime: 6.26.0 babel-types: 6.26.0 - lodash: 4.17.20 + lodash: 4.17.21 transitivePeerDependencies: - supports-color dev: true @@ -6167,7 +6275,7 @@ packages: dependencies: babel-runtime: 6.26.0 babel-types: 6.26.0 - lodash: 4.17.20 + lodash: 4.17.21 dev: true /babel-helper-remap-async-to-generator/6.24.1: @@ -6365,7 +6473,7 @@ packages: babel-template: 6.26.0 babel-traverse: 6.26.0 babel-types: 6.26.0 - lodash: 4.17.20 + lodash: 4.17.21 transitivePeerDependencies: - supports-color dev: true @@ -6632,7 +6740,7 @@ packages: babel-runtime: 6.26.0 core-js: 2.6.12 home-or-tmp: 2.0.0 - lodash: 4.17.20 + lodash: 4.17.21 mkdirp: 0.5.6 source-map-support: 0.4.18 transitivePeerDependencies: @@ -10384,7 +10492,7 @@ packages: resolution: {integrity: sha512-EzV94NYKoO09GLXGjXj9JIlXijVck4ONSr5wiCWDvhsvj5jxSrzTmRU/9C1DyB6uToszLs8aifA6NQ7lEQdvFw==} engines: {node: '>= 0.8'} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.11.9 require-like: 0.1.2 /event-emitter/0.3.5: @@ -11139,7 +11247,7 @@ packages: signal-exit: 3.0.7 string-width: 4.2.3 strip-ansi: 6.0.1 - wide-align: 1.1.3 + wide-align: 1.1.5 dev: true /gauge/4.0.4: @@ -13261,7 +13369,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.3.1 - '@types/node': 17.0.45 + '@types/node': 18.11.9 chalk: 4.1.2 ci-info: 3.6.2 graceful-fs: 4.2.10 @@ -13304,7 +13412,7 @@ packages: resolution: {integrity: sha512-lY4AnnmsEWeiXirAIA0c9SDPbuCBq8IYuDVL8PMm0MZ2PEs2yPvRA/J64QBXuZp7CYKrDM/rmNrc9/i3KJQncw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.11.9 jest-util: 29.3.1 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -13818,7 +13926,7 @@ packages: /level-post/1.0.7: resolution: {integrity: sha512-PWYqG4Q00asOrLhX7BejSajByB4EmG2GaKHfj3h5UmmZ2duciXLPGYWIjBzLECFWUGOZWlm5B20h/n3Gs3HKew==} dependencies: - ltgt: 2.1.3 + ltgt: 2.2.1 dev: true /level-sublevel/5.2.3: @@ -18272,6 +18380,7 @@ packages: /sourcemap-codec/1.4.8: resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==} + deprecated: Please use @jridgewell/sourcemap-codec instead dev: true /space-separated-tokens/1.1.5: