Comment on page
Interacting with a CLV Node Using MetaMask
This guide will show you how to use MetaMask wallet connecting to a self-run CLV standalone node, and sending tokens between accounts. There are two ways to interact with CLV: using Substrate RPC endpoints, or by using Web3-compatible RPC endpoints, which is served from the same Substrate RPC RPC server. In this tutorial, we will use Web3 RPC endpoints.
First of all, install the MetaMask Extension from the Chrome Store. After installation is done, follow the "Get Started" guide to create a wallet, set a password, and keep your secret backup phrases in a secure place.
Now import the development account:
The information for the pre-funded development account for standalone build are:
- Private key:
- Public address:
Select “Private Key” and paste the key on the "Import" page, then click the "import" button.
You will see an imported “Account 2” looks like this:
Now connect MetaMask to your locally running CLV node. It should be producing blocks now:
Back to MetaMask, navigate to Settings -> Networks -> Add Network. Fill in the following Contents:
- Network Name:
- New RPC URL:
- Symbol (Optional):
When done, click on the "save" button. MetaMask should be connected to the local CLV standalone node via its Web3 RPC. Now you should see the CLV dev account with a balance of 10,000,000 CLV.
Now we can try sending tokens with MetaMask. Let's transfer from this dev account to the account we just created while setting up MetaMask, so that we can simply use the “Transfer between my accounts” option.
First let’s send 100 tokens. Input an amount of 100 ETH and leave all other settings as default.
Note that the token name may be changed to ETH when you re-login, which is OK for the development purpose.
Then Click the "Confirm" button to confirm the transaction:
Once done, you will see the status as “pending” until it is confirmed after a short period.
The Account 2 balance should now have been decreased by the amount sent plus a gas fee. When switch to Account 1, you should see the 100 tokens has arrived: