Skip to content

Dimitreee/ton-compiler

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TON COMPILER

Version npm

Packaged Func compiler for TON smart contracts.

BETA: right now works only on MacOS

Features

  • 🚀 Doesn't need to install and compile TON
  • 🍰 Programmatic and CLI interfaces
  • 💸 Ready to use in unit-testing

Install

yarn add ton-compiler

How to use

This packages adds multiple binaries: func, fift and ton-compiler.

  • Fift compiler already have stdlib included
  • Func compiler need stdlib to be provided, you can use bundled-in: ./node_modules/ton-compioler/funclib/stdblib.fc
  • Ton Compiler is a wrapper around them to be able to compile everything in one go

Console Use

# Compile to binary form (for contract creation)
ton-compiler --input ./wallet.fc --output ./wallet.cell

# Compile to fift (useful for debuging)
ton-compiler --input ./wallet.fc --output ./wallet.fif --fift

Programmatic use

import { compileFunc } from "ton-compiler";
let compiled = await compileFunc("source code");
console.log(compiled.fift); // Compiled Fift assembler
console.log(compiled.cell.toString('hex')); // Compiled cell

License

MIT

About

TON compilers binaries

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 70.2%
  • JavaScript 29.8%