Solythesis
Solythesis: Securing Smart Contract with Runtime Validation
Install / Use
/learn @aoli-al/SolythesisREADME
Solythesis: Securing Smart Contract with Runtime Validation
Build Solythesis
- First you need to build
solidity-parser-antlrandsurya
cd solidity-parser-antlr
npm install
cd surya
npm install
-
Then download dependencies by running
npm install -
Generate parser and lexer
npm run antlr4ts -
Download typescript compiler
npm install -g typescript@3.9.4 -
Build the project
tsc --build
Use Solythesis
Solythesis is a novel runtime validation framework for Ethereum smart contracts that works as a source to source Solidity compiler and detects errors at runtime. Solythesis generates an instrumented smart contract from a set of invariants and rejects transactions that violate the invariants.
To run Solythesis compiler, you need to provide the smart contract source file and the constraint.
You can find our preset constraints and benchmark contracts in ./contracts folder.
For example, to generate secured contract for BEC token, you pass the source code of BEC token as the first parameter and the constraint of ERC20 standard as second parameter.
node lib/src/main.js ./contracts/ERC20_BEC.sol ./contracts/ERC20_BEC_constraints.txt
Solythesis will generate two solidity source programs in the same folder as ERC20_BEC.sol:
ERC20_BEC_Solythesis_baseline.sol: the secured smart contract using baseline instrumentation technique.ERC20_BEC_Solythesis.sol: the secured smart contract using delta update.
Related Skills
node-connect
354.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
112.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
354.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
354.3kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
