ton-tact

📁 hairyf/blockchain-master 📅 1 day ago
0
总安装量
1
周安装量
安装命令
npx skills add https://github.com/hairyf/blockchain-master --skill ton-tact

Agent 安装分布

mcpjam 1
claude-code 1
replit 1
junie 1
windsurf 1
zencoder 1

Skill 文档

Skill is based on Tact (TON) v1.6.13, generated 2026-02-25.

Tact is a statically typed smart contract language for the TON blockchain. Contracts use message-based communication (receive/send), structs and messages for data, and traits for reuse. This skill focuses on agent-oriented usage: type system, contracts and receivers, sending/receiving messages, cells and serialization, standard libraries, and security practices.

Core references

Topic Description Reference
Type system Primitives, optionals, maps, structs, messages, contracts, traits core-types
Contracts and traits init, parameters, receivers, getters, interfaces, BaseTrait core-contracts
Structs and messages Definition, instantiation, toCell/fromCell, TL-B layout core-structs-messages
Receiving messages receive(), text/binary/slice receivers, order, external/bounced core-receive
Sending messages send(), SendParameters, reply, forward, notify, cashback, deploy, emit core-send
Cells, Builders, Slices Cell/Builder/Slice, beginCell, store/load, Struct/Message helpers core-cells
Message mode Base modes and optional flags (SendRemainingValue, SendIgnoreErrors, etc.) core-message-mode
Gas and fees getStorageFee, getComputeFee, getForwardFee, setGasLimit, acceptMessage core-gas
Context and state sender, context, myAddress, myBalance, now, inMsg, setData, commit, getConfigParam, nativeReserve core-context-state
Addresses newAddress, contractAddress, forceBasechain, parseStdAddress, BasechainAddress core-addresses
Cryptography checkSignature, sha256, keccak256, SignedBundle core-crypto
Strings StringBuilder, beginString, beginComment, String extensions, Int toFloatString core-strings
Math min, max, abs, sign, sqrt, log, log2, pow, pow2, divc, muldivc core-math
Exit codes TVM/Tact exit codes, compute/action phases, developer range 256–65535 core-exit-codes
Random random, randomInt, getSeed, setSeed, nativeRandomize, nativeRandomizeLt core-random
Debug and throw require, dump, throw, throwIf, throwUnless core-debug
Compile-time address(), cell(), slice(), rawSlice(), ascii(), crc32(), ton() core-comptime
Message lifecycle Receive phase, compute phase, action phase (no revert) core-lifecycle

Features

Topic Description Reference
Optionals T?, null, !!, constraints (no optional keys, no nested optionals) features-optionals
Maps map<K,V>, emptyMap(), get/set, allowed types, serialization features-maps
initOf and deploy initOf, contractAddress, StateInit, send/deploy deployment features-initof-deploy
Standard libraries @stdlib/config, content, deploy, dns, ownable, stoppable features-stdlib
Configuration tact.config.json — projects, options (debug, external, safety, mode) features-config
External messages external(), acceptMessage, no sender/context, config external features-external
Constants const, virtual/abstract/override in traits features-constants

Best practices

Topic Description Reference
Security Sensitive data, signed ints, exit codes, random, auth, replay, bounce, excess gas best-practices-security
Gas Contract params, binary receivers, message/cashback/deploy, sender(), throwUnless, SignedBundle best-practices-gas

Advanced

Topic Description Reference
Bounced messages bounced, 224-bit limit, fallback Slice receiver, unrecognized bounces advanced-bounced