Skip to content

ChainSQL/solidity

 
 

Repository files navigation

The Solidity Contract-Oriented Programming Language

Join the chat at https://gitter.im/ethereum/solidity Build Status

Useful links

To get started you can find an introduction to the language in the Solidity documentation. In the documentation, you can find code examples as well as a reference of the syntax and details on how to write smart contracts.

You can start using Solidity in your browser with no need to download or compile anything.

The changelog for this project can be found here.

Solidity is still under development. So please do not hesitate and open an issue in GitHub if you encounter anything strange.

Building

Building executable solc on linux/window

Clone the Repository

> git clone [email protected]:ChainSQL/solidity.git
> cd solidity

Prerequisites

1. macOS

​ For macOS, ensure that you have the latest version of Xcode installed . This contains the Clang C++ compiler, the Xcode IDE and other Apple development tools which are required for building C++ applications on OS X. If you are installing Xcode for the first time, or have just installed a new version then you will need to agree to the license before you can do command-line builds:

> sudo xcodebuild -license accept

Our OS X builds require you to install the Homebrew package manager for installing external dependencies. Here’s how to uninstall Homebrew, if you ever want to start again from scratch.

  1. Windows

    You will need to install the following dependencies for Windows builds of Solidity:

    Software Notes
    Git for Windows Command-line tool for retrieving source from Github
    CMake Cross-platform build file generator
    Visual Studio 2017 Build Tools C++ compiler
    Visual Studio 2017 (Optional) C++ compiler and dev environment

    If you’ve already had one IDE and only need compiler and libraries, you could install Visual Studio 2017 Build Tools.

    Visual Studio 2017 provides both IDE and necessary compiler and libraries. So if you have not got an IDE and prefer to develop solidity, Visual Studio 2017 may be an choice for you to get everything setup easily.

    Here is the list of components that should be installed in Visual Studio 2017 Build Tools or Visual Studio 2017:

    • Visual Studio C++ core features
    • VC++ 2017 v141 toolset (x86,x64)
    • Windows Universal CRT SDK
    • Windows 8.1 SDK
    • C++/CLI support

External Dependencies

​ We now have a “one button” script which installs all required external dependencies on macOS, Windows and on numerous Linux distros. This used to be a multi-step manual process, but is now a one-liner:

> ./scripts/install_deps.sh

Or, on windows:

> scripts\install_deps.bat

Command-Line Build

Be sure to install External Dependencies (see above) before build.

Solidity project uses CMake to configure the build. Building Solidity is quite similar on Linux, macOS and other Unices:

> mkdir build
> cd build
> cmake ..
> make -j2

Build static linked execute should disable Z3, because Z3 does not provided static lib. The cmake options like below:

> cmake .. -DUSE_CVC4=OFF -DUSE_Z3=OFF -DSOLC_LINK_STATIC=ON

Use cmake option -DCMAKE_BUILD_TYPE=value Choose the type of build, values are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.

And even for Windows:

> mkdir build
> cd build
> cmake -G "Visual Studio 15 2017 Win64" ..

This latter set of instructions should result in the creation of solidity.sln in that build directory. Double-clicking on that file should result in Visual Studio firing up. We suggest building RelWithDebugInfo configuration, but all others work.

Alternatively, you can build for Windows on the command-line, like so:

cmake --build . --config RelWithDebInfo

Building soljson.js on linux

Prerequisites

  1. rm -rf build/
  2. sudo apt-get install docker

Execute buiding commands

> sudo ./scripts/build_emscripten.sh

How to Contribute

Please see our contribution guidelines in the Solidity documentation.

Any contributions are welcome!

Reference

See the Solidity documentation for build instructions

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors