CLV Documentations
Portal
Portal
  • Welcome to Clover
  • Useful Links
  • CLV Token
  • Quick Start
    • Clover Networks
    • Sakura Networks
    • Using Local Node
    • Using Testnet
      • Create an account
      • Faucet
      • Run a Testnet Node
      • Connect to Testnet
  • Development Guide
    • Introduction
      • Prerequisites
      • Setup environment
    • Using MetaMask
    • Using Remix
    • Using Web3.js
      • Query Balance
      • Send Transaction
    • Counter Tutorial
      • Setup dapp project
      • Setup truffle
      • The Counter Contract
      • Deploy Contract
      • Counter Webapp
  • Clover Wallets & Dapps
    • Clover Extension Wallet
      • Getting Started
      • Switch Networks
      • Add Tokens
      • Send Tokens
      • Cross-Chain Transfer
      • View Seed Phrase
      • Import Account
      • dApp Integration
      • Substrate dApp Integration
      • Solana-dApp-Integration
      • dApp Interaction Protocol
      • Wallet Integration QA
    • Clover Mobile Wallet
    • Clover Web Wallet
      • dApp Integration
    • Clover Assets Explorer
    • Clover Cross-Chain Explorer
  • Maintain
    • Running a validator on Clover Network
    • Running a RPC node
    • Staking on Clover
      • Staking via Apps
      • Staking via Clover Wallet
  • Technical Documentation
    • Web3 compatibility
      • eth_protocolVersion
      • eth_syncing
      • eth_hashrate
      • eth_coinbase
      • eth_mining
      • eth_chainId
      • eth_gasPrice
      • eth_accounts
      • eth_blockNumber
      • eth_getBalance
      • eth_getStorageAt
      • eth_getBlock
      • eth_getTransactionCount
      • eth_getBlockTransactionCount
      • eth_getBlockUncleCount
      • eth_getCode
      • eth_sendTransaction
      • eth_sendSignedTransaction
      • eth_call
      • eth_estimateGas
      • eth_getTransaction
      • eth_getTransactionByBlockHashAndIndex
      • eth_getTransactionByBlockNumberAndIndex
      • eth_getTransactionReceipt
      • eth_getUncle
      • eth_getLogs
      • eth_getWork
      • eth_submitWork
      • eth_submitHashrate
      • eth_subscribe
      • eth_unsubscribe
      • net_version
      • net_peerCount
      • net_listening
      • web3_clientVersion
      • web3_sha3
    • Clover Test Cases
    • Clover EVM
    • Clover Accounts Binding
    • Query Balance
    • Transaction Finality
  • Clover Eco Incentive Program
    • Introduction
    • Clover Developer Incentive Program
    • Virtual Ethereum address binding
    • Clover User Incentive Program
  • Parachain Auction
    • About Polkadot Parachain Auction
Powered by GitBook
On this page
  • Installing MetaMask Chrome Extension
  • Connecting to the Local Clover Node
  • Initiating a Transfer
  1. Development Guide

Using MetaMask

Interacting with a Clover Node Using MetaMask

PreviousSetup environmentNextUsing Remix

Last updated 3 years ago

This guide will show you how to use MetaMask wallet connecting to a self-run Clover standalone node, and sending tokens between accounts. There are two ways to interact with Clover: 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.

Installing MetaMask Chrome Extension

First of all, install the 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: 0xa504b64992e478a6846670237a68ad89b6e42e90de0490273e28e74f084c03c8

  • Public address: 0xe6206C7f064c7d77C6d8e3eD8601c9AA435419cE

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:

Connecting to the Local Clover Node

Now connect MetaMask to your locally running Clover node. It should be producing blocks now:

Back to MetaMask, navigate to Settings -> Networks -> Add Network. Fill in the following Contents:

  • Network Name: Clover Dev

  • New RPC URL: http://127.0.0.1:9933

  • ChainID: 1023

  • Symbol (Optional): CLV

When done, click on the "save" button. MetaMask should be connected to the local Clover standalone node via its Web3 RPC. Now you should see the Clover dev account with a balance of 10,000,000 CLV.

Initiating a Transfer

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:

MetaMask