From f687df68be35de271e911f39cddf70abe58ec1f8 Mon Sep 17 00:00:00 2001 From: Oleksii Kosynskyi Date: Wed, 29 May 2024 16:07:06 -0400 Subject: [PATCH 1/2] Use .snyk file for all projects (#7071) --- docs/.snyk | 36 ++++++++++++++++++++ packages/web3/.snyk | 21 ++++++++++++ .snyk => tools/eslint-config-base-web3/.snyk | 12 +------ 3 files changed, 58 insertions(+), 11 deletions(-) create mode 100644 docs/.snyk create mode 100644 packages/web3/.snyk rename .snyk => tools/eslint-config-base-web3/.snyk (78%) diff --git a/docs/.snyk b/docs/.snyk new file mode 100644 index 00000000000..b29b615196e --- /dev/null +++ b/docs/.snyk @@ -0,0 +1,36 @@ +# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities. +version: v1.25.0 +# ignores vulnerabilities until expiry date; change duration by modifying expiry date +ignore: + SNYK-JS-BRACES-6838727: + - '*': + reason: Docusaurus issue + expires: 3024-06-26T17:29:07.153Z + created: 2024-05-27T17:29:07.159Z + SNYK-JS-EXPRESS-6474509: + - '*': + reason: Docusaurus issue + expires: 3024-06-26T17:29:31.142Z + created: 2024-05-27T17:29:31.149Z + SNYK-JS-INFLIGHT-6095116: + - '*': + reason: Docusaurus issue + expires: 3024-06-26T17:29:51.622Z + created: 2024-05-27T17:29:51.628Z + SNYK-JS-MICROMATCH-6838728: + - '*': + reason: Docusaurus issue + expires: 3024-06-26T17:30:47.237Z + created: 2024-05-27T17:30:47.240Z + SNYK-JS-SERIALIZEJAVASCRIPT-6147607: + - '*': + reason: Docusaurus issue + expires: 3024-06-26T17:31:06.652Z + created: 2024-05-27T17:31:06.656Z + SNYK-JS-WEBPACKDEVMIDDLEWARE-6476555: + - '*': + reason: Docusaurus issue + expires: 3024-06-26T20:52:00.793Z + created: 2024-05-27T20:52:00.797Z + +patch: {} diff --git a/packages/web3/.snyk b/packages/web3/.snyk new file mode 100644 index 00000000000..5b289bc1640 --- /dev/null +++ b/packages/web3/.snyk @@ -0,0 +1,21 @@ +# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities. +version: v1.25.0 +# ignores vulnerabilities until expiry date; change duration by modifying expiry date +ignore: + SNYK-JS-WEB3-174533: + - '*': + reason: Ignore test issue + expires: 3024-06-26T17:16:53.075Z + created: 2024-05-27T17:16:53.080Z + SNYK-JS-JSON5-3182856: + - '*': + reason: Eslint problem + expires: 3024-06-26T20:53:53.640Z + created: 2024-05-27T20:53:53.644Z + SNYK-JS-SEMVER-3247795: + - '*': + reason: Eslint problem + expires: 3024-06-26T20:54:20.755Z + created: 2024-05-27T20:54:20.759Z + +patch: {} diff --git a/.snyk b/tools/eslint-config-base-web3/.snyk similarity index 78% rename from .snyk rename to tools/eslint-config-base-web3/.snyk index cb9591ea045..f0ce4e19c9c 100644 --- a/.snyk +++ b/tools/eslint-config-base-web3/.snyk @@ -2,11 +2,6 @@ version: v1.25.0 # ignores vulnerabilities until expiry date; change duration by modifying expiry date ignore: - SNYK-JS-WEB3-174533: - - '*': - reason: Ignore test issue - expires: 3024-06-26T17:16:53.075Z - created: 2024-05-27T17:16:53.080Z SNYK-JS-BRACES-6838727: - '*': reason: Docusaurus issue @@ -24,14 +19,9 @@ ignore: created: 2024-05-27T17:29:51.628Z SNYK-JS-MICROMATCH-6838728: - '*': - reason: Docusaurus issue + reason: Eslint issue expires: 3024-06-26T17:30:47.237Z created: 2024-05-27T17:30:47.240Z - SNYK-JS-SERIALIZEJAVASCRIPT-6147607: - - '*': - reason: Docusaurus issue - expires: 3024-06-26T17:31:06.652Z - created: 2024-05-27T17:31:06.656Z SNYK-JS-WEBPACKDEVMIDDLEWARE-6476555: - '*': reason: Docusaurus issue From b63af9f10c57b9b0dfc920f664ea3123b9ed1c06 Mon Sep 17 00:00:00 2001 From: Dan Forbes Date: Thu, 30 May 2024 06:11:17 -0700 Subject: [PATCH 2/2] fix(docs): sidebar (#7063) * Move MetaMask guide to Accounts section * Reorganize sidebar * Fix broken link --- docs/docs/guides/advanced/_category_.yml | 2 +- docs/docs/guides/events_subscriptions/_category_.yml | 2 +- docs/docs/guides/feedback/index.md | 2 +- docs/docs/guides/hardhat_tutorial/_category_.yml | 2 +- docs/docs/guides/migration_from_other_libs/_category_.yml | 2 +- docs/docs/guides/resources_and_troubleshooting/index.md | 2 +- docs/docs/guides/smart_contracts/_category_.yml | 2 +- docs/docs/guides/wagmi_usage/_category_.yml | 2 +- docs/docs/guides/wallet/_category_.yml | 2 +- docs/docs/guides/{getting_started => wallet}/metamask.md | 2 +- docs/docs/guides/wallet/node_wallet.md | 2 +- docs/docs/guides/wallet/signing.md | 2 +- docs/docs/guides/wallet/transactions.md | 2 +- .../guides/{ => wallet}/web3_modal_guide/_category_.yml | 2 +- docs/docs/guides/{ => wallet}/web3_modal_guide/index.mdx | 8 ++++---- docs/docs/guides/{ => wallet}/web3_modal_guide/vue.md | 0 docs/docs/guides/web3_config/_category_.yml | 2 +- docs/docs/guides/web3_plugin_guide/_category_.yml | 2 +- docs/docs/guides/web3_providers_guide/_category_.yml | 2 +- docs/docs/guides/web3_upgrade_guide/_category_.yml | 2 +- 20 files changed, 22 insertions(+), 22 deletions(-) rename docs/docs/guides/{getting_started => wallet}/metamask.md (99%) rename docs/docs/guides/{ => wallet}/web3_modal_guide/_category_.yml (87%) rename docs/docs/guides/{ => wallet}/web3_modal_guide/index.mdx (97%) rename docs/docs/guides/{ => wallet}/web3_modal_guide/vue.md (100%) diff --git a/docs/docs/guides/advanced/_category_.yml b/docs/docs/guides/advanced/_category_.yml index 3131878f18e..c6ab4f48016 100644 --- a/docs/docs/guides/advanced/_category_.yml +++ b/docs/docs/guides/advanced/_category_.yml @@ -2,4 +2,4 @@ label: '🧠 Advanced' collapsible: true collapsed: true link: null -position: 15 \ No newline at end of file +position: 11 diff --git a/docs/docs/guides/events_subscriptions/_category_.yml b/docs/docs/guides/events_subscriptions/_category_.yml index 2f13d5222b4..9207b5b28c2 100644 --- a/docs/docs/guides/events_subscriptions/_category_.yml +++ b/docs/docs/guides/events_subscriptions/_category_.yml @@ -2,4 +2,4 @@ label: '🔔 Events subscription' collapsible: true collapsed: true link: null -position: 7 \ No newline at end of file +position: 5 diff --git a/docs/docs/guides/feedback/index.md b/docs/docs/guides/feedback/index.md index 0118436ec91..228003d5a6e 100644 --- a/docs/docs/guides/feedback/index.md +++ b/docs/docs/guides/feedback/index.md @@ -1,5 +1,5 @@ --- -sidebar_position: 18 +sidebar_position: 17 sidebar_label: '🗣️ Feedback' --- diff --git a/docs/docs/guides/hardhat_tutorial/_category_.yml b/docs/docs/guides/hardhat_tutorial/_category_.yml index 191ad0faa29..8493ca97d6e 100644 --- a/docs/docs/guides/hardhat_tutorial/_category_.yml +++ b/docs/docs/guides/hardhat_tutorial/_category_.yml @@ -2,4 +2,4 @@ label: '⛑️ Hardhat Tutorial' collapsible: true collapsed: true link: null -position: 3 +position: 6 diff --git a/docs/docs/guides/migration_from_other_libs/_category_.yml b/docs/docs/guides/migration_from_other_libs/_category_.yml index 665581166bc..59fb5de8cdc 100644 --- a/docs/docs/guides/migration_from_other_libs/_category_.yml +++ b/docs/docs/guides/migration_from_other_libs/_category_.yml @@ -2,4 +2,4 @@ label: '🔄 Migration Guides' collapsible: true collapsed: true link: null -position: 12 \ No newline at end of file +position: 15 diff --git a/docs/docs/guides/resources_and_troubleshooting/index.md b/docs/docs/guides/resources_and_troubleshooting/index.md index 6426b99d8df..2dd82f1e5b6 100644 --- a/docs/docs/guides/resources_and_troubleshooting/index.md +++ b/docs/docs/guides/resources_and_troubleshooting/index.md @@ -1,5 +1,5 @@ --- -sidebar_position: 17 +sidebar_position: 16 sidebar_label: '📚 Resources & Troubleshooting' --- # Resources & Troubleshooting diff --git a/docs/docs/guides/smart_contracts/_category_.yml b/docs/docs/guides/smart_contracts/_category_.yml index fcbba9574a5..8a1d21c75b4 100644 --- a/docs/docs/guides/smart_contracts/_category_.yml +++ b/docs/docs/guides/smart_contracts/_category_.yml @@ -2,4 +2,4 @@ label: '📜 Smart Contracts' collapsible: true collapsed: true link: null -position: 6 \ No newline at end of file +position: 4 diff --git a/docs/docs/guides/wagmi_usage/_category_.yml b/docs/docs/guides/wagmi_usage/_category_.yml index 90b55da4312..ee90c923e38 100644 --- a/docs/docs/guides/wagmi_usage/_category_.yml +++ b/docs/docs/guides/wagmi_usage/_category_.yml @@ -2,4 +2,4 @@ label: '🔄 Wagmi usage' collapsible: true collapsed: true link: null -position: 13 +position: 14 diff --git a/docs/docs/guides/wallet/_category_.yml b/docs/docs/guides/wallet/_category_.yml index 6b079975e01..dde0bddd9ed 100644 --- a/docs/docs/guides/wallet/_category_.yml +++ b/docs/docs/guides/wallet/_category_.yml @@ -2,4 +2,4 @@ label: '🔑 Wallet and Accounts ' collapsible: true collapsed: true link: null -position: 5 \ No newline at end of file +position: 3 diff --git a/docs/docs/guides/getting_started/metamask.md b/docs/docs/guides/wallet/metamask.md similarity index 99% rename from docs/docs/guides/getting_started/metamask.md rename to docs/docs/guides/wallet/metamask.md index e40db544ac6..888f5890b1a 100644 --- a/docs/docs/guides/getting_started/metamask.md +++ b/docs/docs/guides/wallet/metamask.md @@ -1,6 +1,6 @@ --- sidebar_position: 4 -sidebar_label: Connecting to Metamask +sidebar_label: 'Tutorial: Connecting to Metamask' --- # Connecting to Metamask diff --git a/docs/docs/guides/wallet/node_wallet.md b/docs/docs/guides/wallet/node_wallet.md index a4adbbab987..7b70ed655a3 100644 --- a/docs/docs/guides/wallet/node_wallet.md +++ b/docs/docs/guides/wallet/node_wallet.md @@ -1,5 +1,5 @@ --- -sidebar_position: 6 +sidebar_position: 8 sidebar_label: 'Tutorial: Node Wallet' --- diff --git a/docs/docs/guides/wallet/signing.md b/docs/docs/guides/wallet/signing.md index 88184c2a7fa..54b3779cd17 100644 --- a/docs/docs/guides/wallet/signing.md +++ b/docs/docs/guides/wallet/signing.md @@ -1,5 +1,5 @@ --- -sidebar_position: 4 +sidebar_position: 6 sidebar_label: 'Tutorial: Signing operations' --- diff --git a/docs/docs/guides/wallet/transactions.md b/docs/docs/guides/wallet/transactions.md index 5129c5057a4..c86da4c9113 100644 --- a/docs/docs/guides/wallet/transactions.md +++ b/docs/docs/guides/wallet/transactions.md @@ -1,5 +1,5 @@ --- -sidebar_position: 5 +sidebar_position: 7 sidebar_label: 'Tutorial: Sending Transactions' --- diff --git a/docs/docs/guides/web3_modal_guide/_category_.yml b/docs/docs/guides/wallet/web3_modal_guide/_category_.yml similarity index 87% rename from docs/docs/guides/web3_modal_guide/_category_.yml rename to docs/docs/guides/wallet/web3_modal_guide/_category_.yml index 6744910f3b6..19d6fe3a639 100644 --- a/docs/docs/guides/web3_modal_guide/_category_.yml +++ b/docs/docs/guides/wallet/web3_modal_guide/_category_.yml @@ -2,4 +2,4 @@ label: '📱 WalletConnect Tutorial' collapsible: true collapsed: true link: null -position: 14 \ No newline at end of file +position: 5 diff --git a/docs/docs/guides/web3_modal_guide/index.mdx b/docs/docs/guides/wallet/web3_modal_guide/index.mdx similarity index 97% rename from docs/docs/guides/web3_modal_guide/index.mdx rename to docs/docs/guides/wallet/web3_modal_guide/index.mdx index a1bef97eb66..2d8b878196f 100644 --- a/docs/docs/guides/web3_modal_guide/index.mdx +++ b/docs/docs/guides/wallet/web3_modal_guide/index.mdx @@ -104,8 +104,8 @@ const USDTAddress = '0xdac17f958d2ee523a2206206994597c13d831ec7'; function Components() { const { isConnected } = useWeb3ModalAccount() const { walletProvider } = useWeb3ModalProvider() - const [USDTBalance, setUSDTBalance] = useState(0); - const [smartContractName, setSmartContractName] = useState(''); + const [USDTBalance, setUSDTBalance] = useState(0); + const [smartContractName, setSmartContractName] = useState(''); async function getContractInfo() { if (!isConnected) throw Error('not connected'); @@ -126,5 +126,5 @@ function Components() { ``` :::info -- To learn how to set up Web3modal with vue, click [here](/guides/web3_modal_guide/vue). -::: \ No newline at end of file +- To learn how to set up Web3modal with vue, click [here](/guides/wallet/web3_modal_guide/vue). +::: diff --git a/docs/docs/guides/web3_modal_guide/vue.md b/docs/docs/guides/wallet/web3_modal_guide/vue.md similarity index 100% rename from docs/docs/guides/web3_modal_guide/vue.md rename to docs/docs/guides/wallet/web3_modal_guide/vue.md diff --git a/docs/docs/guides/web3_config/_category_.yml b/docs/docs/guides/web3_config/_category_.yml index d1fd0583848..6070480ec67 100644 --- a/docs/docs/guides/web3_config/_category_.yml +++ b/docs/docs/guides/web3_config/_category_.yml @@ -2,4 +2,4 @@ label: '⚙️ Web3 config' collapsible: true collapsed: true link: null -position: 16 \ No newline at end of file +position: 7 diff --git a/docs/docs/guides/web3_plugin_guide/_category_.yml b/docs/docs/guides/web3_plugin_guide/_category_.yml index 42237f7ea38..8ab333571fd 100644 --- a/docs/docs/guides/web3_plugin_guide/_category_.yml +++ b/docs/docs/guides/web3_plugin_guide/_category_.yml @@ -2,4 +2,4 @@ label: '🛠️ Web3 Plugin 🧩' collapsible: true collapsed: true link: null -position: 2 \ No newline at end of file +position: 12 diff --git a/docs/docs/guides/web3_providers_guide/_category_.yml b/docs/docs/guides/web3_providers_guide/_category_.yml index f426dbedf9a..2af69af2ea3 100644 --- a/docs/docs/guides/web3_providers_guide/_category_.yml +++ b/docs/docs/guides/web3_providers_guide/_category_.yml @@ -2,4 +2,4 @@ label: '🔌 Providers' collapsible: true collapsed: true link: null -position: 4 \ No newline at end of file +position: 2 diff --git a/docs/docs/guides/web3_upgrade_guide/_category_.yml b/docs/docs/guides/web3_upgrade_guide/_category_.yml index aeab3125b26..8335efbea79 100644 --- a/docs/docs/guides/web3_upgrade_guide/_category_.yml +++ b/docs/docs/guides/web3_upgrade_guide/_category_.yml @@ -2,4 +2,4 @@ label: '⬆️ Upgrading' collapsible: true collapsed: true link: null -position: 11 \ No newline at end of file +position: 13