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

320
Vistas
Web3js : Error when trying to call methods from Angular

I just deployed the most simple NFT contract on the polygon mainnet at "0xda528AccACF4eec33EF21c6078273eBfe52609df". I can mint some token using Alchemy as a web3 provider and I do it in a simple Nodejs app.

Now, I wanted to use an independant Angular app to check if the user own one or more token with Metamask as a web3 provider. I get the provider from window.ethereum after I check that the user is connected to the polygon chain with his Metamask. Whenever I try to call a web3 method such as :

const contract = new this.web3.eth.Contract(HuntingJSON.abi, "0xda528AccACF4eec33EF21c6078273eBfe52609df");
const name = await contract.methods.name().call(function(data: any,error: any) {
      console.log(data);
      console.log(error);
    }); 

I get this kind of error : Uncaught (in promise): TypeError: process.nextTick is not a function

Is it possible to call a contract with a Metamask provider ? I imagined method such as ownerOf(), owner() or name() wouldn't need a sendTransaction, am I wrong ?

On the other side, I can successfully call the JSON RPC API from Metamask or Ethereum such as : window.ethereum.request({method: 'eth_requestAccounts'});

Is there a way to check if a user owns a NFT tokenID with Metamask as a provider ? And how ?

Thank you!

about 4 years ago · Juan Pablo Isaza
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