Skip to content

dApp on Ethereum for buying and selling any goods through escrow smart contracts

Notifications You must be signed in to change notification settings

staddle/verbose-broccoli

Repository files navigation

verbose-broccoli

Broccoli is a decentralized Application (dApp) for the Ethereum Virtual Machine (EVM), able to be run on a blockchain itself. It provides a smart contract using an escrow system for buying and selling any goods.
The frontend is developed with Vue and TypeScript and makes it possible to interact with the smart contract through an easy-to-use webpage.

Deploying

Package management is done by npm.
First, install the dependencies:

npm install

Start the webserver on localhost:

npm run dev

The smart contract is located in the directory ethereum-contract. It consists of a truffle project for deploying and testing.
First, change into the directory:

cd ethereum-contract

Check the truffle-config.js file. It describes how truffle should handle deployment. Check out the truffle docs for syntax and examples.

Compile the contract:

truffle compile

For dev usage, start truffles own blockchain instance:

truffle develop

Deploy the contract:

truffle migrate

Or: test the contract:

truffle test

Testing the contract can also be called from the projects root directory through npm run test:truffle

===============================================================

Recommended IDE Setup

VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).

Type Support for .vue Imports in TS

TypeScript cannot handle type information for .vue imports by default, so we replace the tsc CLI with vue-tsc for type checking. In editors, we need TypeScript Vue Plugin (Volar) to make the TypeScript language service aware of .vue types.

If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a Take Over Mode that is more performant. You can enable it by the following steps:

  1. Disable the built-in TypeScript Extension
    1. Run Extensions: Show Built-in Extensions from VSCode's command palette
    2. Find TypeScript and JavaScript Language Features, right click and select Disable (Workspace)
  2. Reload the VSCode window by running Developer: Reload Window from the command palette.

Customize configuration

See Vite Configuration Reference.

Project Setup

npm install

Compile and Hot-Reload for Development

npm run dev

Type-Check, Compile and Minify for Production

npm run build

Run Unit Tests with Vitest

npm run test:unit

Run End-to-End Tests with Cypress

npm run build
npm run test:e2e # or `npm run test:e2e:ci` for headless testing

Lint with ESLint

npm run lint

About

dApp on Ethereum for buying and selling any goods through escrow smart contracts

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published