Ethereum developers could use Remix to compile and debug code for Meter. The current EVM version for Meter is Constantinople. MTR balance is used as ETH in Ethereum.
Use "Injected Web3" in Remix and configure Metamask properly to deploy on Meter.
Meter also supports ethers.js and web3.js through RPC end points.
To get started with the ethers.js library, we first need to install it using the following command:
npm install ethers
Once done, the simplest setup to start using the library and its methods is the following:
const ethers = require('ethers');// Variables definitionconst privKey = '0xPRIVKEY';// Define Providerlet provider = new ethers.providers.JsonRpcProvider('RPC_URL');// Create Walletlet wallet = new ethers.Wallet(privKey, provider);
Please remember to replace the PRIVKEY and RPC_URL to the correct values.
To get started with the web3.js library, we first need to install it using the following command:
npm install web3
Once done, the simplest setup to start using the library and its methods is the following:
const Web3 = require('web3');//Create web3 instanceconst web3 = new Web3('RPC_URL');
Please remember to set the RPC_URL
to the correct RPC end points.
Mainnet: https://rpc.meter.io
Warringstakes testnet: https://rpctest.meter.io
Private node: http://
node_ip
:8545