Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

182
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda