Sui Explorer now incorporates a source code view for Sui framework packages, which has been a widely requested feature. This new Source Verified tab sits alongside the existing Bytecode tab, letting developers click to view source code for the following packages:

Sui Explorer screen shot showing source code feature
The Source Verified tab in Sui Explorer shows source code for specific framework packages.

This new feature lets Sui developers easily find, read, understand, and share Move code to ease development or auditing. For supported packages, developers no longer need to track down the specific repositories or branches that correspond to published on-chain bytecode. Simply look up the source, including docstrings, for modules in Sui explorer.

Verifying the source code

This new feature verifies that it is displaying the correct and up-to-date source code for a published package through a backend service which checks that the reference source code compiles to the same bytecode on-chain. That is, the service verifies that compiling the source code locally yields the exact same bytecode. 

flow digram showing system architecture
This feature ensures accurate source code by compiling it and comparing its bytecode to the on-chain bytecode.

The system works by cloning a well-known source repository with published packages (1) and downloading the corresponding on-chain bytecode for the published packages as specified in the source repository (2). The service compiles the source code and verifies that it matches the bytecode (3). If the compiled source code matches, Sui Explorer displays the source code when requested (4). When a source repository is updated for a tracked branch, the process effectively repeats, and the server updates tracked branches at a steady cadence.

This system does not derive or decompile source code from on-chain bytecode, instead expecting an existing repository containing a reference implementation to verify against.

More packages to come

In this first phase, the feature supports source display for a handful of well-known packages (0x1, 0x2, 0x3, 0xdee9), and will support more in the future. Developers interested in contributing their own reference source code can take a look at the configuration file and consider making a pull request to track and display their Move code in Sui Explorer.

Author

Sam Blackshear

Co-Founder, CTO, Mysten Labs, Creator of Move Language

CTO of Mysten Labs and inventor of Move language. Former Principal Engineer at Meta.

Read more like this

Sixteen Projects Receive Almost $900k in Grants

The Sui Foundation is proud to announce the recipients of our fourth round of grants to projects that contribute to the Sui ecosystem.

2min read
Sui Foundation

Play Panzerdogs on the SuiPlay0X1

Lucky Kat Studios announced its online tank brawler will be native on the Sui mobile gaming device.

1min read
Adeniyi Abiodun

Canary Capital Launches First Spot SUI ETF (Nasdaq: SUIS) with Staking

The launch of SUIS, which begins trading on the NASDAQ on Wednesday, February 18th, marks yet another step forward in institutional and retail access to the Layer 1 blockchain built to become the foundation of a new global economy

3min read
Sui Foundation

Messaging SDK Beta: Now Live on Sui and Walrus Mainnet

The Messaging SDK Beta brings scalable, encrypted, composable messaging to mainnet, rebuilt from the ground up after alpha feedback

3min read
Tal Tchwella

Welcome to Sui and Meet Akasha!

The Sui YouTube channel hosts Sui overviews, basics of web3 development, Move programming tutorials, and AMAs with experts on Sui and Move.

1min read
Sui Foundation

Sui Funds University Researchers Exploring Scalability, Privacy, and AI-based Tools

Sui Academic Research Awards provides funding to 19 research teams leading groundbreaking blockchain-related research.

7min read
Sui Foundation