DOkwufulueze / eth-vue

Featured in Awesome Vue [https://github.com/vuejs/awesome-vue], a curated list maintained by vuejs of awesome things related to the Vue.js framework, and Awesome List [https://awesomelists.net/150-Vue.js/3863-Open+Source/18749-DOkwufulueze-eth-vue], this Truffle Box provides everything you need to quickly build Ethereum dApps that have authentication features with vue, including configuration for easy deployment to the Ropsten Network. It's also Gravatar-enabled. Connecting to a running Ganache blockchain network from Truffle is also possible -- for fast development and testing purposes. Built on Truffle 5 and Vue 3, eth-vue uses vuex for state management, vuex-persist for local storage of app state, and vue-router for routing. Authentication functionalities are handled by Smart Contracts running on the Ethereum blockchain.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Network config for Truffle / Ganache

mattdunndc opened this issue · comments

Just starting out. Can't seem to connect to Ganache on 7545. Does network_id need to be 5777 for Ganache? What unlocked acccount needs to be in the from property?

module.exports = {
...
networks: {
development: {
host: "localhost",
port: 7545,
network_id: "*", // Match any network id. You may need to replace * with your network Id
from: "", // Add your unlocked account within the double quotes
gas: 4444444
}
}

Getting this :
Uncaught TypeError: Cannot read property 'isListening' of undefined
at eval (webpack-internal:///./src/util/web3/getWeb3.js:13)

Hi @mattdunndc
Getting the same error, were you able to solve it ??

same error here
It has several reasons

  1. Box do not integrate well with new metamask which requires website approval to expose web3

Code like


 if (window.ethereum) {
    var web3 = new Web3(ethereum);
    try {
      var ret = ethereum.enable();
      ret.then(()=>{
        res(window.web3); 
      }).catch((err)=>{
        rej(err);
      })
    } catch (error) {
      rej(error);
    }
  } else if (window.web3) { // Legacy dapp browsers...
    var web3 = new Web3(web3.currentProvider);
    res(web3);
  } else { // Non-dapp browsers...
    console.log('Non-Ethereum browser detected. You should consider trying MetaMask!');
  }

Is required instead of currently existing

I see no dependency on web3 1.0 in package.json

commented

Currently running the box against my local ganache testnet and your config looks good.

The from address is the address you'd like to deploy the contracts from, this will consume ETH via gas costs so you will need to be auth'd with a web3 provider like metamask against your local testnet in order to deploy the contracts.

You can set up metamask to connect to your private ganache testnet by clicking the dropdown at the top of metamask where you'll be able to select Custom RPC and plug in your ganache server values. In Ganache under accounts, you should be able to grab an address and use the private key to access it. Once you're logged in via metamask, add your address to the from field in truffle.js, and try running truffle migrate again.

This issue is resolved by new updates to eth-vue. See here.

Closing.