re-blockchain

Decompile EVM smart contract bytecode and analyze vulnerabilities using cast, panoramix, and web3.py.

64|9|Updated Aug 17, 2026
One-click install
npx skills add https://github.com/dslsdzc/rev-skills --skill re-blockchain-dslsdzc
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: re-blockchain
Source: https://github.com/dslsdzc/rev-skills/tree/main/.claude/skills/re-blockchain
Command: npx skills add https://github.com/dslsdzc/rev-skills --skill re-blockchain-dslsdzc

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires web3, panoramix-decompiler, pyevmasm, solc-select.

What problem does it solve? Reverse engineering smart contracts without source code is difficult: on-chain bytecode has no symbols, types, or function names. This Skill provides a structured workflow to recover ABI signatures, decompile bytecode, reconstruct storage layouts, and audit contracts for vulnerabilities like reentrancy, integer overflow, and missing access control. ## Core Features & Use Cases - Bytecode Acquisition & ABI Recovery: Fetch runtime bytecode via cast code, extract PUSH4 function selectors, and resolve signatures against 4byte.directory/etherface. - Decompilation & Disassembly: Use panoramix for pseudocode and cast disassemble for instruction-level ground truth, with cross-validation between the two. - Storage Layout Reconstruction: Read on-chain storage slots with cast storage, apply keccak256 slot derivation for mappings and dynamic arrays, and handle EIP-1967 proxy contracts. - Vulnerability Analysis: Detect reentrancy, integer overflow, and permission flaws, with optional echidna fuzzing and hevm symbolic execution for behavioral verification. - Use Case: Given only a contract address suspected of being a scam token, pull its bytecode, recover the ABI, decompile the transfer logic, and identify hidden owner-only mint or fee functions. ## Quick Start Analyze the smart contract at address 0xDEAD... by fetching its bytecode, recovering the ABI, decompiling it, and checking for reentrancy and access-control vulnerabilities.

Frequently Asked Questions about re-blockchain

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I decompile EVM smart contract bytecode without source code?▼

Fetch the runtime bytecode with cast code, then run panoramix on the hex for pseudocode and cast disassemble for exact instructions. Treat pseudocode as a rough map and verify critical functions at the instruction level.

How to recover function signatures from contract bytecode?▼

Extract PUSH4 constants from the disassembly to get 4-byte selectors, then resolve them with cast 4byte against signature databases. Disambiguate collisions using CALLDATASIZE checks, fallback logic, and storage access patterns.

What tools are needed for EVM contract reverse engineering?▼

The core toolchain is foundry's cast for on-chain interaction and disassembly, panoramix for decompilation, pyevmasm for disassembly, and web3.py for scripted analysis. Echidna and hevm are optional for fuzzing and symbolic execution.

Why does my decompiled contract only show a fallback and delegatecall?▼

The contract is likely an upgradeable proxy storing logic in a separate implementation contract. Read the EIP-1967 implementation slot with cast storage, then fetch and analyze the implementation address bytecode instead.

Can this approach analyze Solana or Move contracts?▼

Yes, the same decompile-then-audit workflow applies, but the tooling differs: Solana BPF bytecode uses llvm-objdump, and Move bytecode uses the move disassembler. Account and resource model differences require separate vulnerability reasoning.

When should I not use bytecode decompilation for contract analysis?▼

When verified Solidity source is available and unobfuscated, reading the source directly is more accurate. Bytecode analysis targets sourceless contracts, and WASM-based chains require a different instruction-set workflow.