TAGS

eth-vue

CREATED

UPDATED

STARS

INSTALL

...

REPOSITORY
GitHub Download
Please wait: Fetching readme...

b'[![Made in Nigeria](https://img.shields.io/badge/made%20in-nigeria-008751.svg?style=flat-square)](https://github.com/acekyd/made-in-nigeria)\n## eth-vue Truffle Box: With Ganache Blockchain Option, Ropsten Network Configuration, and Gravatar access\n

\n![eth-vue](https://raw.githubusercontent.com/DOkwufulueze/eth-vue/master/box-img-lg.png)\n\nThis Truffle Box provides everything you need to quickly build Ethereum dApps that have authentication features with [Vue 3](https://github.com/vuejs/vue-next), including configuration for easy deployment to the Ropsten Network. It\'s also Gravatar-enabled. Connecting to a running [Ganache](https://github.com/trufflesuite/ganache) blockchain network from Truffle is also possible -- for fast development and testing purposes.
\nBuilt on [Truffle 5](https://github.com/trufflesuite/truffle/releases), [eth-vue](https://github.com/DOkwufulueze/eth-vue) uses [vuex](https://github.com/vuejs/vuex) for state management, [vuex-persist](https://github.com/championswimmer/vuex-persist) for local storage of app state, and [vue-router](https://github.com/vuejs/vue-router) for routing.\nAuthentication functionalities are handled by Smart Contracts running on the Ethereum blockchain.\n\nWith deployment configuration for the Ropsten Network, deployment to the remote test network doesn\'t have to be a pain anymore. It\'s now as simple as `truffle migrate --network ropsten`\n\nIf you have a running Ganache blockchain network, configuring with [eth-vue](https://github.com/DOkwufulueze/eth-vue) will connect you immediately to the private blockchain. Visit the [Ganache](https://github.com/trufflesuite/ganache) page for installation and startup instructions, install Ganache, and [eth-vue](https://github.com/DOkwufulueze/eth-vue) will connect accordingly.\n\nSimply unbox and start building your own dApp.\n\n## Installation\n- Install Truffle\n\n yarn global add truffle\n\n
\n\n###### NOTE: If unboxing DOkwufulueze/eth-vue had failed previously due to absence of node-gyp, simply run `yarn global add node-gyp`. Or if it failed due to a problem with an existing node-gyp, run `node-gyp rebuild`. Else ignore this note and move on to the next instruction\n\n
\n\n- Enter your development directory [eg. cd into a newly created `eth-vue` directory] and unbox `DOkwufulueze/eth-vue`\n\n truffle unbox DOkwufulueze/eth-vue\n Or clone this repository from GitHub and `cd` into the `eth-vue` directory:\n\n git clone https://github.com/DOkwufulueze/eth-vue.git\n\n
\n\n- Configure your environment\n - Open the `truffle.js` file. You\'ll find the following:\n\n ...\n module.exports = {\n ...\n networks: {\n development: {\n host: "localhost",\n port: 8545, // This is the conventional port. If you\'re using the Ganache Blockchain, change port value to the Ganache default port 7545. If you\'re using Truffle develop network, change port value to 9545\n network_id: "*", // Match any network id. You may need to replace * with your network Id\n from: "", // Add your unlocked account within the double quotes\n gas: 4444444\n }\n }\n };\n Insert your unlocked account within the double-quotes of the `from` key\n\n - Open the `src/util/constants.js` file. You\'ll find the following:\n\n export const NETWORKS = {\n \'1\': \'Main Net\',\n \'2\': \'Deprecated Morden test network\',\n \'3\': \'Ropsten test network\',\n \'4\': \'Rinkeby test network\',\n \'42\': \'Kovan test network\',\n \'4447\': \'Truffle Develop Network\',\n \'5777\': \'Ganache Blockchain\',\n \'666\': \'Daniel Private Blockchain\' // This is a test private blockchain. You can change it to your own private blockchain if you have one.\n };\n\n export const APPROVED_NETWORK_ID = "3"; // Default is Ropsten. Set as you choose\n ...\n\n The default network above is the Ropsten network [`APPROVED_NETWORK_ID = \'3\'`], but you can change this, as Ropsten was chosen for testing purpose only.
\n If your choice network is on the list of `NETWORKS` but is not Ropsten, then change the value of `APPROVED_NETWORK_ID` to the ID of your choice network. For example, if one is to use the private Blockchain above [`\'666\': \'Daniel Private Blockchain\'`], then `APPROVED_NETWORK_ID` would be `\'666\'`.
\n But if your choice network is not on the `NETWORKS` list, simply add your network using the existing pattern [`: `], and change the value of `APPROVED_NETWORK_ID` to the ID of your choice network.
\n If you\'re using Ganache, please remember to point your Ethereum provider [Metamask, for example] to a Custom RPC running on port 7545.
\n For Truffle develop network, point your Ethereum provider [Metamask, for example] to a Custom RPC running on port 9545.\n
\n\n- Install dependencies if necessary.\n\n ###### NOTE: If you unboxed this boilerplate from Truffle [`truffle unbox DOkwufulueze/eth-vue`], then running `yarn install` is not necessary since unboxing installs dependencies by default. But if you cloned this boilerplate from GitHub [`git clone https://github.com/DOkwufulueze/eth-vue.git`], please run `yarn install` as stated below\n\n yarn install\n
\n\n## Compilation and Migration\nTo deploy the contracts, you can either compile and migrate to your custom network as configured in the `truffle.js` file or you could use the test network and test addresses that truffle 4 provides. Find details for both deployment processes below.\n\n### Compile and Migrate to your custom network as configured in `truffle.js`. [For the [Ganache](https://github.com/trufflesuite/ganache) Blockchain, it runs on port 7545 and doesn\'t conflict with any conventional port. So edit your `truffle.js` file appropriately before deploying]\n\n- Compile the Contracts [remember to add the `--network ropsten` option if you didn\'t change the `APPROVED_NETWORK_ID` in `src/util/constants.js` from the default `3` to another id]\n\n truffle compile\n
\n\n- Deploy the compiled contracts [remember to add the `--network ropsten` option if you didn\'t change the `APPROVED_NETWORK_ID` in `src/util/constants.js` from the default `3` to another id]\n\n truffle migrate\n
\n\n### Compile and Migrate to the Ropsten test network [this is very straightforward]\n\n- Compile the Contracts on Ropsten\n\n truffle compile --network ropsten\n
\n\n- Deploy the compiled Contracts to Ropsten\n\n truffle migrate --network ropsten\n
\n\n### Compile and Migrate using the `truffle develop` environment\n
\n\nThe default port for `truffle develop` is 9545, so it doesn\'t conflict with any conventional port. Edit `truffle.js` appropriately.\n- Enter the `truffle develop` environment\n\n truffle develop\n
\n\n- Compile the Contracts\n\n compile\n
\n\n- Deploy the compiled contracts\n\n migrate\n
\n\n## Launch the dApp\n- Start the server\n\n yarn start\n
\n\n- The `eth-vue` DApp should now be running on http://localhost:3001 as you can see from your browser.\n\n## And that\'s it, you\'re DONE!\n\n

\n### Please send bug issues you may encounter to [Issues](https://github.com/DOkwufulueze/eth-vue/issues)\n

\n## Copyleft\n![Copyleft](https://raw.githubusercontent.com/DOkwufulueze/eth-vue/master/static/images/copyleft.png) 2017 Daniel Okwufulueze\n

\n## Licence\nThis dApp is distributed under the [GNU GPL-3.0](https://github.com/DOkwufulueze/eth-vue/blob/master/LICENCE.md) licence.\n'