callViewContractFunction

Function using for call view function from contract

This function using web3.js Library only

Input parameters

// JavaScript

const tx = {
     from: '0x8c32D410c843A41db54408099ab3fd92C8434aa8', // option
     to: '0x8c32D410c843A41db54408099ab3fd92C8434aa8', // required
     contractabi: [], // required
     function: 'owner', // required
     args: [], // required
     rpc: '', // option
}

Using

// JavaScript

const data = await callViewContractFunction(tx)

Return

Return data from contract function

Last updated