I added a new function exampleFunc
in solidity the mycontract.json
file gets updated with that function with public visibility but web3.eth.contract(abiArray).at(address);
does not contains the newly added function.
var con = require('../../build/contracts/MyContract.json');
var keys = Object.keys(con.networks);
var address = con.networks[keys[keys.length-1]].address;
var abiArray = con.abi;
componentDidMount(){
const web3 = new Web3(window.web3.currentProvider);
this.instance = web3.eth.contract(abiArray).at(address);
console.log(this.instance);
}