Interacting with Moonbeam Using Talisman¶
As a Polkadot parachain, Moonbeam uses a unified account structure that allows you to interact with Substrate (Polkadot) functionality and Moonbeam's EVM, all from a single Ethereum-style address. This unified account structure means that you don't need to maintain both a Substrate and an Ethereum account to interact with Moonbeam - instead, you can do it all with a single Ethereum private key.
Polkadot.js Apps supports H160 accounts injected into the browser via an extension like Talisman. Note, Polkadot.js Apps is phasing out support for accounts stored locally in the browser's cache. While you can continue to use any accounts that you've imported and stored in your browser locally via Polkadot.js Apps, you won't be able to add any new ones. This means that you'll need to use an extension like Talisman. Furthermore, injecting your account from an extension like Talisman is generally regarded to be safer than storing the account directly in the browser.
This guide will include all of the steps for setting up an account in Talisman and using it to interact with Moonbeam through Polkadot.js Apps.
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/).
Setting up Talisman¶
Talisman is a crypto-wallet that natively supports Substrate (Polkadot) and Ethereum accounts. The Talisman wallet browser extension is available on Google Chrome, Brave, and Firefox, and a corresponding asset dashboard is accessible at app.talisman.xyz
First, download and install the Talisman extension. Once the extension opens up, you'll be prompted to either create a new wallet or import an existing one. For the purposes of this demo, you'll create a new wallet. On the following screen you'll be prompted to create a password to secure the new wallet.
Talisman does not require you to back up your seed phrase but will nudge you with a reminder at the bottom of the screen. If you don't back up your seed phrase, you could lose all of your assets.
To back up your newly created wallet, take the following steps:
- Press Backup Now
- Enter the password to your Talisman wallet
- Press View Recovery Phrase and store it in a secure place
Setting up Talisman to Connect to Testnets¶
Talisman works with all Moonbeam networks after you enable Ethereum accounts. You can also see your balances across all networks in the Portfolio tab by clicking on the extension's Talisman logo in the upper left-hand corner. By default, Talisman hides your testnet account balances. However, you can change this by taking the following steps:
- Open the Talisman extension and click on the Talisman logo
- Select Settings
- Select Ethereum Networks
- Click Enable Testnets
Connecting Talisman to Moonbeam and Polkadot.js Apps¶
Connecting Talisman to a Moonbeam-based network in Polkadot.js Apps is straightforward. Remember that you need to enable testnets if you want to connect to Moonbase Alpha.
To connect to a Moonbeam-based network, the Moonbase Alpha testnet in this example, head to Moonbase Alpha Polkadot.js Apps. The Talisman extension will prompt you to select the accounts you'd like to use with Polkadot.js Apps. If it doesn't automatically pop up, you can open the Talisman extension and press the Connected / Not Connected button at the top. To configure Talisman to correctly interface with Moonbeam networks on Polkadot.js Apps, you should take the following steps:
- Check the box next to Show Ethereum Accounts
- Select the accounts you want to connect to Polkadot.js Apps. In this example, it is only My Ethereum Account. This is the default name assigned by Talisman which you can rename if you'd like
- Press Connect 1. The value will change depending on the number of accounts you are connecting
Your Talisman wallet is now connected to Polkadot.js Apps. After refreshing Polkadot.js Apps, you should see your Talisman account in the Accounts page of Polkadot.js Apps. When launching Polkadot.js Apps for the first time, you may or may not be connected to the desired network. You can change your selected network to the Moonbase Alpha TestNet by clicking the logo in the top left corner, then scroll down to the Test Networks section, select Moonbase Alpha, and scroll back to the top and click Switch.
After switching, the Polkadot.js site will not only connect to Moonbase Alpha, but also change its styling to make a perfect match.
Adding a New Account to Talisman¶
In this section, you'll learn how you can create a new account, or import an already existing MetaMask account to Polkadot.js Apps.
- Open the Talisman extension and click on the Talisman logo in the upper left hand corner
- Select Add Account
- Select New Account
- Select Ethereum as the account type
- Give your new account a name
- Press Create
Although our new account has been successfully created, Polkadot.js Apps isn't aware of it yet. To connect the new account to Polkadot.js Apps, take the following steps from Polkadot.js Apps:
- Open the Talisman extension and Press the Connected / Not-connected button
- Ensure Show Eth accounts is checked
- Click on the account you'd like to connect. The green dot next to the account will light up if it is selected
Sending a Transaction Through Substrate's API¶
Now, to demonstrate the potential of Moonbeam's unified accounts scheme you can make a transfer through the Substrate API using Polkadot.js Apps. Remember that you are interacting with Substrate using an Ethereum-style H160 address. To do so, you can add another account. The accounts in Talisman have been renamed to the familiar Alice and Bob accounts. To send some DEV funds from Alice to Bob, take the following steps:
Click on Alice's send button, which opens another wizard that guides you through the process of sending a transaction.
- Set the send to address
- Enter the amount to send, which is 4 DEV tokens in this example
- When ready, click on the Make Transfer button
- Approve the transaction in the Talisman pop up
After the transaction is confirmed, you should see the balances updated for each account.
And that is it! These steps have demonstrated the ease coupled with the robust security of interacting with injected H160 accounts in Polkadot.js Apps with Talisman. All of this is possible because of Moonbeam's unified account structure, a great example of Moonbeam's commitment to providing the best user experience.
| Created: January 19, 2023