npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

tact-asm

v0.0.6

Published

This repository contains an assembler and disassembler implementation for TVM bitcode.

Readme

Tact Assembly

This repository contains an assembler and disassembler implementation for TVM bitcode.

This implementation provides a complete cycle Text -> Internal representation -> Cells -> BoC -> Cells -> Internal representation -> Text, this means that the same text assembly can be obtained from a text assembly, going through all the compilation and decompilation steps.

The internal representation in this implementation is much more convenient for manipulations than the IR in https://github.com/tact-lang/ton-opcode. Thanks to this, we can, for example, build a bitcode optimizer on top of this assembler, which can work with raw bitcode, and not with some high-level language like Tact or FunC.

During compilation, the assembler collects additional mappings that can be used to convert the TVM log into a full trace that will refer to specific instructions in the decompiled version of the contract. The proof of concept can be found in the ./src/debugger folder, it collects instructions, gas and stack at each step.

This implementation is also able to generate a coverage report for the contract by BoC and logs from the sandbox. The proof of concept can be found in the ./src/coverage folder.

Validity

The assembler was tested on 106k contracts from the blockchain where it successfully decompiled and compiled all contracts into equivalent Cells.

Why?

Reasons not to use Fift:

  • It is difficult to use on the web, we need a WASM compiler build, which greatly increases the package size
  • Fift is not just a plain assembler, it handles INLINECALLDICT in a special way, implicitly splits Cell into parts in cases where the reference or code size limit is reached and so on.
  • We do not control its code, it is written in itself, which makes its modification extremely difficult
  • Fift implicitly combines several instructions into one, where a specific implementation is selected based on its arguments
  • To write custom logic for how to lay out code, we need to write a lot of unreadable Fift code (see the selector hack)

In the future, this assembler will be used as a target for a new backend in the Tact compiler.

Example contract

Hex: b5ee9c7201010101005e0000b8ff0020dd2082014c97ba94308168e8e0a4f260810200d71820d31f018168e8baf2e052d32f01f823bef2e04dd74c59f9010182f0871740fee9829718bd7dfddb66c215758869fdb682780dc6298283dd6134d67ff910f2a3f800ed55

SETCP 0
DUP
IFNOTRET
DUP
PUSHINT_LONG 85143
EQUAL
PUSHCONT_SHORT {
    DROP
    PUSHINT_16 26856
}
IFJMP
INC
THROWIF_SHORT 32
PUSHINT_16 512
LDSLICEX
DUP
LDU 32
SWAP
PUSHINT_16 26856
EQUAL
THROWIFNOT 82
LDU 48
SWAP
NOW
GEQ
THROWIFNOT 77
PLDREFIDX 0
ROTREV
HASHSU
SWAP
PUSHINT_LONG 61103320625414998982152303707971264142854662587410920750381746782697495516799
CHKSIGNU
THROWIFNOT_SHORT 35
ACCEPT
POPCTR c5