Interacting with Moonbeam Using MathWallet¶
In this tutorial, we'll go through how to setup MathWallet to connect to each of the networks: Moonbeam, Moonriver, and Moonbase Alpha. We'll also present a brief example of using MathWallet as a Web3 provider for other tools such as Remix.
The information presented herein is for informational purposes only and has been provided by third parties. Moonbeam does not endorse any project listed and described on the Moonbeam docs website (https://docs.moonbeam.network/).
First, you need to install the MathWallet browser extension, which you can get from their website.
With the browser extension installed, please open it and set a password.
Connect to Moonbeam¶
To get started with Moonbeam, all you have to do is click Switch Network and select Moonbeam.
And that is it, you now have MathWallet connected to Moonbeam! Your wallet should look like this:
Now that you've successfully connected to Moonbeam, you can skip ahead to the Adding a Wallet section to get started creating or importing a wallet.
Connect to Moonriver¶
Getting started with Moonriver is a straightforward process. All you have to do is click Switch Network and select Moonriver.
And that is it, you now have MathWallet connected to Moonriver! Your wallet should look like this:
Now that you've successfully connected to Moonriver, you can skip ahead to the Adding a Wallet section to get started creating or importing a wallet.
Connect to Moonbase Alpha¶
In this part, we'll go through the process of connecting MathWallet to Moonbase Alpha. First you'll need to enable Moonbase Alpha. To do so, go to the settings by clicking on the gear icon. Then click on Networks and scroll down through the Ethereum section until you find Moonbase Alpha and toggle the switch.
Lastly you'll need to switch to Moonbase Alpha. From the main screen, click Switch Network and select Moonbase Alpha.
And that is it, you now have MathWallet connected to the Moonbase Alpha TestNet! Your wallet should look like this:
Now that you've successfully connected to Moonbase Alpha, you can move on to the Adding a Wallet section to get started creating or importing a wallet.
Adding a Wallet¶
The following steps will show you how to interact with the Moonbase Alpha TestNet, but can also be used to interact with Moonbeam and Moonriver.
After you are connected to Moonbase Alpha, you can now create a wallet to get an account and start interacting with the TestNet. Currently, there are three ways to add a wallet:
- Create a wallet
- Import an existing wallet using a mnemonic or private key
- Connect hardware wallet (not supported for now)
Create a Wallet¶
The following steps for creating a wallet can be modified for Moonbeam and Moonriver.
To create a new wallet, click the sign next to Moonbase Alpha and select Create Wallet.
Set and confirm a wallet name. Next, make sure you safely store the mnemonic, as it provides direct access to your funds. Once you have completed the process, you should see your newly created wallet with its associated public address.
Import a Wallet¶
To create a new wallet, click the sign next to Moonbase Alpha and select Import Wallet.
Next, select between importing using a mnemonic or a private key. For the first option, enter the mnemonic word by word, separated by spaces. For the second option, enter the private key (either with the
0x prefix or not, it works both ways).
After clicking next, set a wallet name, and that is it! You should see your imported wallet with its associated public address.
MathWallet serves as a Web3 provider in tools such as Remix. By having MathWallet connected to Moonbase Alpha or Moonriver, you can deploy contracts as you would like using MetaMask, signing the transactions with MathWallet instead.
For example, in Remix, when deploying a smart contract to Moonbase Alpha, make sure you select the Injected Web3 option in the ENVIRONMENT menu. If you have MathWallet connected, you will see the TestNet chain ID just below the box (1287) and your MathWallet account injected into Remix as well. When sending a transaction, you should see a similar pop-up from MathWallet:
By clicking on Accept you are signing this transaction, and the contract will be deployed to the Moonbase Alpha TestNet.
| Created: January 26, 2021