Web3.js

web3.js

The web3.js library is a JavaScript library designed to facilitate the interaction with nodes on EVM-compatible blockchains such as StratoVM.

Use web3.js for efficient communication with smart contracts on the StratoVM Network.

Installation

To add web3.js to your development environment, install it with the following command:

npm install web3

Configuration

Begin by importing web3.js at the top of your JavaScript file to get started:

const Web3 = require("web3");

Connecting to StratoVM Sepolia Testnet

Create a link to the StratoVM Sepolia network by instantiating a web3.js object, targeting the RPC endpoint of an StratoVM node:

const Web3 = require("web3"); 
// For StratoVM Sepolia Testnet
//const web3 = new Web3("https://rpc.stratovm.io"); 

Last updated