Skip to content

gosh-sh/TVM-Solidity-Compiler

 
 

Repository files navigation

The TVM Solidity compiler

GitHub Everscale

Port of the Solidity smart-contract compiler generating TVM bytecode for TVM compatible blockchains (Everscale, Venom, Gosh, TON). Please refer to upstream README.md for information on the language itself.

TVM Solidity API reference

API documentation is here

Build and Install

Sold driver

We recommend using sold to compile smart-contracts. Documentation is available at README.md.

Building compiler

Original Instructions about how to build and install the Solidity compiler can be found in the Solidity documentation.

Ubuntu Linux

git clone https://github.com/everx-labs/TVM-Solidity-Compiler
cd TVM-Solidity-Compiler
sh ./compiler/scripts/install_deps.sh
mkdir build
cd build
cmake ../compiler/ -DCMAKE_BUILD_TYPE=Release
cmake --build . -- -j8

MacOS

Prerequisites:

  • cmake (brew install cmake)
  • boost (brew install boost)

Clone repo

git clone https://github.com/everx-labs/TVM-Solidity-Compiler
cd TVM-Solidity-Compiler

Update variable CMAKE_OSX_DEPLOYMENT_TARGET in compiler/CMakeLists.txt with the appropriate version for your architecture. In order to get your architecture version, run cargo build --release to get the compilation error displaying your acrhitecture. Here, for example, the right version should be 15.2

clang++: warning: overriding '-mmacosx-version-min=11.0' option with '--target=arm64-apple-macosx15.2' [-Woverriding-t-option]

Now build and copy to the ~/.cargo/bin folder (or any other folder that you use for global binaries) to be available globally

cargo build --release
cp target/release/sold ~/.cargo/bin/sold

Windows 10

Install Visual Studio Build Tools 2019, Git bash, cmake. Run Developer PowerShell for VS 2019

git clone https://github.com/everx-labs/TVM-Solidity-Compiler
cd TVM-Solidity-Compiler
compiler\scripts\install_deps.ps1
mkdir build
cd build
cmake -DBOOST_ROOT="..\compiler\deps\boost\" -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded ..\compiler
cmake --build . --config Release -- /m

Links

License

GNU GENERAL PUBLIC LICENSE Version 3

About

Solidity compiler for TVM

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 61.7%
  • Solidity 26.4%
  • Shell 3.5%
  • Python 3.2%
  • Yul 1.8%
  • C 0.9%
  • Other 2.5%