How-to: Interact with your TokenWallet using Etherscan đš
Hi Tokenauts đ In this post weâll walk through a couple of the ways in which TokenAlpha users can interact with their TokenWallet using tools such as Etherscan and Metamask.
The powerful thing about this is that it really reflects our commitment to the decentralised aspect of what weâre building here at Token â we are indeed a means to store and access your funds, but if we were ever to go away, youâd still be able to access and interact with your wallet all the same. Weâre really excited to show you this in practice!
In this post, weâll be doing a couple of things using the âWrite Contractâ feature on Etherscan âŹď¸
- Transferring funds to a wallet of our choice
- Filling up the TokenWallet Gas Tank
Youâll need a few things to get started âŹď¸
Connecting to Metamask
If youâre a TokenWallet Alpha user and have already deployed your Contract Wallet in the app, getting connected to Metamask takes no time at all. To connect, simply install the Metamask extension to your browser (at metamask.io) and make sure youâre connected to the Ropsten Test Network.
To log in, look out for âimport account using seed phraseâ â click this and enter your TokenWalletâs seed phrase. Wondering where to find your TokenWalletâs seed? Head to the âMore (. . .)â tab in the app and tap âBackup Seedâ to reveal it.
Once youâve connected your wallet to Metamask, you should be able to see an ETH balance â if youâre wondering why this balance is different to the balance on your TokenWallet, thatâs because Metamask reads the Gas Tankâs balance, rather than your Contract Wallet. This is super important, as it means that your funds are better protected should your Gas Tank ever be compromised.
Go ahead and name your wallet in Metamask â we called ours âTokenCard #1â â and youâre good to go.
So youâre set up with Metamask and the TokenWallet â whatâs next? Weâre going to make use of Etherscanâs âWrite Contractâ feature to send some ETH!
Getting started with Etherscan
Open up a new window and head to ropsten.etherscan.io, the version of Etherscan on the Ropsten test network. The first thing youâll need to do is grab your wallet address from the app (highlighted below) and paste this into the search bar on Etherscan â this will load up the info on your TokenWallet.
In the example below, weâre using a newly deployed wallet, so weâve got a blank canvas to play with. Before that, hereâs a quick intro to some of the tabs on Etherscan:
Code: This is where you can view your Smart Contract source code â weâve published and verified ours on Etherscan for you to check out.
Read Contract: This is where youâll be able to query your Contract Wallet, checking for example if you have a certain address whitelisted.
Write Contract á´Žáľáľáľ: This is where youâll be able to execute transactions on your TokenWallet, for example topping up your Gas Tank. Weâll be using this todayâŚ
Send ETH to another wallet
Letâs get started by sending ETH from our wallet to another wallet! To do this, head to the Write Contract tab on Etherscan.
Youâll need to click âConnect with Metamaskâ in order to authorise transactions (safety first!) â we logged in earlier, so all we need to do is confirm that weâre happy to execute transactions.
From there, head to Transfer â this is the name given to sending ETH through your TokenWallet â and fill in the details of your transaction:
_to: The address of the wallet youâd like to send ETH to.
_asset: As weâre sending ETH, weâve put â0x0â into here.
_amount: How much ETH youâd like to send. Etherscan requires that you input the value in Wei, which is the smallest denomination of ETH â sending 1 ETH would mean that weâd need to type in 1000000000000000000.
Once youâve written in the values of your choice, click âWriteâ, and thatâs it! Youâve just sent ETH from one address to another without needing to use your TokenWallet app. Even better, youâll still be able to see the transaction in the âTransactionsâ tab in the app.
Topping up your Gas Tank
Now that youâve sent some ETH, next up is topping up your TokenWallet Gas Tank.
In the same way as sending ETH to a wallet, head to the âWrite Contractâ tab on Etherscan, and this time scroll down to InitializeTopUpLimit. Enter how much youâd like to top up your Gas Tank in the _amount section (again, in Wei), then confirm this.
Wait a few seconds for the transaction to go through⌠and⌠thatâs it!
Youâll be able to see your top-up transaction reflected both in the Transactions screen on Etherscan and â if you pull down in the app to refresh â on the actual balance of your Gas Tank in the TokenWallet!