Code Monkey home page Code Monkey logo

revela's Introduction

Revela Decompiler is a tool to decompile Move smart contracts from low-level bytecode form back to high-level source code.

Revela is also available online at revela.verichains.io. Currently our decompiler is compatible with Aptos blockchain.

About Us

Verichains is a leading blockchain security provider specializing in cryptanalysis, audits, and app security.

Background

The groundbreaking Move language for smart contracts is revolutionizing the development of secure and resilient blockchains like Aptos. As contracts become more complex and play a vital role in safeguarding digital assets, it is essential to provide users with the means to verify the safety of the underlying code. Unfortunately, it becomes common to see Move-based protocols deployed solely in low-level bytecode form, without accompanying source code. This practice not only obfuscates the smart contracts’ functionality but also presents a significant barrier to security analysis, given that Move is a relatively new language and lacks tooling to easily analyze Move contracts.

In response to this challenge, Verichains has worked with Aptos Labs to develop Revela, the first-ever open-source tool designed to decompile Move bytecode back to its original source code, which can then be fed into the Move compiler once again. By empowering users to independently verify and analyze contract code, Revela establishes new industry standards for security, openness, and trust in the Aptos ecosystem.

Build

Revela requires Rust compiler to build. From the root directory, execute the following command.

$ cargo build -p revela

The resulted binary revela can be found under the directory target/debug.

Install

Run the following command to install Revela.

$ cargo install --path third_party/move/tools/revela

On MacOS and Linux, Revela is typically installed in directory ~/.cargo/bin. Ensure to have this path in your PATH environment variable so Revela can be executed from any location. This step can be done with the below command.

$ export PATH=~/.cargo/bin:$PATH

Usage

To decompile a Move bytecode file, pass its file path as a command line argument using --bytecode (or -b), as shown below.

$ revela --bytecode <file_path>

For example:

$ revela --bytecode third_party/move/tools/revela/tests/bytecode/BasicCoin.mv

License

Revela is released under the open source Apache License

revela's People

Contributors

gregnazario avatar davidiw avatar joshlind avatar msmouse avatar bmwill avatar rustielin avatar zekun000 avatar banool avatar wrwg avatar meng-xu-cs avatar dependabot[bot] avatar clay-aptos avatar phlip9 avatar huitseeker avatar lightmark avatar vgao1996 avatar xli avatar sblackshear avatar sherry-x avatar rexhoffman avatar dependabot-preview[bot] avatar zacharydenton avatar sunshowers avatar igor-aptos avatar movekevin avatar junkil-park avatar geekflyer avatar capcap avatar ibalajiarun avatar bchocho 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.