Configuring PlatON|Alaya Network with MetaMask

Configuring PlatON|Alaya Network with MetaMask

What is MetaMask

MetaMask is a wallet extension application embedded in the browser, which helps you interact with decentralized applications (dApps).

MetaMask allows you to easily access the Ethereum network and add other public chains compatible with the EVM.

Why PlatON|Alaya uses MetaMask

MetaMask, the most widely used browser plug-in wallet on the market, is well-received in the community.

To lower the threshold for community users, PlatON | Alaya is compatible with the core tools of the Ethereum ecosystem, including MetaMask, after its upgrade to the Ethereum-compatible version.

MetaMask makes operations such as transfer, signing, and contract interaction more convenient.

Notice

  1. The address generated via MetaMask starts with 0x, that is, one in the Ethereum format. To view the address in the PlatON|Alaya format, please check in PlatON|Alaya.

PlatON MainNet:https://scan.platon.network/

PlatON DevNet: https://devnetscan.platon.network/

Alaya MainNet:https://scan.alaya.network/

Alaya DevNet: https://devnetscan.alaya.network/

  1. Mnemonics of ATON and those of MetaMask are incompatible with each other as they are generated through different paths. Private keys are compatible.
  2. MetaMask cannot be called by WASM contracts, but EVM contracts only.
  3. Since the ChainID (100) of the current PlatON MainNet is the same as the xDai MainNet, before configuring the PlatON MainNet on MetaMask, please delete the xDai MainNet in MetaMask, or configure the PlatON MainNet by “manually adding” (Ignore the hint of ChainID conflict). Future plans to update the ChainID to 210425, already registered in Chainlist (currently this ChainID: 210425 is not available)

This document will guide you through PlatON | Alaya network configuration using MetaMask.

MetaMask installation and use

There are many detailed introductions about the installation and use of MetaMask on the Internet, hence no need of further elaboration.

You may refer to:

Installation, configuration and use of MetaMask

How To Use MetaMask: Ethereum Wallet in your Browser

After creating a wallet using MetaMask, you’re advised to back up the private key of the wallet so that it can be imported into ATON for later use.

Steps of backup:

image-20220112183347293image-20220112183413762image-20220112183659326

How to manually add PlatON network

PlatON MainNet

First, you need to install a MetaMask plugin on your Chrome browser.

Then register the wallet and save your mnemonics and private key.

Then click the drop-down menu in the upper right corner.

image-20220112183808168

Then scroll to the end and click “Add Network”

image-20220112183837332image-20220112183901268

Fill in the above information one by one. The configuration content is as follows:

Network Name: PlatON MainNetworkNew RPC URL: https://openapi.platon.network/rpcChain ID:100Currency Symbol:LATBlock Explorer URL: https://scan.platon.network/

Copy

Other available RPC nodes on the PlatON MainNet:

https://rpc.plateye.com (provided by itokenpool)

Then click Save and wait for it to finish.

Now, the PlatON MainNet has been successfully added to MetaMask.

image-20220112184025579

You can also transfer assets as usual.

image-20220112184503864image-20220112184532084

Done! It is worth mentioning that only Hex addresses are supported on the mainnet. In other words, you have a LAT Address and Hex Address in your ATON wallet, and the one that starts with 0x is your Hex address!

PlatON DevNet

Similarly, you can add and configure the PlatON DevNet according to the following information:

Network Name: PlatON Dev NetworkNew RPC URL: https://devnetopenapi.platon.network/rpcChain ID:210309Currency Symbol:LATBlock Explorer URL: https://devnetscan.platon.network/

Copy

Other available RPC nodes on the PlatON Open Network:

http://34.93.120.9:6789 (ws://34.93.120.9:6790)http://34.85.65.222:6789 (ws://34.85.65.222:6790)

Copy

After the settings are saved, it will automatically jump to PlatON DevNet, and the following will appear:

image-20220112184723277

Next, we can apply for test tokens on the PlatON DevNet faucet (PlatON) to test the transfer operation.

image-20220112184859903

First, we create the No.2 test wallet:

image-20220112185037936

After it is saved, we will see:

image-20220112185056331

Then we use the No. 1 test wallet to transfer 50 LAT to the No. 2 wallet:

image-20220112185347872

Click “Confirm”

image-20220112185403356

Transferring…

image-20220112185439816

Done! 50 LATs have been transferred through the testnet. We can also see a contract interaction below, which is the interaction with the showme application.

image-20220112185459908

Alaya MainNet

By the same token, let’s fill in the following information to add the network to MetaMask.

Network Name: Alaya MainNetworkNew RPC URL: https://openapi.alaya.network/rpcChain ID:201018 Currency Symbol:ATPBlock Explorer URL: https://scan.alaya.network/

Copy

Other available RPC nodes on the Alaya MainNet:

https://rpc.alayascan.com (provided by itokenpool)

Successfully added:

image-20220112190053868

Transfer succeeds as well.

Alaya DevNet

Fill out the form with the following information in order:

Network Name: Alaya Dev NetworkNew RPC URL: https://devnetopenapi.alaya.network/rpcChain ID:201030Currency Symbol:ATPBlock Explorer URL: https://devnetscan.alaya.network/

Copy

Other available RPC nodes on the Alaya DevNet:

http://47.245.14.190:6789 (ws://47.245.14.190:6790)http://8.220.31.172:6789 (ws://8.220.31.172:6790)

Copy

After the information is added, create a new Alaya test wallet, and then apply for test tokens on the Alaya DevNet faucet (Alaya) to test the transfer operation.

image-20220112191841275

After receiving the test ATP from the faucet, we can start testing transfer:

Start transferring

image-20220112192819523image-20220112192843056

Transferring…

image-20220112192856706

Done. Now we can see 5 ATP has been received by the Alaya DevNet-2.

image-20220112192930266

Add a network using ChainList

First, open ChainList and click “Connect Wallet” to authorize the connection to MetaMask.

e27a930f30709e719b147ac64dcaaacaf904b93a_2_690x338

Then, enter PlatON in the input box to search,

and we can see:

9800bbe80cff52b23b102f36b0eae9e0c05a7bbd_2_690x338

Note. Currently PlatON Mainnet ChainID:100, Chainlist already has a Blockchain with ChainID:100, so adding PlatON Mainnet from Chainlist is not supported for now. The registered ChainID:210425 is not yet valid and is not available!

Next, click “Add tTo MetaMask” to add the network.

0acc9a52bb0d63ed11f2fb9063a12e059c754298_2_690x338

Then click switch network to jump to the PlatON DevNet!

image-20220112193135951

Now let’s add the Alaya Dev Testnet to MetaMask in the same way.

e67da043d7028ad99c9f1048a37b65d13a1f8ad9_2_690x338

Similarly, click Approve and then switch network . The Alaya Dev Testnet has been added.

A quick way to add MetaMask to Blockchain Explorer#

Enter the PlatON or Alaya blockchain explorer, find [MORE] in the navigation menu, click [Add to Extension], and select the network to be configured:

Blockchain explorer on the PlatON MainNet: PlatON Blockchain Explorer

Blockchain explorer on the PlatON DevNet: PlatON Blockchain Explorer

Blockchain explorer on the Alaya MainNet: Alaya Blockchain Explorer

Blockchain explorer on the Alaya DevNet: Alaya Blockchain Explorer

Connect with MetaMask in the web browser

  1. After entering the Add to Extension page in the blockchain explorer, click [Connect MetaMask].

[Prerequisite: MetaMask needs to be installed in the explorer in advance]

  1. Click [Next] in MetaMask, and then click [Connect] to establish communication with MetaMask.

Add network configuration to MetaMask

  1. After the connection is successful, [Connect MetaMask] turns into [Add to MetaMask]. Click [Add to MetaMask].

  1. Click [Approve] to add the network configuration to MetaMask.

  1. The plug-in wallet will prompt you to switch to this network. Click [Switch Network] to switch the corresponding network for later use.