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 10 commits into
base: staging-ah-smart-contracts
Choose a base branch
from
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
4 changes: 3 additions & 1 deletion develop/smart-contracts/.pages
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ nav:
- index.md
- 'Overview': overview.md
- 'Wasm (ink!)': wasm-ink.md
- evm
- 'Native EVM Contracts': native-evm-contracts.md
- 'Parachain Contracts': parachain-contracts.md
- 'EVM Toolkit': evm-toolkit
4 changes: 4 additions & 0 deletions develop/smart-contracts/evm-toolkit/.pages
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
title: EVM Toolkit
nav:
- index.md
- 'Connect Your Wallet': connect-your-wallet.md
61 changes: 61 additions & 0 deletions develop/smart-contracts/evm-toolkit/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 Asset Hub blockchain. Set up your wallet, switch networks, and request test tokens for development.
---

# Connect your Wallet

## 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.
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not accurate

  1. Let's start with what is Westend --> one of the Polkadot test networks.
  2. MetaMask is not just to connect to Westend, it can connect to any EVM compat chain
  3. Westend is not EVM compat, and soon Kusama and Polkadot will be
  4. "explore and interact with the chain" is not correct, you can only interact with smart contracts. You cannot do a balance transfer in Westend with MetaMastk.
  5. In fact, it is important to explore how a user should use a Polkadot-native wallet with Westend, and how MetaMastk, and how they differ.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks, @kianenigma. I assume there’s a typo in item 2, and you meant to say, "Westend is EVM compatible, and soon Kusama and Polkadot will be."

If so, do you think this introduction covers your points using the correct terminology?

MetaMask is a popular wallet for interacting with EVM-compatible chains, allowing users to connect to test networks that support Ethereum-based smart contracts. This article provides guidance on setting up MetaMask, connecting to the contracts deployed on the EVM-compatible test network, the Westend Asset Hub, and requesting test tokens for development purposes.

It’s important to emphasize that MetaMask primarily facilitates interactions with smart contracts, giving you access to various functionalities available on the chain.


## 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 install MetaMask, you can set up a new wallet and securely store your seed phrase. This phrase is crucial for recovery in case you lose access.

## Connect to the Asset Hub Westend TestNet

To connect to the Westend Asset Hub TestNet via MetaMask, you need to follow these steps:

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

![](/images/develop/smart-contracts/evm-toolkit/connect-your-wallet/connect-your-wallet-1.webp)

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

![](/images/develop/smart-contracts/evm-toolkit/connect-your-wallet/connect-your-wallet-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/evm-toolkit/connect-your-wallet/connect-your-wallet-3.webp)

4. Click on the **Asset-Hub Westend TestNet** to switch the network

![](/images/develop/smart-contracts/evm-toolkit/connect-your-wallet/connect-your-wallet-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/evm-toolkit/connect-your-wallet/connect-your-wallet-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/evm-toolkit/connect-your-wallet/connect-your-wallet-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.
Empty file.
6 changes: 0 additions & 6 deletions develop/smart-contracts/evm/.pages

This file was deleted.

52 changes: 0 additions & 52 deletions develop/smart-contracts/evm/index.md

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.