New answers tagged

0 votes

Is there any way to listen smart contract events from nodejs-expressjs server?

use web3.js events listener emitted by smart contract Official docs link -
AMANPREET BAINS's user avatar
0 votes

How to fetch events emitted in a deployment transaction using ethers JS?

Following code will do your work const { ethers } = require("ethers"); const ABI = <Contract ABI> const rpcProvider = new ethers.JsonRpcProvider( <rpc url> ); async function ...
Iresh Madhusankha - DevCresix's user avatar
0 votes

How to call functions or access public mappings from inside of a subgraph?

You can use .bind contract Uniswap V3 subgraph has an example here: let ...
0xh8h's user avatar
  • 155
2 votes

Unable to fetch events using Ethers js

My bad. The deployed contract was an old contract, containing only two parameters in the event, but the instance I was creating had three parameters, producing a wrong filter for the event.
Zartaj Afser's user avatar
  • 2,085
1 vote

Unable to fetch events using Ethers js

The contract hasn't emitted that event yet. The only functions called so far is the createChannel. Try calling updateChannelMeta which emits the UpdateChannel event.
Farrukh Raza's user avatar
2 votes

How to expect a function call to not emit an event in foundry

There isn't way to check if an event is NOT emitted, but for your purpose you can use vm.getRecordedLogs(); and assert that the length of the logs array is 0. function testDoesNotEmit() public { Vm....
Siddharth Bhoite's user avatar

Top 50 recent answers are included