MCPcopy Index your code
hub / github.com/ConsenSysDiligence/scribble

github.com/ConsenSysDiligence/scribble @v0.7.10

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.7.10 ↗ · + Follow
764 symbols 1,941 edges 99 files 84 documented · 11%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

NodeJS CI Coverage Documentation npm npm downloads License

A Solidity runtime verification tool for property based testing.

[!TIP] Scribble is useful to prepare smart contracts for behavior verification with Diligence Fuzzing or with tools, such as Mythril.

Here are some related videos:

Principles and Design Goals

The design of the Scribble specification language takes inspiration from several existing languages and we expect the language to evolve gradually as we gain more experience in using it. We rely on the following principles and design goals to guide language evolution:

  1. Specifications are easy to understand by developers and auditors
  2. Specifications are simple to reason about
  3. Specifications can be efficiently checked using off-the-shelf analysis tools
  4. A small number of core specification constructs are sufficient to express and reason about more advanced constructs

We are aware that this will make it difficult or impossible to express certain properties. We encourage users to reach out if they encounter such properties. However, it is not our itention to support every property imaginable. We consider it a great success if Scribble is able to capture 95% of the properties that users want to express.

Usage

Install Scribble with npm:

npm install -g eth-scribble

Use CLI tool with the Solidity source file:

scribble sample.sol

Use --help to see all available features.

Extension for VS Code

There is a Scribble extension for VSCode that enhances user experience: prividing syntax highlight, hints-on-hover and other features.

Note that it is maintained in separate repostory. Report extension-related suggestions and issues there.

Documentation

For more information on the Scribble specification language, and any other documentation, go to: Scribble Documentation

Development installation

Prerequisites

Preinstall NodeJS of compatible version. If there is a need to run different NodeJS versions, consider using NVM or similar tool for your platform.

Clone and build

Clone repository, install and link:

git clone https://github.com/ConsenSys/scribble.git
cd scribble/
npm install
npm link

Prior to running the tests it would be better to setup local compiler cache:

scribble --download-compilers native wasm

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Function 359
Method 213
Class 168
Interface 19
Enum 5

Languages

TypeScript100%

Modules by API surface

src/spec-lang/tc/typecheck.ts88 symbols
src/instrumenter/instrumentation_context.ts76 symbols
src/instrumenter/annotations.ts41 symbols
src/instrumenter/transpiling_context.ts37 symbols
src/instrumenter/utils.ts30 symbols
src/instrumenter/instrument.ts30 symbols
test/integration/vm.ts29 symbols
src/spec-lang/tc/semcheck.ts23 symbols
src/instrumenter/state_var_instrumenter.ts22 symbols
src/util/misc.ts20 symbols
src/bin/scribble.ts20 symbols
src/instrumenter/custom_maps_templates.ts19 symbols

For agents

$ claude mcp add scribble \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page