RChain Blog

Using MetaMask with RChain

guest post by co-op member Jim Whitescarver

RChain is a cooperative building a 3rd generation blockchain platform and social coordination technologies designed to address the world’s greatest problems. MetaMask is a trusted browser plugin allowing transactions on the 2nd generation Ethereum blockchain. Like Ethereum, transactions on RChain are signed cryptographically using a private key that corresponds to an address. While ethereum addresses and RChain addresses are different there is an RChain address that has the same private key as an ethereum counterpart. Since the cryptographic mechanism is the same metamask can be used sign transactions for RChain. There are several third party wallets for running transactions on RChain but MetaMask has advantages for some users.

  1. Users may already be familiar with metamask
  2. Users may be uncomfortable or unwilling to enter their private keys on any website or other new RChain wallets.
  3. Users may previously have Ethereum accounts that had RHOC and now have REV in the corresponding RChain account that may both be conveniently accessed in one tool, MetaMask.
  4. For users of the Brave browser the build in crypo wallet is MetaMask compatible (enable at Settings -> extensions, then restart).
  5. The website https://tgrospic.github.io/rnode-client-js/ provides a lot of rchain utility including converting ETH addresses to RChain addresses, obtaining REV Balances, REV transfers and deploying arbitrary rholang code without exposing your private key to the page if you use MetaMask.

MetaMask can be installed in your browser from https://metamask.io/. If you have an existing Ethereum account you want to use not already in MetaMask it can be imported using its private key or json file. An account is created when you install MetaMask you can use or create another in the account menu but be certain to backup the private key or you can lose access.

Click MetaMask account on the web page and you will be prompted to connect with the page. Check accounts you wish to use and hit Next, and then Connect.

The ETH address will be shown on the page and the corresponding REV address below it. Copy this address and share it with those you want to cooperate with. RChain members can use it for voting by following the instructions in your email.
Give the account a name and click Save account to access other capabilities. Select a testnet or mainet node at the top. Then you can check the REV balance.

To send REV paste the to account in the text box and save it with a name. Select the accounts in the dropdown enter an amount in revletes, 8 times 10 to the eighth REV. Click transfer and MetaMask will ask you to sign the transaction.

After some time next to the Transfer button you should see:

✓ Transfer successful. // cost: 165251

Below the deploy box you will see the deployId which can be used to trace the transaction.

Rholang is the language of RChain. To deploy Rholang code paste it in the box and click Deploy Rholang code and sign the deploy as before in metamask.


Disclaimer: The views and opinions expressed in this article are those of the authors and do not necessarily reflect the official policy or position of RChain Cooperative, it’s directors, officers, staff, or members.