Giter VIP home page Giter VIP logo

smart-contracts's Introduction

SmartContracts - The FSolidM framework

This repository contains the implementation of the FSolidM framework, which allows designing and generating secure Solidity smart contracts. FSolidM is built on WebGME.

Contents

  1. What is FSolidM?
  2. How to install FSolidM?

What is FSolidM?

The adoption of blockchain-based distributed computation platforms is growing fast. Some of these platforms, such as Ethereum, provide support for implementing smart contracts, which are envisioned to have novel applications in a broad range of areas, including finance and Internet-of-Things. However, a significant number of smart contracts deployed in practice suffer from security vulnerabilities, which enable malicious users to steal assets from a contract or to cause damage. Vulnerabilities present a serious issue since contracts may handle financial assets of considerable value, and contract bugs are non-fixable by design.

To help developers create more secure smart contracts, we introduce FSolidM, a framework rooted in rigorous semantics for designing contracts as Finite State Machines (FSM). We present a design studio for creating FSM on an easy-to-use graphical interface and for automatically generating Ethereum contracts. We have integrated in FSolidM a set of design patterns, which we implement as plugins that developers can easily add to their contracts to enhance security and functionality.

How to install FSolidM?

First, install the following:

On Ubuntu, you also need to install npm and nodes-legacy using apt.

To clone the repository, first install (if necessary):

and then clone the repository in your preferred directory, for example:

cd /home/$USER
git clone https://github.com/anmavrid/smart-contracts.git

This makes the 'project root' for the git repo /home/$USER/smart-contracts.

Install packages with npm in the project root (smart-contracts):

cd /home/$USER/smart-contracts
npm install
npm install webgme
npm install -g bower
bower install

Start mongodb locally by running the mongod executable in your mongodb installation (you may need to create a data directory or set --dbpath). For example:

cd /home/$USER
mkdir sc_data
mongod --dbpath ./sc_data

wait until you see a line that says "[initandlisten] waiting for connections on port 27017".

Then, in a new terminal window, run npm start from the project root (smart-contracts) to start. For example:

cd /home/$USER/smart-contracts
npm start

After the webgme server is up and there are no error messages in the console, open a valid address in the browser to start using the Smart Contracts. The default is http://127.0.0.1:8888/, you should see all valid addresses in the console.

Click Create New… to create a new project. After entering a project name of your choice, import the seed SC to start working on smart contracts!

smart-contracts's People

Contributors

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