Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document "Connect your wallet" for asset hub smart contracts #300

Open
wants to merge 23 commits into
base: staging-ah-smart-contracts
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
f9f0904
fix: wip
nhussein11 Jan 7, 2025
01b7afc
fix: connect your metamask
nhussein11 Jan 7, 2025
86160c3
Merge branch 'master' into 277-document-how-to-connect-metamask-to-we…
nhussein11 Jan 7, 2025
23d8dda
Update develop/smart-contracts/evm/connect-your-wallet.md
nhussein11 Jan 7, 2025
83827d1
Update develop/smart-contracts/evm/connect-your-wallet.md
nhussein11 Jan 7, 2025
0373180
fix: desc
nhussein11 Jan 7, 2025
0f25935
Update develop/smart-contracts/evm/connect-your-wallet.md
nhussein11 Jan 7, 2025
d68dde9
Update develop/smart-contracts/evm/connect-your-wallet.md
nhussein11 Jan 7, 2025
874e00d
fix: wording
nhussein11 Jan 7, 2025
7303cd5
fix: ia
nhussein11 Jan 7, 2025
5fc8345
Update develop/smart-contracts/evm-toolkit/connect-your-wallet.md
nhussein11 Jan 14, 2025
1131da6
Update develop/smart-contracts/evm-toolkit/connect-your-wallet.md
nhussein11 Jan 14, 2025
47ef44e
fix: adding rpc urls
nhussein11 Jan 14, 2025
8dee80b
Update develop/smart-contracts/evm-toolkit/connect-your-wallet.md
nhussein11 Jan 16, 2025
9d0848f
Update develop/smart-contracts/evm-toolkit/connect-your-wallet.md
nhussein11 Jan 16, 2025
2d8306f
fix: wording
nhussein11 Jan 16, 2025
75a00c3
fix: wording
nhussein11 Jan 17, 2025
2e6ca36
fix: update image syntax to add `browser-extension` css class to them
nhussein11 Jan 17, 2025
1108a21
Apply suggestions from code review
nhussein11 Jan 20, 2025
3e936c6
Merge branch 'staging-ah-smart-contracts' into 277-document-how-to-co…
nhussein11 Jan 20, 2025
ae2e3ff
applies SEO description suggestion from review
dawnkelly09 Jan 22, 2025
29575f2
Revert "applies SEO description suggestion from review"
dawnkelly09 Jan 22, 2025
b760a6a
Apply suggestions from code review
nhussein11 Jan 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ pallet-balances = { workspace = true, default-features = false }
[features]
default = ["std"]
std = [
"codec/std",
"frame-support/std",
"frame-system/std",
"scale-info/std",
"sp-runtime/std",
"sp-core/std",
"sp-io/std",
"pallet-balances/std",
"codec/std",
"frame-support/std",
"frame-system/std",
"scale-info/std",
"sp-runtime/std",
"sp-core/std",
"sp-io/std",
"pallet-balances/std",
]

[lints]
Expand Down
3 changes: 2 additions & 1 deletion develop/smart-contracts/evm/.pages
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ nav:
- index.md
# This page is temporarily hidden; it has been commented out to preserve its content.
# - 'Native EVM Contracts': native-evm-contracts.md
- 'Parachain Contracts': parachain-contracts.md
- 'Parachain Contracts': parachain-contracts.md
- 'Connect Your Wallet': connect-your-wallet.md
61 changes: 61 additions & 0 deletions develop/smart-contracts/evm/connect-your-wallet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
title: Connect your Wallet
description: Learn to connect MetaMask to the Westend Asset Hub testnet. Set up your wallet, switch networks, and request test WND tokens for development.
nhussein11 marked this conversation as resolved.
Show resolved Hide resolved
---

# Connect you Wallet
nhussein11 marked this conversation as resolved.
Show resolved Hide resolved

## Connect to Asset Hub Using MetaMask

Metamask allows users to connect to the Asset Hub to explore and interact with the chain. This article will guide you step by step on how to set up an EVM-compatible wallet, connect to the Westend Asset Hub, and request test tokens for development testing.
nhussein11 marked this conversation as resolved.
Show resolved Hide resolved

## Prerequisites

To get started with Metamask, you need to install the [MetaMask extension](https://metamask.io/download/){target=\_blank} and add it to the browser. Once, you have metamask installed, you can set up a new wallet and securely store your seed phrase. This phrase is crucial for recovery in case you lose access.
nhussein11 marked this conversation as resolved.
Show resolved Hide resolved

## Connect to the Asset Hub Westend Testnet
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there might be a button / embed we could put here too, see: https://contracts.polkadot.io/connect-to-asset-hub/

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought the https://contracts.polkadot.io/connect-to-asset-hub/ was a temporary solution until this documentation is ready. If not, we can add the link at the end of this page to connect to contracts.polkadot.io. Do you know if that is the case?


To connect to the Westend Asset Hub testnet via Metamask, you need to follow these steps:
nhussein11 marked this conversation as resolved.
Show resolved Hide resolved

1. Open the MetaMask extension and click in the network icon to switch to the Asset Hub Westend Testnet

![](/images/develop/smart-contracts/metamask/metamask-connection-1.webp)

2. Click on the **Add a custom network** button

![](/images/develop/smart-contracts/metamask/metamask-connection-2.webp)

3. Fill in the required fields with the following parameters and click the **Save** button

| **Attribute** | **Value** |
|------------------------|-------------------------------------------------------------|
| **Network name** | <pre>```Asset-Hub Westend Testnet```</pre> |
| **Default RPC URL** | <pre>```https://westend-asset-hub-eth-rpc.polkadot.io```</pre> |
| **Chain ID** | <pre>```420420421```</pre> |
| **Currency symbol** | <pre>```WND```</pre> |
| **Block explorer URL** | <pre>```https://assethub-westend.subscan.io``` </pre> |

![](/images/develop/smart-contracts/metamask/metamask-connection-3.webp)

4. Click on the **Asset-Hub Westend Testnet** to switch the network
nhussein11 marked this conversation as resolved.
Show resolved Hide resolved

![](/images/develop/smart-contracts/metamask/metamask-connection-4.webp)


## Request Test Tokens

To start conducting transactions and interacting with smart contracts on the Westend testnet, you'll need test WND tokens. Here's how to get them:

1. Navigate to the [Westend Faucet](https://faucet.polkadot.io/westend?parachain=1000){target=\_blank}

2. Copy your MetaMask address linked to the Westend Asset Hub and paste it into the designated field on the Faucet page

![](/images/develop/smart-contracts/metamask/metamask-connection-5.webp)

3. Click **Get Some WND** button to request free test WND tokens. These tokens will be sent to your MetaMask wallet shortly.

![](/images/develop/smart-contracts/metamask/metamask-connection-6.webp)

## Conclusion

Congratulations! You have successfully connected to the Westend Asset Hub using MetaMask and acquired test tokens. This setup allows you to experiment with the network’s functionalities without using real ether or encountering financial risks. Remember to keep your MetaMask credentials secure and never share your wallet’s private key or seed phrase with anyone.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.