I created 2 nodes . I connect an accounts to metamask. I connect the smart contract with remix on the node. Now i am trying to connect frontend with the smart contract with web3. In the index.html i write :
if (typeof web3 !== 'undefined') { web3 = new Web3(web3.currentProvider);
// set the provider you want from Web3.providers web3 = new Web3(new Web3.providers.HttpProvider("http://ip:8545"));
and then i run in my browser th index.html but i press buttons and nothing.