Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

149
Views
Ethers contract on method "No mathing event" error

I just started learning ethers, here is my code:

(async () => {
  const connection = new ethers.providers.JsonRpcProvider(
    "https://mainnet.infura.io/v3/key"
  );

  const contract = new ethers.Contract(
    "0x7be8076f4ea4a4ad08075c2508e481d6c946d12b",
    abi,
    connection
  );

  contract.on("atomicMatch_", (...args) => {
    console.log(args);
  });
})();

so the contract is opensea main contract - link I would like to listen to sales transactions/events. As I see in the contract name of that event is probably Atomic Match_ or atomicMatch_ in ABI. For ABI I just copy pasted whole contract to https://remix.ethereum.org/ website and copied abi code. The problem is I am getting this error now:

Error: no matching event (argument="name", value="atomicMatch_", code=INVALID_ARGUMENT, version=abi/5.5.0)

What is wrong here? I tried both names of event but I get the same error over and over...

@edit here is sandbox for it, what is weird when I change event name to OrdersMatched for example it works totally fine...

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Ethers contract.on() (docs) is invoked when an event with the specified name is emitted.

Your snippet is passing a function name (atomicMatch_), not an event name.

The atomicMatch_ function effectively emits the event named OrdersMatched. That's why changing the handler to contract.on('OrdersMatched') fixes the issue.


Also, the sandbox is using a built-in provider under the getDefaultProvider(), which is communicating with the app over WSS. Your snippet is using a HTTPS provider that is by design unable to listen to events. You'll need to use a WSS provider as well (they are supported by Infura).

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!