Git Product home page Git Product logo

ethereum-payment-vuejs's Introduction

ethereum-payment-vuejs

Simple Dapp and Vuejs app that manage payments in ether.

The project includes the following modules:

  • Ethereum Dapp to manage payments
  • Shopping cart developed using Vuejs UI framework

In this project you will find:

  • Example of Ethereum smart contract developed in Solidity
  • Example of Vuejs app
  • Example of Vuex for management of state in Vue
  • Example of Vue Router for routing of Vue components

Stack

  • Solidity for smart contracts
  • solcjs for compilation of smart contracts
  • Vuejs as UI Framework (Vuex and Vue Router)
  • Bootstrap as toolkit for styles

Project setup

npm install

Build Dapp smart contracts

npm run dapp:build

Compiles and hot-reloads for development

npm run serve

Run Dapp tests

npm run dapp:test

Structure of the project

/dapp/contracts
Sources of smart contracts (solidity code)

/dapp/build
Json files that contain abi and bytecode generated in the compilation of smart contracts. Use npm run dapp:build for compilation.

/src/views
Vue components. These components are mapped with routes in router.js

/src/domain
Domain classes. In this case, code related with smart contracts in blockchain

/src/components
Vue components.

Usage

It is required to have Metamask plugin installed in browser https://metamask.io/

  1. Create Payments contract from http://localhost:8080/#/payments

Create payments contract

Once the contract is created in Blockchain network it is shown the detail
Payments contract detail

  1. Go to shopping cart. http://localhost:8080/#/shopping

Shopping cart

  1. Add some fruits to the basket and proceed to payment

Proceed to payment

Once the payment transaction is committed in blockchain will be redirected to the detail of payments contract. The detail will show your purchase.

Payment detail

  1. Withdraw funds from the payments contract to the owner account. http://localhost:8080/#/payments

Withdraw

ethereum-payment-vuejs's People

Contributors

joaquin-alfaro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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