Websocket URL to Listen to Smart Contract Events
Budget: $10 – $30 USD
I have a NodeJs code that has the following lines:
const websocketURL = "ws://65.108.199.222:8548";
const provider = new ethers.providers.WebSocketProvider(websocketURL);
const predictionAbi = require('./abis/predictionAbi.json');
const oracleAbi = require('./abis/oracleAbi.json');
const contractABI = require('./contract.json');
const p_contract = new ethers.Contract(configs._router, predictionAbi, provider);
p_contract.on("StartRound", async (epoch) => {
// Do something
});
The code crashes with a timeout exception.
Help me find another web socket URL that can work.
const websocketURL = "ws://65.108.199.222:8548";
const provider = new ethers.providers.WebSocketProvider(websocketURL);
const predictionAbi = require('./abis/predictionAbi.json');
const oracleAbi = require('./abis/oracleAbi.json');
const contractABI = require('./contract.json');
const p_contract = new ethers.Contract(configs._router, predictionAbi, provider);
p_contract.on("StartRound", async (epoch) => {
// Do something
});
The code crashes with a timeout exception.
Help me find another web socket URL that can work.