Skip to content

Commit

Permalink
Merge pull request #89 from reown-com/custom-chains
Browse files Browse the repository at this point in the history
Docs update: Making grammar fixes and minor changes to custom chains and Wagmi implementation docs
  • Loading branch information
rohit-710 authored Oct 10, 2024
2 parents d083d7c + cba7559 commit 7c565a2
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 40 deletions.
15 changes: 8 additions & 7 deletions docs/appkit/javascript/core/custom-networks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,24 @@ title: Custom networks

# Custom networks

If you cannot find the network you are looking for within the `@reown/appkit/networks` path, you can always add your own network.
If you cannot find the network you are looking for within the `@reown/appkit/networks` path, you can always add a custom network.

Since AppKit v1.1.0, we have two ways to add your network to the AppKit:
Since AppKit v1.1.0, there are two ways to add your network to AppKit:

### 1. Adding Your Chain to Viem’s Directory (Recommended)

We are using Viem for providing EVM chains to the users under the hood. If your chain is for EVM. We recommend you to open a PR to Viem to add your network to Viem's directory. Once your chain is accepted to Viem, it'll be available on AppKit. No new steps required.
Reown AppKit use Viem to provide EVM chains to users under the hood. If your chain is EVM-compatible, it is recommended to open a PR to Viem to add your network to Viems directory. Once your chain is accepted by Viem, it will automatically be available in AppKit with no additional steps required.

Here is the documentation of how to add new chian to Viem: https://github.com/wevm/viem/blob/main/.github/CONTRIBUTING.md#chains
**Here is the documentation of how to add new chain to Viem:**
https://github.com/wevm/viem/blob/main/.github/CONTRIBUTING.md#chains

### 2. Creating Custom Chain Object
### 2. Creating a Custom Chain Object

You can also create a custom network object without waiting for approval from Viem’s repository.

**Required Information**

You should have the following values to create a custom network:
You will need the following values to create a custom network:

- **id**: Chain ID of the network.
- **name**: Name of the network.
Expand Down Expand Up @@ -54,7 +55,7 @@ const customNetwork = defineChain({
default: { name: 'Explorer', url: 'BLOCK_EXPLORER_URL' },
},
contracts: {
// Add contracts here
// Add the contracts here
}
})

Expand Down
6 changes: 3 additions & 3 deletions docs/appkit/javascript/wagmi/about/implementation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ openNetworkModalBtn.addEventListener('click', () => modal.open({ view: 'Networks

## Importing networks

We are using [Viem](https://viem.sh/) networks under the hood which provides wide variety of networks for EVM chains. You can find every network that Viem is supporting within the `@reown/appkit/networks` path.
Reown AppKit use [Viem](https://viem.sh/) networks under the hood, which provide a wide variety of networks for EVM chains. You can find all the networks supported by Viem within the `@reown/appkit/networks` path.

```js
import { createAppKit } from '@reown/appkit'
/* highlight-add-start */
import { mainnet, arbitrum, base, base, polygon } from '@reown/appkit/networks'
import { mainnet, arbitrum, base, scroll, polygon } from '@reown/appkit/networks'
/* highlight-add-end */
```

:::info
Looking for adding a custom network? Check out the [custom networks](../../core/custom-networks.mdx) section.
Looking to add a custom network? Check out the [custom networks](../../core/custom-networks.mdx) section.
:::
15 changes: 8 additions & 7 deletions docs/appkit/next/core/custom-networks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,24 @@ title: Custom networks

# Custom networks

If you cannot find the network you are looking for within the `@reown/appkit/networks` path, you can always add your own network.
If you cannot find the network you are looking for within the `@reown/appkit/networks` path, you can always add a custom network.

Since AppKit v1.1.0, we have two ways to add your network to the AppKit:
Since AppKit v1.1.0, there are two ways to add your network to AppKit:

### 1. Adding Your Chain to Viem’s Directory (Recommended)

We are using Viem for providing EVM chains to the users under the hood. If your chain is for EVM. We recommend you to open a PR to Viem to add your network to Viem's directory. Once your chain is accepted to Viem, it'll be available on AppKit. No new steps required.
Reown AppKit use Viem to provide EVM chains to users under the hood. If your chain is EVM-compatible, it is recommended to open a PR to Viem to add your network to Viems directory. Once your chain is accepted by Viem, it will automatically be available in AppKit with no additional steps required.

Here is the documentation of how to add new chian to Viem: https://github.com/wevm/viem/blob/main/.github/CONTRIBUTING.md#chains
**Here is the documentation of how to add new chain to Viem:**
https://github.com/wevm/viem/blob/main/.github/CONTRIBUTING.md#chains

### 2. Creating Custom Chain Object
### 2. Creating a Custom Chain Object

You can also create a custom network object without waiting for approval from Viem’s repository.

**Required Information**

You should have the following values to create a custom network:
You will need the following values to create a custom network:

- **id**: Chain ID of the network.
- **name**: Name of the network.
Expand Down Expand Up @@ -54,7 +55,7 @@ const customNetwork = defineChain({
default: { name: 'Explorer', url: 'BLOCK_EXPLORER_URL' },
},
contracts: {
// Add contracts here
// Add the contracts here
}
})

Expand Down
6 changes: 3 additions & 3 deletions docs/appkit/next/wagmi/about/implementation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@ export const config = wagmiAdapter.wagmiConfig

## Importing networks

We are using [Viem](https://viem.sh/) networks under the hood which provides wide variety of networks for EVM chains. You can find every network that Viem is supporting within the `@reown/appkit/networks` path.
Reown AppKit use [Viem](https://viem.sh/) networks under the hood, which provide a wide variety of networks for EVM chains. You can find all the networks supported by Viem within the `@reown/appkit/networks` path.

```js
import { createAppKit } from '@reown/appkit'
/* highlight-add-start */
import { mainnet, arbitrum, base, base, polygon } from '@reown/appkit/networks'
import { mainnet, arbitrum, base, scroll, polygon } from '@reown/appkit/networks'
/* highlight-add-end */
```

:::info
Looking for adding a custom network? Check out the [custom networks](../../core/custom-networks.mdx) section.
Looking to add a custom network? Check out the [custom networks](../../core/custom-networks.mdx) section.
:::

## SSR and Hydration
Expand Down
15 changes: 8 additions & 7 deletions docs/appkit/react/core/custom-networks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,24 @@ title: Custom networks

# Custom networks

If you cannot find the network you are looking for within the `@reown/appkit/networks` path, you can always add your own network.
If you cannot find the network you are looking for within the `@reown/appkit/networks` path, you can always add a custom network.

Since AppKit v1.1.0, we have two ways to add your network to the AppKit:
Since AppKit v1.1.0, there are two ways to add your network to AppKit:

### 1. Adding Your Chain to Viem’s Directory (Recommended)

We are using Viem for providing EVM chains to the users under the hood. If your chain is for EVM. We recommend you to open a PR to Viem to add your network to Viem's directory. Once your chain is accepted to Viem, it'll be available on AppKit. No new steps required.
Reown AppKit use Viem to provide EVM chains to users under the hood. If your chain is EVM-compatible, it is recommended to open a PR to Viem to add your network to Viems directory. Once your chain is accepted by Viem, it will automatically be available in AppKit with no additional steps required.

Here is the documentation of how to add new chian to Viem: https://github.com/wevm/viem/blob/main/.github/CONTRIBUTING.md#chains
**Here is the documentation of how to add new chain to Viem:**
https://github.com/wevm/viem/blob/main/.github/CONTRIBUTING.md#chains

### 2. Creating Custom Chain Object
### 2. Creating a Custom Chain Object

You can also create a custom network object without waiting for approval from Viem’s repository.

**Required Information**

You should have the following values to create a custom network:
You will need the following values to create a custom network:

- **id**: Chain ID of the network.
- **name**: Name of the network.
Expand Down Expand Up @@ -54,7 +55,7 @@ const customNetwork = defineChain({
default: { name: 'Explorer', url: 'BLOCK_EXPLORER_URL' },
},
contracts: {
// Add contracts here
// Add the contracts here
}
})

Expand Down
6 changes: 3 additions & 3 deletions docs/appkit/react/wagmi/about/implementation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ export function AppKitProvider({ children }) {

## Importing networks

We are using [Viem](https://viem.sh/) networks under the hood which provides wide variety of networks for EVM chains. You can find every network that Viem is supporting within the `@reown/appkit/networks` path.
Reown AppKit use [Viem](https://viem.sh/) networks under the hood, which provide a wide variety of networks for EVM chains. You can find all the networks supported by Viem within the `@reown/appkit/networks` path.

```js
import { createAppKit } from '@reown/appkit'
/* highlight-add-start */
import { mainnet, arbitrum, base, base, polygon } from '@reown/appkit/networks'
import { mainnet, arbitrum, base, scroll, polygon } from '@reown/appkit/networks'
/* highlight-add-end */
```

:::info
Looking for adding a custom network? Check out the [custom networks](../../core/custom-networks.mdx) section.
Looking to add a custom network? Check out the [custom networks](../../core/custom-networks.mdx) section.
:::
15 changes: 8 additions & 7 deletions docs/appkit/vue/core/custom-networks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,24 @@ title: Custom networks

# Custom networks

If you cannot find the network you are looking for within the `@reown/appkit/networks` path, you can always add your own network.
If you cannot find the network you are looking for within the `@reown/appkit/networks` path, you can always add a custom network.

Since AppKit v1.1.0, we have two ways to add your network to the AppKit:
Since AppKit v1.1.0, there are two ways to add your network to AppKit:

### 1. Adding Your Chain to Viem’s Directory (Recommended)

We are using Viem for providing EVM chains to the users under the hood. If your chain is for EVM. We recommend you to open a PR to Viem to add your network to Viem's directory. Once your chain is accepted to Viem, it'll be available on AppKit. No new steps required.
Reown AppKit use Viem to provide EVM chains to users under the hood. If your chain is EVM-compatible, it is recommended to open a PR to Viem to add your network to Viems directory. Once your chain is accepted by Viem, it will automatically be available in AppKit with no additional steps required.

Here is the documentation of how to add new chian to Viem: https://github.com/wevm/viem/blob/main/.github/CONTRIBUTING.md#chains
**Here is the documentation of how to add new chain to Viem:**
https://github.com/wevm/viem/blob/main/.github/CONTRIBUTING.md#chains

### 2. Creating Custom Chain Object
### 2. Creating a Custom Chain Object

You can also create a custom network object without waiting for approval from Viem’s repository.

**Required Information**

You should have the following values to create a custom network:
You will need the following values to create a custom network:

- **id**: Chain ID of the network.
- **name**: Name of the network.
Expand Down Expand Up @@ -54,7 +55,7 @@ const customNetwork = defineChain({
default: { name: 'Explorer', url: 'BLOCK_EXPLORER_URL' },
},
contracts: {
// Add contracts here
// Add the contracts here
}
})

Expand Down
6 changes: 3 additions & 3 deletions docs/appkit/vue/wagmi/about/implementation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ In your `App.vue` file set up the following configuration

## Importing networks

We are using [Viem](https://viem.sh/) networks under the hood which provides wide variety of networks for EVM chains. You can find every network that Viem is supporting within the `@reown/appkit/networks` path.
Reown AppKit use [Viem](https://viem.sh/) networks under the hood, which provide a wide variety of networks for EVM chains. You can find all the networks supported by Viem within the `@reown/appkit/networks` path.

```js
import { createAppKit } from '@reown/appkit'
/* highlight-add-start */
import { mainnet, arbitrum, base, base, polygon } from '@reown/appkit/networks'
import { mainnet, arbitrum, base, scroll, polygon } from '@reown/appkit/networks'
/* highlight-add-end */
```

:::info
Looking for adding a custom network? Check out the [custom networks](../../core/custom-networks.mdx) section.
Looking to add a custom network? Check out the [custom networks](../../core/custom-networks.mdx) section.
:::

0 comments on commit 7c565a2

Please sign in to comment.