From 6157d58fd2680cb80a94b521a986ed629a17b876 Mon Sep 17 00:00:00 2001 From: Jeroen van den Hout Date: Mon, 25 Sep 2023 14:27:54 +0200 Subject: [PATCH 1/4] Format and lint --- README.md | 3 +- .../getting-started/networks-endpoints.mdx | 78 ++++++++++---- .../0.7/docs/getting-started/quickstart.mdx | 5 +- theme/src/theme/AddToMetaMaskButton/index.tsx | 102 +++++++++--------- tutorials/pages/shimmerevm-setup.mdx | 4 +- tutorials/pages/shimmerevm-testnet-setup.mdx | 17 +-- 6 files changed, 122 insertions(+), 87 deletions(-) diff --git a/README.md b/README.md index 52577d3e41a..ddde8142dcd 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,8 @@ To preview the Wiki locally, use the following steps. For more detailed scripts, 2. Install dependencies with `yarn`. 3. Prepare the environment by running `yarn prepare`, this has to be done only once. 4. Preview the Wiki with `yarn start`, this will start a development server serving the Wiki with hot reload capability, so it will update content after any changes were made. -y + y + #### Pre-configured scripts | Script | Explanation | diff --git a/docs/build/getting-started/networks-endpoints.mdx b/docs/build/getting-started/networks-endpoints.mdx index 8d5a992b2f3..05582ca12dd 100644 --- a/docs/build/getting-started/networks-endpoints.mdx +++ b/docs/build/getting-started/networks-endpoints.mdx @@ -13,7 +13,7 @@ keywords: - Endpoints --- -import {AddToMetaMaskButton, EVMNetworks} from '@theme/AddToMetaMaskButton'; +import { AddToMetaMaskButton, EVMNetworks } from '@theme/AddToMetaMaskButton'; # Networks & Endpoints @@ -40,14 +40,16 @@ token. IOTA Token - Chrysalis - https://chrysalis-nodes.iota.org - , https://chrysalis-nodes.iota.cafe + Chrysalis - wss://chrysalis-nodes.iota.org:443 (MQTT 3.1, /mqtt) + + https://chrysalis-nodes.iota.org + + , https://chrysalis-nodes.iota.cafe + wss://chrysalis-nodes.iota.org:443 (MQTT 3.1, /mqtt) N/A N/A @@ -70,13 +72,15 @@ Mainnet. Shimmer Token - Stardust - https://api.shimmer.network + Stardust - wss://api.shimmer.network:443/api/mqtt/v1 (MQTT 3.1) + + https://api.shimmer.network + + wss://api.shimmer.network:443/api/mqtt/v1 (MQTT 3.1) https://chronicle.shimmer.network @@ -86,7 +90,7 @@ Mainnet. [ShimmerEVM](https://explorer.evm.shimmer.network/) is the L2 EVM running on top of the Shimmer network. - + @@ -100,9 +104,17 @@ Mainnet. - + - +
Shimmer Token ISC / EVMhttps://json-rpc.evm.shimmer.network + + https://json-rpc.evm.shimmer.network + + 148https://explorer.evm.shimmer.network + + https://explorer.evm.shimmer.network + +
@@ -123,16 +135,20 @@ Mainnet. Testnet Tokens (no value) - Stardust - https://api.testnet.shimmer.network + Stardust - wss://api.testnet.shimmer.network:443/api/mqtt/v1 (MQTT 3.1) + + https://api.testnet.shimmer.network + + wss://api.testnet.shimmer.network:443/api/mqtt/v1 (MQTT 3.1) https://chronicle.testnet.shimmer.network - https://faucet.testnet.shimmer.network + + https://faucet.testnet.shimmer.network + @@ -140,7 +156,7 @@ Mainnet. ### Testnet EVM - + [The Testnet EVM](https://explorer.evm.testnet.shimmer.network/) (also called ShimmerEVM Beta) runs as a layer 2 on top of the Public Testnet. This network does not run @@ -161,11 +177,21 @@ layer 1. Testnet Tokens (no value) ISC / EVM - https://json-rpc.evm.testnet.shimmer.network + + https://json-rpc.evm.testnet.shimmer.network + 1072 - https://evm-faucet.testnet.shimmer.network - https://explorer.evm.testnet.shimmer.network + + + https://evm-faucet.testnet.shimmer.network + + + + + https://explorer.evm.testnet.shimmer.network + + @@ -187,15 +213,21 @@ decommissioned once IOTA Mainnet runs under Stardust. Testnet Tokens (no value) - Chrysalis - https://api.lb-0.h.chrysalis-devnet.iota.cafe - , https://https://api.lb-1.h.chrysalis-devnet.iota.cafe + Chrysalis + + + + https://api.lb-0.h.chrysalis-devnet.iota.cafe + + , https://https://api.lb-1.h.chrysalis-devnet.iota.cafe wss://api.lb-0.h.chrysalis-devnet.iota.cafe:443 (MQTT 3.1, /mqtt) https://chronicle.testnet.shimmer.network - https://faucet.testnet.shimmer.network + + https://faucet.testnet.shimmer.network + diff --git a/docs/build/wasp-evm/0.7/docs/getting-started/quickstart.mdx b/docs/build/wasp-evm/0.7/docs/getting-started/quickstart.mdx index 46239f99241..b8c0340f382 100644 --- a/docs/build/wasp-evm/0.7/docs/getting-started/quickstart.mdx +++ b/docs/build/wasp-evm/0.7/docs/getting-started/quickstart.mdx @@ -13,8 +13,7 @@ keywords: - RPC --- - -import {AddToMetaMaskButton, EVMNetworks} from '@theme/AddToMetaMaskButton'; +import { AddToMetaMaskButton, EVMNetworks } from '@theme/AddToMetaMaskButton'; # Public Testnet Quickstart Guide @@ -28,7 +27,7 @@ This guide will help you quickly get started with the [Public Testnet](/build/ne Click this button: - + Please read [this MetaMask guide](./compatible-tools.md#metamask) for a detailed guidance. diff --git a/theme/src/theme/AddToMetaMaskButton/index.tsx b/theme/src/theme/AddToMetaMaskButton/index.tsx index b6d7c73915a..9d9d90372d7 100644 --- a/theme/src/theme/AddToMetaMaskButton/index.tsx +++ b/theme/src/theme/AddToMetaMaskButton/index.tsx @@ -1,69 +1,67 @@ import React from 'react'; -import type {MetaMaskInpageProvider} from '@metamask/providers'; +import type { MetaMaskInpageProvider } from '@metamask/providers'; declare global { - interface Window { - ethereum?: MetaMaskInpageProvider; - } + interface Window { + ethereum?: MetaMaskInpageProvider; + } } export const EVMNetworks = { - "shimmerevm-testnet": { - chainId: '0x430', - chainName: 'ShimmerEVM Testnet', - nativeCurrency: { - name: 'Shimmer', - symbol: 'SMR', - decimals: 18, // Replace with the number of decimals of the native currency - }, - rpcUrls: ['https://json-rpc.evm.testnet.shimmer.network'], - blockExplorerUrls: [ - 'https://explorer.evm.testnet.shimmer.network/', - ], + 'shimmerevm-testnet': { + chainId: '0x430', + chainName: 'ShimmerEVM Testnet', + nativeCurrency: { + name: 'Shimmer', + symbol: 'SMR', + decimals: 18, // Replace with the number of decimals of the native currency }, - "shimmerevm": { - chainId: '0x94', - chainName: 'ShimmerEVM', - nativeCurrency: { - name: 'Shimmer', - symbol: 'SMR', - decimals: 18, // Replace with the number of decimals of the native currency - }, - rpcUrls: ['https://json-rpc.evm.shimmer.network'], - blockExplorerUrls: [ - 'https://explorer.evm.shimmer.network/', - ], - } + rpcUrls: ['https://json-rpc.evm.testnet.shimmer.network'], + blockExplorerUrls: ['https://explorer.evm.testnet.shimmer.network/'], + }, + shimmerevm: { + chainId: '0x94', + chainName: 'ShimmerEVM', + nativeCurrency: { + name: 'Shimmer', + symbol: 'SMR', + decimals: 18, // Replace with the number of decimals of the native currency + }, + rpcUrls: ['https://json-rpc.evm.shimmer.network'], + blockExplorerUrls: ['https://explorer.evm.shimmer.network/'], + }, }; interface MetaMaskButtonProps { - cfg: unknown; + cfg: unknown; } export function AddToMetaMaskButton(props: MetaMaskButtonProps) { - async function addNetwork() { - if (!window.ethereum) { - alert('MetaMask is not installed. Please install MetaMask and try again.'); - return; - } + async function addNetwork() { + if (!window.ethereum) { + alert( + 'MetaMask is not installed. Please install MetaMask and try again.', + ); + return; + } - try { - await window.ethereum.request({ - method: 'wallet_addEthereumChain', - params: [props.cfg], - }); - } catch (error) { - console.error(error); - console.log('Error adding network: ' + error.message); - } + try { + await window.ethereum.request({ + method: 'wallet_addEthereumChain', + params: [props.cfg], + }); + } catch (error) { + console.error(error); + console.log('Error adding network: ' + error.message); } + } - return ( - - ); + return ( + + ); } diff --git a/tutorials/pages/shimmerevm-setup.mdx b/tutorials/pages/shimmerevm-setup.mdx index be5b0c73db8..5ebe1897e96 100644 --- a/tutorials/pages/shimmerevm-setup.mdx +++ b/tutorials/pages/shimmerevm-setup.mdx @@ -1,4 +1,4 @@ -import {AddToMetaMaskButton, EVMNetworks} from '@theme/AddToMetaMaskButton'; +import { AddToMetaMaskButton, EVMNetworks } from '@theme/AddToMetaMaskButton'; # Connect to ShimmerEVM and deploy a Solidity Smart Contract @@ -19,7 +19,7 @@ endpoints [here](/build/networks-endpoints/#shimmerevm). You can either just use the following button to add the ShimmerEVM network to Metamask or enter the information manually. - + To add the ShimmerEVM network manually to your Metamask use following info: diff --git a/tutorials/pages/shimmerevm-testnet-setup.mdx b/tutorials/pages/shimmerevm-testnet-setup.mdx index 5d629cf9515..a0f212bb50a 100644 --- a/tutorials/pages/shimmerevm-testnet-setup.mdx +++ b/tutorials/pages/shimmerevm-testnet-setup.mdx @@ -1,4 +1,4 @@ -import {AddToMetaMaskButton, EVMNetworks} from '@theme/AddToMetaMaskButton'; +import { AddToMetaMaskButton, EVMNetworks } from '@theme/AddToMetaMaskButton'; # Connect to ShimmerEVM Testnet and deploy a Solidity Smart Contract @@ -16,7 +16,7 @@ In this tutorial, we will connect to ShimmerEVM Testnet, connect Metamask to it, You can either just use the following button to add the ShimmerEVM Testnet network to Metamask or enter the information manually. - + To add the ShimmerEVM Testnet network manually to your Metamask use following info: @@ -76,10 +76,15 @@ And voila—it's done! ## Video Tutorial - + :::info Feel free to play around and reach out to us on [discord](https://discord.shimmer.network/) on `#evm-contracts-dev` in case you're facing any issues. From 98cef0e6e02dac573df36d5e4f20312982dc04b7 Mon Sep 17 00:00:00 2001 From: Jeroen van den Hout Date: Mon, 25 Sep 2023 14:34:33 +0200 Subject: [PATCH 2/4] Update README.md Co-authored-by: Dr-Electron --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index ddde8142dcd..56779882af0 100644 --- a/README.md +++ b/README.md @@ -71,8 +71,6 @@ To preview the Wiki locally, use the following steps. For more detailed scripts, 2. Install dependencies with `yarn`. 3. Prepare the environment by running `yarn prepare`, this has to be done only once. 4. Preview the Wiki with `yarn start`, this will start a development server serving the Wiki with hot reload capability, so it will update content after any changes were made. - y - #### Pre-configured scripts | Script | Explanation | From b22e86a5f054b8caccb3686d88eafd19140433f9 Mon Sep 17 00:00:00 2001 From: Jeroen van den Hout Date: Mon, 25 Sep 2023 14:58:50 +0200 Subject: [PATCH 3/4] Formatception --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 56779882af0..e6ec8d024df 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,7 @@ To preview the Wiki locally, use the following steps. For more detailed scripts, 2. Install dependencies with `yarn`. 3. Prepare the environment by running `yarn prepare`, this has to be done only once. 4. Preview the Wiki with `yarn start`, this will start a development server serving the Wiki with hot reload capability, so it will update content after any changes were made. + #### Pre-configured scripts | Script | Explanation | From 0bdea66a2f8f691b9d355baab790ace077c40e98 Mon Sep 17 00:00:00 2001 From: Jeroen van den Hout Date: Mon, 25 Sep 2023 14:55:54 +0200 Subject: [PATCH 4/4] Cancel workflows when PR or ref is updated --- .github/workflows/preview.yml | 4 ++++ .github/workflows/publish.yaml | 5 +++++ .github/workflows/test.yml | 5 +++++ 3 files changed, 14 insertions(+) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 12c51a2954a..5cbcc4d63a1 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -10,6 +10,10 @@ on: issue_comment: types: [created] +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: preview: if: | diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 02006635441..3ffbe5d8658 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -4,6 +4,11 @@ on: pull_request: branches: - main + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: publish: strategy: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2b52621c075..89a2eadc342 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,6 +5,11 @@ on: pull_request: branches: - main + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: consistency: runs-on: ubuntu-latest