Giter Site home page Giter Site logo

ansfatani / vue-truffle-starter-dapp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from marlowl/vue-truffle-starter-dapp

0.0 0.0 0.0 875 KB

Vue CLI Starter Dapp, using TypeScript, Truffle 5 and Web3

License: MIT License

JavaScript 27.75% HTML 5.05% Vue 46.02% TypeScript 21.18%

vue-truffle-starter-dapp's Introduction

Vue Truffle Starter dApp

This project was generated with vue-cli version 3.2.1

An Vue truffle starter dApp. Write, compile & deploy smart contracts for Ethereum.

Sample contract is deployed on the Ropsten testnetwork

Demo

Update a value of a smart contract with your Ethereum wallet address

Project setup

MetaMask and Infura account are both required for this project to work!

MetaMask

I would like to refer to this article for a simple tutorial on how to setup MetaMask and get some free test Ether on your Ropsten account! After that you have your ETH address you need for the .env file

Infura

Infura is a hosted Ethereum node cluster that lets you run your application without requiring them to set up their own Ethereum node or wallet. Register an account here and require your API key you need for the .env file!

Get ganache-cli and truffle running on your environment

npm install -g truffle ganache-cli

Start ganache-cli

ganache-cli

After running this command you should be able to find your MNEMONIC you need for the .env file

Install dependencies

git clone https://github.com/marlowl/vue-truffle-starter-dapp/
npm install

Update the .env file

VUE_APP_ETHADDRESS= "your ETH address"
MNEMONIC= "your ganache MNEMONIC"
INFURA_API_KEY= "your infura key"

Run the development server

npm run serve

Compile your own smart contracts

Add your smart contract to the /contracts folder

Compile the contract

truffle compile

Migrate your contract to the ropsten network

truffle migrate --network ropsten

Change the current address to your deployed contract address

    let myContract = new web3.eth.Contract(
      MyContract.abi,
      "Your deployed contract address"
    );

vue-truffle-starter-dapp's People

Contributors

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