DEV Community

Cover image for plopchain
abdelkrim boutkhil
abdelkrim boutkhil

Posted on

plopchain

Metamask compatible json-rpc server

This project is a proof of concept - It implements the minimum required ethereum rpc apis to be able to accept simple metamask transactions (transfert only).

This will be included in sub.net library.

Prerequisites :

Clone the subdotnet/metamask-mini-api repository

git clone https://github.com/subdotnet/metamask-mini-api.git
Enter fullscreen mode Exit fullscreen mode

Run the demo :

1) The simple blockchain has 2 prefunded wallets. You can import these private keys in metamask :

  • 616b28bfaa49973faf243ec3296a01675c742533f06c325c78f3d63ceef67963
    • public key : 0x145272D2e9828aE2A25913c0643ff0cb486bBAD1
  • ff067934635e368095f47bfc72942087e07b097d0c541b8f4602dcd255de50fd
    • public key : 0x169E72fa2CC6Ec61402dc3C5D3c16ACc4d83BAD2

The public keys end with "BADx".

Install metamask and import prefunded dev addresses :
configure metamask wallet

2) Run the project
Inside the cloned repository, simply execute dotnet run and you should have this output in the console : json-rpc api listening on http://localhost:5035

3) Configure localPLOP network in metamask
Open metamasks settings and go to the network tab.
Add new network with the folowing values :

You should have 42 PLOP in your BAD1 wallet and 1337 PLOP in your BAD2.

Configure custom network in metamask and transfer funds :
configure metamask wallet

Top comments (0)