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

319
Views
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
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!