Coder Social home page Coder Social logo

youtweakit / eth-vue Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dokwufulueze/eth-vue

0.0 1.0 0.0 1.53 MB

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 4, 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.

License: GNU General Public License v3.0

JavaScript 78.54% HTML 0.32% Vue 21.14%

eth-vue's Introduction

eth-vue Truffle Box: Ropsten Network Configuration And Gravatar access



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 4, 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.

With 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

If you have a running Ganache blockchain network, configuring with eth-vue will connect you immediately to the private blockchain. Visit the Ganache page for installation and startup instructions, install Ganache, and eth-vue will connect accordingly.

Simply unbox and start building your own dApp.

Installation

  • Install Truffle

      npm install -g truffle
    

  • Enter your development directory and unbox DOkwufulueze/eth-vue

      truffle unbox DOkwufulueze/eth-vue
    

  • Configure your environment
    • Open the truffle.js file. You'll find the following:

      ...
      module.exports = {
        ...
        networks: {
          development: {
            host: "localhost",
            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
            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
          }
        }
      };
      

      Insert your unlocked account within the double-quotes of the from key

    • Open the src/util/constants.js file. You'll find the following:

      export const NETWORKS = {
        '1': 'Main Net',
        '2': 'Deprecated Morden test network',
        '3': 'Ropsten test network',
        '4': 'Rinkeby test network',
        '42': 'Kovan test network',
        '4447': 'Truffle Develop Network',
        '5777': 'Ganache Blockchain',
        '666': 'Daniel Private Blockchain'
      }
      
      export const APPROVED_NETWORK_ID = '3'
      

      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.
      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'.
      But if your choice network is not on the NETWORKS list, simply add your network using the existing pattern [<networkId>: <networkName>], and change the value of APPROVED_NETWORK_ID to the ID of your choice network.
      If you're using Ganache, please remember to point your Ethereum provider [Metamask, for example] to a Custom RPC running on port 7545.
      For Truffle develop network, point your Ethereum provider [Metamask, for example] to a Custom RPC running on port 9545.


  • Install npm dependencies

      npm install
    

Compilation and Migration

To 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.

Compile and Migrate to your custom network as configured in truffle.js. [For the Ganache Blockchain, it runs on port 7545 and doesn't conflict with any conventional port. So edit your truffle.js file appropriately before deploying]

  • Compile the Contracts

      truffle compile
    

  • Deploy the compiled contracts

      truffle migrate
    

Compile and Migrate to the Ropsten test network [this is very straightforward]

  • Compile the Contracts on Ropsten

      truffle compile --network ropsten
    

  • Deploy the compiled Contracts to Ropsten

      truffle migrate --network ropsten
    

Compile and Migrate using the truffle develop environment


The default port for truffle develop is 9545, so it doesn't conflict with any conventional port. Edit truffle.js appropriately.

  • Enter the truffle develop environment

      truffle develop
    

  • Compile the Contracts

      compile
    

  • Deploy the compiled contracts

      migrate
    

Launch the dApp

  • Start the server

      npm run start
    

  • Open your browser and enter the following:

      localhost:3001
    

And that's it, you're DONE.



Please send bug issues you may encounter to Issues



Copyleft

Copyleft 2017 Daniel Okwufulueze

Licence

This dApp is distributed under the GNU GPL-3.0 licence.

eth-vue's People

Contributors

dokwufulueze avatar onlyonejmjq avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.