Skip to content

Commit 0cd876e

Browse files
Add Unichain support. (#1725)
* Add Unichain support. Signed-off-by: bgravenorst <[email protected]> * Apply suggestions from code review * Update services/reference/unichain/json-rpc-methods/_eth_unichain-call-parameters.mdx * Address reviewer feedback. Signed-off-by: bgravenorst <[email protected]> * Add logo. Signed-off-by: bgravenorst <[email protected]> --------- Signed-off-by: bgravenorst <[email protected]> Co-authored-by: Alexandra Carrillo <[email protected]>
1 parent 20d6464 commit 0cd876e

File tree

91 files changed

+2517
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+2517
-0
lines changed

docs/whats-new.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ of the [MetaMask developer page](https://metamask.io/developer/).
1111

1212
## November 2024
1313

14+
- Documented [Unichain Sepolia](/services/reference/unichain) support. ([#1725](https://github.com/MetaMask/metamask-docs/pull/1725))
1415
- Updated Snaps [Custom UI documentation](/snaps/features/custom-ui/) for MetaMask Extension version 12.6.
1516
([#1715](https://github.com/MetaMask/metamask-docs/pull/1715))
1617
- Added tutorial for

services/get-started/endpoints.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,12 @@ Include your authentication details when [making IPFS requests](/reference/ipfs/
155155
| Mainnet | JSON-RPC over HTTPS | `https://starknet-mainnet.infura.io/v3/<YOUR-API-KEY>` |
156156
| Testnet (Sepolia) | JSON-RPC over HTTPS | `https://starknet-sepolia.infura.io/v3/<YOUR-API-KEY>` |
157157

158+
## Unichain
159+
160+
| Network | Description | URL |
161+
|---------|-------------------------|-------------------------------------------------------|
162+
| Sepolia | JSON-RPC over HTTPS | `https://unichain-sepolia.infura.io/v3/<YOUR-API-KEY>` |
163+
158164
## ZKsync Era
159165

160166
:::info
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
| Network | Description | URL |
2+
|--------------------|-------------------------|---------------------------------------------------------|
3+
| Testnet (Sepolia) | JSON-RPC over HTTPS | `https://unichain-sepolia.infura.io/v3/<YOUR-API-KEY>` |
4+
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
description: Supported Unichain networks
3+
sidebar_position: 3
4+
---
5+
6+
# Supported networks
7+
8+
Use one of these endpoints as your Unichain client provider, and ensure that you replace
9+
`<YOUR-API-KEY>` with an API key from your [dashboard](https://infura.io/dashboard).
10+
11+
:::note
12+
Unichain mainnet hasn't been launched yet.
13+
:::
14+
15+
import UnichainNetworks from "./_unichain-networks.mdx";
16+
17+
<UnichainNetworks />
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
description: Unichain network information.
3+
---
4+
5+
import CardList from '@site/src/components/CardList'
6+
7+
# Unichain
8+
9+
:::note Decentralized Infrastructure Network (DIN)
10+
11+
Unichain testnet is supported through the [DIN](https://www.infura.io/solutions/decentralized-infrastructure-service) service,
12+
meaning calls to the network are routed to [partner infrastructure providers](#partners-and-privacy-policies).
13+
14+
Infura provides Open Beta access to Unichain testnet. During this period, there might be feature limitations.
15+
Performance issues aren't expected, but they're possible as we optimize and stabilize the service.
16+
17+
:::
18+
19+
Unichain is a layer-2 Optimistic Rollup for Ethereum that's designed to be fast, decentralized, and
20+
optimized for DeFi applications.
21+
22+
This allows Unichain to scale the experience of Ethereum, ensuring cheaper and more accessible data while
23+
maintaining the robust security inherent to Ethereum.
24+
25+
Infura provides access to the [Unichain JSON-RPC API](json-rpc-methods/index.md) method library that
26+
interacts with the Unichain blockchain. Methods include functionality for reading and writing data to the network,
27+
and executing smart contracts.
28+
29+
:::info See also
30+
31+
See the [official Unichain documentation](https://docs.unichain.org/docs) for more information.
32+
33+
:::
34+
35+
<CardList
36+
items={[
37+
{
38+
href: "quickstart",
39+
title: "Quickstart",
40+
description: "Learn how to quickly connect and make calls to the Unichain network."
41+
},
42+
{
43+
href: "json-rpc-methods",
44+
title: "JSON-RPC APIs",
45+
description: "View the APIs available for communicating with the Unichain network."
46+
},
47+
{
48+
href: "../../../developer-tools/dashboard/get-started/create-api/",
49+
title: "Create an API key",
50+
description: "Learn how to create an API key and secure and share it with your team."
51+
}
52+
]}
53+
/>
54+
55+
## Partners and privacy policies
56+
57+
The following partners provide access to the Unichain network:
58+
59+
<!-- markdown-link-check-disable -->
60+
61+
- InfStones ([Privacy Policy](https://infstones.com/terms/privacy-notice))
62+
- 0xFury ([Privacy policy](https://0xfury.com/privacy.php))
63+
<!-- markdown-link-check-enable -->
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import Tabs from "@theme/Tabs"
2+
import TabItem from "@theme/TabItem"
3+
4+
<Tabs>
5+
<TabItem value="curl">
6+
7+
```bash
8+
curl https://unichain-sepolia.infura.io/v3/<YOUR-API-KEY> \
9+
-X POST \
10+
-H "Content-Type: application/json" \
11+
-d '{"jsonrpc": "2.0", "method": "eth_accounts", "params": [], "id": 1}'
12+
```
13+
</TabItem>
14+
</Tabs>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import Tabs from "@theme/Tabs"
2+
import TabItem from "@theme/TabItem"
3+
4+
<Tabs>
5+
<TabItem value="curl">
6+
7+
```bash
8+
curl https://unichain-sepolia.infura.io/v3/<YOUR-API-KEY> \
9+
-X POST \
10+
-H "Content-Type: application/json" \
11+
-d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}'
12+
```
13+
14+
</TabItem>
15+
</Tabs>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import Tabs from "@theme/Tabs"
2+
import TabItem from "@theme/TabItem"
3+
4+
<Tabs>
5+
<TabItem value="curl">
6+
7+
```bash
8+
curl https://unichain-sepolia.infura.io/v3/<YOUR-API-KEY> \
9+
-X POST \
10+
-H "Content-Type: application/json" \
11+
-d '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}'
12+
```
13+
14+
</TabItem>
15+
</Tabs>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import Tabs from "@theme/Tabs"
2+
import TabItem from "@theme/TabItem"
3+
4+
<Tabs>
5+
<TabItem value="curl">
6+
7+
```bash
8+
curl https://unichain-sepolia.infura.io/v3/<YOUR-API-KEY> \
9+
-X POST \
10+
-H "Content-Type: application/json" \
11+
-d '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}'
12+
```
13+
14+
</TabItem>
15+
</Tabs>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import Tabs from "@theme/Tabs"
2+
import TabItem from "@theme/TabItem"
3+
4+
<Tabs>
5+
<TabItem value="curl">
6+
7+
```bash
8+
curl https://unichain-sepolia.infura.io/v3/<YOUR-API-KEY> \
9+
-X POST \
10+
-H "Content-Type: application/json" \
11+
-d '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "value": "0x9184e72a"}], "id": 1}'
12+
```
13+
</TabItem>
14+
</Tabs>

0 commit comments

Comments
 (0)