MCPcopy Index your code
hub / github.com/dethcrypto/dethcode

github.com/dethcrypto/dethcode @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
676 symbols 1,224 edges 71 files 27 documented · 4%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

DethCode

<a href="https://github.com/dethcrypto/ethereum-code-viewer/actions"><img alt="Build Status" src="https://github.com/dethcrypto/ethereum-code-viewer/actions/workflows/ci.yml/badge.svg"></a>

View source of deployed Ethereum smart contracts in VS Code

While on Etherscan, change .io to .deth.net and browse contracts comfortably in ephemeral VS Code instance

Usage

While browsing smart contract code on Etherscan just change URL from .io to .deth.net. This will open Visual Studio Code instance and fetch the verified code using Etherscan API.

ecv

Or save the following code snippet as a bookmarklet to quickly go from any supported chain explorer to DethCode.

javascript: location.href = location.href.replace(/\.\w+(\/)/, ".deth.net/")

Features ⚡

  • frictionless - just tweak URL while browsing etherscan .io -> deth.net
  • proxy support - automatically follows proxies and displays implementation source code
  • multichain - supports different etherscan instances: testnets, L2s, L1s (all supported chains)

Motivation

Browsing contracts directly on etherscan sucks! Browsing multi-file contracts on etherscan sucks even more. Limited search, weird syntax highlighting, and many, many more. Finally, it's often impossible to just git clone repository and browse source code locally because it's hard to find the exact commit that matches onchain code.

DethCode was born out of frustration, and it's here to fix all of these issues. In addition, it improves the experience by automatically following the implementation of proxies and so on.

Is it still relevant since Etherscan implements something similar?

Etherscan decided that they like the idea of browsing smart contracts in ephemeral VSCode instances so much that they decided to make it part of the their offering. We don't hold a grudge against them, however this is precisely why DethCode needs to live on!

DethCode is a fully open-source, public good that is available for anyone and is developed by a community. Other blockchain explorers can use it/self-host it instead of developing the same thing again. Furthermore, we are preparing to launch, new advanced features that will make DethCode the best way to browse ethereum's smart contracts.

Examples

Contributing and development

Check out our contributing guide.

Social

Follow me on Twitter.

Extension points exported contracts — how you extend this code

Tunnel (Interface)
(no doc) [3 implementers]
packages/ethereum-viewer/src/vscode.proposed.d.ts
KeyboardLayoutMap (Interface)
https://developer.mozilla.org/en-US/docs/Web/API/KeyboardLayoutMap
packages/entrypoint/src/index.ts
ILayoutRuntimeState (Interface)
(no doc)
packages/vscode-host/src/src/vs/workbench/browser/layout.ts
WebviewEditorInset (Interface)
(no doc) [3 implementers]
packages/ethereum-viewer/src/vscode.proposed.d.ts
NavigatorKeyboard (Interface)
(no doc)
packages/entrypoint/src/index.ts
IEditorToOpen (Interface)
(no doc)
packages/vscode-host/src/src/vs/workbench/browser/layout.ts
NotebookEditorDecorationType (Interface)
(no doc) [3 implementers]
packages/ethereum-viewer/src/vscode.proposed.d.ts
ILayoutInitializationState (Interface)
(no doc)
packages/vscode-host/src/src/vs/workbench/browser/layout.ts

Core symbols most depended-on inside this repo

getRuntimeValue
called by 71
packages/vscode-host/src/src/vs/workbench/browser/layout.ts
registerExtensionAction
called by 57
packages/vscode-host/src/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts
registerDebugCommandPaletteItem
called by 30
packages/vscode-host/src/src/vs/workbench/contrib/debug/browser/debug.contribution.ts
registerDebugViewMenuItem
called by 27
packages/vscode-host/src/src/vs/workbench/contrib/debug/browser/debug.contribution.ts
setRuntimeValue
called by 24
packages/vscode-host/src/src/vs/workbench/browser/layout.ts
resolve
called by 19
packages/ethereum-viewer/src/vscode.proposed.d.ts
focus
called by 18
packages/vscode-host/src/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.ts
runAction
called by 18
packages/vscode-host/src/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts

Shape

Method 286
Function 172
Interface 135
Class 69
Enum 14

Languages

TypeScript100%

Modules by API surface

packages/ethereum-viewer/src/vscode.proposed.d.ts187 symbols
packages/vscode-host/src/src/vs/workbench/browser/layout.ts109 symbols
packages/vscode-host/src/src/vs/workbench/services/views/browser/viewDescriptorService.ts70 symbols
packages/vscode-host/src/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.ts61 symbols
packages/vscode-host/src/src/vs/workbench/contrib/preferences/browser/preferencesSearch.ts38 symbols
packages/vscode-host/src/src/vs/workbench/api/browser/mainThreadEditors.ts25 symbols
packages/ethereum-viewer/src/fs/fileSystemProvider.ts23 symbols
packages/vscode-host/src/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts16 symbols
packages/ethereum-viewer/src/fs/textSearchProvider.ts15 symbols
packages/ethereum-viewer/src/util/fetch.ts13 symbols
packages/ethereum-viewer/src/explorer/fetchFiles.ts9 symbols
packages/vscode-host/src/src/vs/editor/test/node/classification/typescript.test.ts7 symbols

For agents

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

⬇ download graph artifact