Interacting with Moonbeam Using Nifty Wallet¶
Introduction¶
Nifty Wallet was initially forked from MetaMask, and has been extended for interaction with POA networks, POA Core and POA Sokol. Since Nifty is Ethereum compatible, it can also be used on Moonbeam.
Please be aware that Nifty Wallet is beta software and it is recommended to sign out when you're done using a site.
This tutorial will cover how to setup Nifty Wallet to connect to our TestNet, Moonbase Alpha.
Creating a Wallet¶
First, you need to install the Nifty Wallet browser extension from the Chrome web store.
With the browser extension installed, please open it and set a password.
After creating a password, a vault will be created for your account and seed words to restore your account will be generated. You'll be prompted to save the generated seed words. You can choose to save the seed words as a file or if you decide to save them another way, you can proceed by clicking I've copied it somewhere safe. Just be sure that you have safely stored the seed words and you don't share them with anyone.
Connect Nifty Wallet to Moonbeam¶
Once you've created an account, you can now connect to any of the Moonbeam-based networks by creating a custom network.
You can also connect to Moonbeam using an imported account. At this time, hardware wallets are not supported for custom RPCs.
Navigate to the settings, in the top left corner, click on the network dropdown. Scroll down to the bottom and select Custom RPC.
Enter the RPC URL for Moonbeam in the New RPC URL field:
https://rpc.api.moonbeam.network
https://rpc.api.moonriver.moonbeam.network
https://rpc.api.moonbase.moonbeam.network
http://127.0.0.1:9933
Then click Save.
The current RPC should change to the Moonbeam RPC URL that you provided, and in the top left corner you'll see the network has changed to Private Network.
And that is it, you now have Nifty Wallet connected to the Moonbeam!
Using Nifty Wallet¶
Nifty Wallet serves as a Web3 provider in tools such as Remix. By having Nifty Wallet connected to any of the Moonbeam networks, you can deploy contracts as you would like using MetaMask, signing the transactions with Nifty instead. This example will use the Moonbase Alpha TestNet, but it can be adapted for Moonbeam and Moonriver.
In Remix, when deploying a smart contract, make sure you select the Injected Web3 option in the Environment menu. If you have Nifty Wallet connected, you will see the Moonbeam chain ID just below the box and your Nifty Wallet account injected into Remix as well. When sending a transaction, you should see a similar pop-up from Nifty:
Since this example is on Moonbase Alpha, ensure you have DEV tokens in your account. You can get DEV tokens for testing on Moonbase Alpha once every 24 hours from the Moonbase Alpha Faucet. By clicking on Submit, you are signing this transaction, and the contract will be deployed to the Moonbase Alpha TestNet.
Note
Please note that although your account balance shows ETH, it is not real ETH, and just DEV tokens.
The transaction will be displayed under the Sent tab.
Create a New Account¶
To create a new account, click the user icon in the top right corner and select Create Account.
A new account will be created and you'll be switched to the new account.
Import an Account¶
To create a new wallet, click the user icon in the top right corner and select Import Account.
Next, select the type of import from the dropdown and enter the necessary details to import your account. For example, if you choose to import with a private key, paste your private key in the input field and click Import.
Your account will be imported and you'll be switched to the imported account.