Skip to content

Latest commit

 

History

History
48 lines (30 loc) · 2.18 KB

File metadata and controls

48 lines (30 loc) · 2.18 KB

Smart-contract Verifier

Smart-contract-verifier - service for verification of EVM based contracts. Ideologically, it accepts bytecode to be verified and potential source files as input and returns whether those files and bytecode correspond to each other.

The service consists of 2 parts, a verification library and a transport layer that serves requests:

For now, only REST API over HTTP is available as the transport layer. However, the transport protocol is not limited to our implementation, and you could implement your own APIs using the library crate.

Build

There are several ways to run the service discussed below.

Note: as we have only the HTTP server, we use it for descriptive purposes; in case of a custom API implementation, you should change smart-contract-verifier-http to the corresponding values.

Using docker

You can build the provided sources using Dockerfile or docker-compose files.

Alternatively, you can use docker images from our registry

Building from source

Install rustup from rustup.rs.

git clone [email protected]:blockscout/blockscout-rs.git
cd blockscout-rs/smart-contract-verifier
cargo build --release --bin smart-contract-verifier-http

You can find the built binary in target/release/ folder.

Installing through cargo

Another way to install the binary without cloning the repository is to use cargo straightway:

cargo install --git https://github.com/blockscout/blockscout-rs smart-contract-verifier-http

In that case, you can run the binary using just smart-contract-verifier-http.

Start

For the details of how to run the service, go into corresponding transport protocol layer description: