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

186
Vistas
Calling a function from a smart contract

I'm making a node app that writes contracts with the Arbitrum api, I have successfully accessed the api, I'm new to node and basically I need to access the Arbitrum website with code and write some contracts, if there's anything unclear ask me to edit the post. my current code:

var Web3 = require('web3');
var web3 = new Web3(new Web3.providers.HttpProvider());
var version = web3.version.api;
var getJSON = require('get-json');

getJSON(
  'https://api.arbiscan.io/api?module=contract&action=getabi&address=0x0000000000000000000000000000000000001004&apikey=YourApiKeyToken',
  function (error, data) {
    var contractABI = '';
    contractABI = JSON.parse(data);
    if (contractABI != '') {
      var MyContract = web3.eth.contract(contractABI);
      var myContractInstance = MyContract.at(
        '0x604cd9df9e73a792feef9877aa53fc25d1b9baa5'
      );
      var result = myContractInstance.memberId(
        '0xfe8ad7dd2f564a877cc23feea6c0a9cc2e783715'
      );
      console.log('result1 : ' + result);
      var result = myContractInstance.members(1);
      console.log('result2 : ' + result);
    } else {
      console.log('Error');
    }
  }
);
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