Meter Docs
Learn
  • Welcome to Meter!
  • 中文版文档
  • Overview of Meter
    • Introduction to Meter
    • Hybrid PoV Consensus Mechanism
    • MTR - The Metastable Coin
    • MTRG - Meter Governance Coin
    • On-Chain Auctions
    • The Meter Reserve
    • Meter's Ethereum Emulation Mode
  • Wallet Setup
    • Interacting with Meter Mainnet Using MetaMask
    • Interacting with Meter Mainnet Using Ledger
    • Adding Custom Tokens to MetaMask
    • Getting MTR for Gas
    • Revoking Contract Spend Limits
    • Specifying gas (GWEI) for transactions
    • Speeding Up/ Canceling Transactions
  • Meter Passport V2.0
    • Meter Passport Architecture
    • Salient Features
    • Bridge Fee
    • Programming Meter Passport
    • Tutorials for Using Meter Passport
    • MTRG Crosschain Info
    • Onboarding Passport for Your Project
    • Technical Guideline for Meter Passport
    • Security Audit for Meter Passport V2.0
  • Staking and Validation
    • Staking MTRG
      • How to Stake MTRG
        • Choosing Candidates
        • Factors affecting Staking Rewards
      • How to Stake Incremental MTRG
      • How to Undelegate MTRG
      • How to Unbound MTRG
      • Frequently Asked Questions
    • Running a Full Node on Meter Mainnet
    • Configure the Full Node to Validator Node
    • Meter Incentive Programs to promote decentralization
  • Mining
    • Meter Mining Guide
  • NFT Collections
    • Meter Community NFTs
  • Developer Documentation
    • Meter Developer Incentives
      • Meter Developer Grant Program
      • Meter TVL Incentive Program
      • Meter Gas Monetization Program
      • Meter Co-marketing Program
      • Meter DAPP Referral Program
    • Introduction to Developer Documentation
    • Developing with Remix, Ethers.js and Web3.js
    • Index Data with SubQuery
    • Meter Native TX RESTful APIs
    • Meterify API Documentation
      • meterify.eth
      • meterify.eth.Contract
      • meterify.eth.accounts
      • meterify.utils
      • meterify.module.options
      • Callbacks Promises Events
      • json interface
    • Meterify DApp Tutorials
    • Meterify Code Examples
    • Contributing to Meter and Our Documentation
      • Documentation Guidelines
        • API Documentation Guidelines
        • Tutorial Creation Guidelines
        • Code Example Guidelines
        • Article Writing Guidelines
Powered by GitBook
On this page
  • Remix:
  • Using Ethers.js
  • Using Web3.js
  • RPC End Points

Was this helpful?

  1. Developer Documentation

Developing with Remix, Ethers.js and Web3.js

PreviousIntroduction to Developer DocumentationNextIndex Data with SubQuery

Last updated 3 years ago

Was this helpful?

Ethereum developers are able to use Remix to compile and debug code for Meter. The current EVM version for Meter is Istanbul. MTR is used instead of ETH in Ethereum.

Remix:

Use "Injected Web3" in Remix and properly to deploy on Meter.

Meter also supports ethers.js and web3.js through the RPC endpoints.

Using Ethers.js

In order to get started with the ethers.js library we first need to install it using the following command:

npm install ethers

Once this has been completed the simplest way to start using the library and its' methods is as follows:

const ethers = require('ethers');

// Variables definition
const privKey = '0xPRIVKEY';

// Define Provider
let provider = new ethers.providers.JsonRpcProvider('RPC_URL');

// Create Wallet
let wallet = new ethers.Wallet(privKey, provider);

Please remember to replace the PRIVKEY and RPC_URL with the correct values.

Using Web3.js

You can get started with the web3.js library by installing it with the following command:

npm install web3

Once this has been completed the simplest way to start using the library and its' methods is as follows:

const Web3 = require('web3');

//Create web3 instance
const web3 = new Web3('RPC_URL');

Please remember to set the RPC_URL to the correct RPC endpoint.

RPC End Points

Mainnet: https://rpc.meter.io

Warringstakes Testnet: https://rpctest.meter.io

Private Node: http://node_ip:8545

configure Metamask