✓ Verified 🌐 Web Scrapers ✓ Enhanced Data

Sui Decompile

Fetch on-chain Sui Move contract source code and let your agent explain how smart contracts work.

Rating
4.5 (330 reviews)
Downloads
9,660 downloads
Version
1.0.0

Overview

Fetch on-chain Sui Move contract source code and let your agent explain how smart contracts work.

Complete Documentation

View Source →

Sui Decompile Skill

Fetch decompiled source code for on-chain Sui Move packages via block explorers.

GitHub:

Suivision (Preferred)

May have official verified source code when available.

text
URL: https://suivision.xyz/package/{package_id}?tab=Code

Browser workflow:

  • browser action=open profile=openclaw targetUrl="https://suivision.xyz/package/{package_id}?tab=Code"
  • Click module tabs on the left if multiple modules exist
  • Extract code:
javascript
() => {
  const rows = document.querySelectorAll('table tr');
  const lines = [];
  rows.forEach(r => {
    const cells = r.querySelectorAll('td');
    if (cells.length >= 2) lines.push(cells[1].textContent);
  });
  return lines.join('\n');
}

Suiscan (Alternative)

text
URL: https://suiscan.xyz/mainnet/object/{package_id}/contracts

Browser workflow:

  • browser action=open profile=openclaw targetUrl="https://suiscan.xyz/mainnet/object/{package_id}/contracts"
  • Click "Source" tab (default may show Bytecode)
  • Click module tabs if multiple modules
  • Extract code:
javascript
() => {
  const rows = document.querySelectorAll('table tr');
  const lines = [];
  rows.forEach(r => {
    const cells = r.querySelectorAll('td');
    if (cells.length >= 2) lines.push(cells[1].textContent);
  });
  return lines.join('\n') || 'not found';
}

Multiple Modules

Packages like DeepBook (0xdee9) have multiple modules:

  • List module tabs from sidebar
  • Click each tab, extract code
  • Save to separate .move files

Examples

PackageSuivisionSuiscan
Sui Frameworksuivision.xyz/package/0x2?tab=Codesuiscan.xyz/mainnet/object/0x2/contracts
DeepBooksuivision.xyz/package/0xdee9?tab=Codesuiscan.xyz/mainnet/object/0xdee9/contracts

Use with Other Skills

This skill works great with the Sui development skill suite:

  • sui-move: Write and deploy Move smart contracts. Use sui-decompile to study existing contracts, then use sui-move to write your own.
  • sui-coverage: Analyze test coverage. Decompile a contract, write tests for it, then check coverage.
Typical workflow:
  • sui-decompile - Study how a DeFi protocol works
  • sui-move - Write your own contract based on learned patterns
  • sui-coverage - Ensure your code is well-tested

Server/Headless Setup

For running on servers without display (CI/CD, VPS, etc.), use Puppeteer with a virtual display to avoid headless detection:

bash
# Install xvfb (virtual framebuffer)
sudo apt-get install xvfb

# Run with virtual display (avoids headless detection)
xvfb-run --auto-servernum node scraper.js

Puppeteer example:

javascript
const puppeteer = require('puppeteer');

async function fetchContractSource(packageId) {
  const browser = await puppeteer.launch({
    headless: false,  // Use 'new' headless or false with xvfb
    args: ['--no-sandbox', '--disable-setuid-sandbox']
  });
  
  const page = await browser.newPage();
  await page.goto(`https://suivision.xyz/package/${packageId}?tab=Code`);
  await page.waitForSelector('table tr');
  
  const code = await page.evaluate(() => {
    const rows = document.querySelectorAll('table tr');
    const lines = [];
    rows.forEach(r => {
      const cells = r.querySelectorAll('td');
      if (cells.length >= 2) lines.push(cells[1].textContent);
    });
    return lines.join('\n');
  });
  
  await browser.close();
  return code;
}

Why xvfb? Some sites detect headless browsers. Running with xvfb-run creates a virtual display, making the browser behave like a real desktop browser.

Notes

  • Suivision may show official verified source (MovebitAudit)
  • Suiscan shows Revela decompiled code
  • Decompiled code may not compile directly
  • Close browser tabs after use!

Related Skills

This skill is part of the Sui development skill suite:

SkillDescription
sui-decompileFetch and read on-chain contract source code
sui-moveWrite and deploy Move smart contracts
sui-coverageAnalyze test coverage with security analysis
sui-agent-walletBuild and test DApps frontend
Workflow:
text
sui-decompile → sui-move → sui-coverage → sui-agent-wallet
    Study        Write      Test & Audit   Build DApps

All skills:

Installation

Terminal bash

openclaw install sui-decompile
    
Copied!

💻Code Examples

URL: https://suivision.xyz/package/{package_id}?tab=Code

url-httpssuivisionxyzpackagepackageidtabcode.txt
**Browser workflow:**
1. `browser action=open profile=openclaw targetUrl="https://suivision.xyz/package/{package_id}?tab=Code"`
2. Click module tabs on the left if multiple modules exist
3. Extract code:

URL: https://suiscan.xyz/mainnet/object/{package_id}/contracts

url-httpssuiscanxyzmainnetobjectpackageidcontracts.txt
**Browser workflow:**
1. `browser action=open profile=openclaw targetUrl="https://suiscan.xyz/mainnet/object/{package_id}/contracts"`
2. Click "Source" tab (default may show Bytecode)
3. Click module tabs if multiple modules
4. Extract code:

}

.txt
## Multiple Modules

Packages like DeepBook (`0xdee9`) have multiple modules:
1. List module tabs from sidebar
2. Click each tab, extract code
3. Save to separate `.move` files

## Examples

| Package | Suivision | Suiscan |
|---------|-----------|---------|
| Sui Framework | `suivision.xyz/package/0x2?tab=Code` | `suiscan.xyz/mainnet/object/0x2/contracts` |
| DeepBook | `suivision.xyz/package/0xdee9?tab=Code` | `suiscan.xyz/mainnet/object/0xdee9/contracts` |

## Use with Other Skills

This skill works great with the Sui development skill suite:

- **sui-move**: Write and deploy Move smart contracts. Use `sui-decompile` to study existing contracts, then use `sui-move` to write your own.
- **sui-coverage**: Analyze test coverage. Decompile a contract, write tests for it, then check coverage.

**Typical workflow:**
1. `sui-decompile` - Study how a DeFi protocol works
2. `sui-move` - Write your own contract based on learned patterns
3. `sui-coverage` - Ensure your code is well-tested

## Server/Headless Setup

For running on servers without display (CI/CD, VPS, etc.), use Puppeteer with a virtual display to avoid headless detection:

}

.txt
**Why xvfb?** Some sites detect headless browsers. Running with `xvfb-run` creates a virtual display, making the browser behave like a real desktop browser.

## Notes

- Suivision may show official verified source (MovebitAudit)
- Suiscan shows Revela decompiled code
- Decompiled code may not compile directly
- **Close browser tabs after use!**

## Related Skills

This skill is part of the Sui development skill suite:

| Skill | Description |
|-------|-------------|
| **sui-decompile** | Fetch and read on-chain contract source code |
| [sui-move](https://clawhub.ai/EasonC13/sui-move) | Write and deploy Move smart contracts |
| [sui-coverage](https://clawhub.ai/EasonC13/sui-coverage) | Analyze test coverage with security analysis |
| [sui-agent-wallet](https://clawhub.ai/EasonC13/sui-agent-wallet) | Build and test DApps frontend |

**Workflow:**
example.js
() => {
  const rows = document.querySelectorAll('table tr');
  const lines = [];
  rows.forEach(r => {
    const cells = r.querySelectorAll('td');
    if (cells.length >= 2) lines.push(cells[1].textContent);
  });
  return lines.join('\n');
}
example.js
() => {
  const rows = document.querySelectorAll('table tr');
  const lines = [];
  rows.forEach(r => {
    const cells = r.querySelectorAll('td');
    if (cells.length >= 2) lines.push(cells[1].textContent);
  });
  return lines.join('\n') || 'not found';
}
example.sh
# Install xvfb (virtual framebuffer)
sudo apt-get install xvfb

# Run with virtual display (avoids headless detection)
xvfb-run --auto-servernum node scraper.js
example.js
const puppeteer = require('puppeteer');

async function fetchContractSource(packageId) {
  const browser = await puppeteer.launch({
    headless: false,  // Use 'new' headless or false with xvfb
    args: ['--no-sandbox', '--disable-setuid-sandbox']
  });
  
  const page = await browser.newPage();
  await page.goto(`https://suivision.xyz/package/${packageId}?tab=Code`);
  await page.waitForSelector('table tr');
  
  const code = await page.evaluate(() => {
    const rows = document.querySelectorAll('table tr');
    const lines = [];
    rows.forEach(r => {
      const cells = r.querySelectorAll('td');
      if (cells.length >= 2) lines.push(cells[1].textContent);
    });
    return lines.join('\n');
  });
  
  await browser.close();
  return code;
}

Tags

#browser_and-automation #code

Quick Info

Category Web Scrapers
Model Claude 3.5
Complexity Multi-Agent
Author easonc13
Last Updated 3/10/2026
🚀
Optimized for
Claude 3.5
🧠

Ready to Install?

Get started with this skill in seconds

openclaw install sui-decompile