Code Monkey home page Code Monkey logo

rust-cevm's Introduction

CompEVM: Rust Ethereum Virtual Machine Implementation designed for Smart Contract Composability testing

Run all of your tests in parallel, using real mainnet chainstate. Roughly 10x faster than dapp tools (HEVM), and significantly less jank* than ganache. No native debugging, but it comes with stack tracing out of the box. Also some other fun stuff in the ui is planned. Gas usage flamegraphs and the like. Tests should be written in solidity for now, but isn't necessary long term. But seriously, write your tests in solidity.

  • Kind of depends on where you want your jank. Right now, interfacing with the underlying is jank, but the backend is fast and reliable. UX is next priority.

Build

To start working with CEVM you'll need to install rustup, then you can do:

$ git clone https://github.com/brockelmore/rust-cevm.git
$ cd rust-cevm
$ cargo build --release --all

Usage

Tbh you probably don't want to use this yet.

But...

If you do:

There are a few different packages included. If you are using this for smart contract testing, you'll use the testing package.

CLI is a WIP. Currently, you have to use the frontend. Its dumb, I know, but c'est la vie. My rpc node is hard coded. plz change b4 using

$ cd ./rust-cevm/testing
$ cargo run --release

In your web browser open up localhost:2347. Type in the absolute path to the contracts directory, hit compile, then after its done compiling, the test contracts (denoted by <your contract> .t.sol) will auto populate the first dropdown. The second dropdown should auto populate with that contract's tests. Hit test. The test will run and load in the stack trace for you to examine.

Expect jank for most of this stuff. Backend is solid, but testing framework isn't and needs work. reach out if you wanna help make testing contracts not suck

License

Apache 2.0

rust-cevm's People

Contributors

sorpaas avatar sjmackenzie avatar mersinvald avatar brockelmore avatar rocky avatar elaineo avatar splix avatar refcell avatar gnunicorn avatar elichai avatar mbrubeck avatar whilei avatar tzdybal avatar

Stargazers

 avatar

Watchers

James Cloos 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.