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

252
Views
jQuery variable is not defined - web3js with jQuery

This is my jQuery script to interact with Smart Contract:

$(document).ready(function () {

    const abi = [
    #ABI HERE
    ];
    const scAddress = "#ADDRESS HERE";

    const web3 = new Web3('http://127.0.0.1:9545');
    window.ethereum.enable();

    var contractMM = new web3.eth.Contract(abi, scAddress);
    console.log(contractMM);

In the console, it can log the contractMM but when I call function like:

contractMM.methods.name().call()

It shows

Uncaught ReferenceError: contractMM is not defined
    at <anonymous>:1:1

Can anyone help me with this?

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!