Skip to content

Official Implementation of "SmartEmbed: A Tool for Clone and Bug Detection in Smart Contracts through Structural Code Embedding" (ICSME 2019).

License

Notifications You must be signed in to change notification settings

vinojjayasundara/smartembed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SmartEmbed Web Tool

SmartEmbed is a web service tool for clone detection & bug detection for smart contracts.

We have published our tool through the following url :

http://www.smartembed.net/

There is a tutorial video introducing how to use SmartEmbed on Youtube:

https://youtu.be/o9ylyOpYFq8

Source data can be downloaded from :

https://drive.google.com/file/d/13iTTpt7gFd9wEW35C2fX4pVT7cVlHgxi/view?usp=sharing

Introduction

This folder contains the code for the SmartEmbed web tool. There are a few important subfolders and files as follows.

  • templates - contains the frontend html files
  • static - contains the css files and js scripts
  • app[dot]py - main flask file, see below for usage.
  • similarity[dot]py and smart_embed[dot]py - Contains the backend codes for clone detection.
  • bug[dot]py and smart_bug[dot]py - Contains the backend codes for bug detection.

Usage

  1. Install requirements.txt with pip install -r requirements.txt.
  2. Please update the FASTTEXT_MODEL and CONTRACT_EMBEDDINGS_PATH to the corresponding work_space directory in the similarity.py lines 10 and 19 respectively.
  3. Run the command python app.py . This will initialize the web tool at localhost:9700, as illustrated below.

image

  1. Paste the smart contract on to the text area and hit Submit.
  2. Clone detection results will be displayed as follows. image
  3. Bug detection results will be displayed as follows. image

Contact

[email protected]
Discussions, suggestions and questions are welcome!

​ ​ ​

About

Official Implementation of "SmartEmbed: A Tool for Clone and Bug Detection in Smart Contracts through Structural Code Embedding" (ICSME 2019).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published