Skip to main content

Web3.js

What is Web3.js?

Web3.js is a collection of tools that enable programmers to communicate with Ethereum nodes through HTTP, IPC, or WebSocket protocols using JavaScript. Manta Pacific has a similar API, which can be used with the same JSON RPC calls as Ethereum, allowing developers to utilize the Web3.js library to interact with a Manta Pacific node as if it were Ethereum.

Getting Started with Web3.js

  1. Create a JavaScript Project to store all of the files you'll be creating mkdir web3-examples && cd web3-examples

  2. Install the Ethers.js library and the Solidity compiler npm install web3 solc@0.8.0

  3. Setup Web3.js with Manta Pacific chain

    const Web3 = require('web3');

    // Create Web3 instance
    const web3 = new Web3("RPC URL"); // Insert your RPC URL here

Web3.js Documentation