<
 
 
 
 
×
>
hide You are viewing an archived web page, collected at the request of Ethereum Foundation using Archive-It. This page was captured on 09:16:16 May 03, 2021 , and is part of the Community collection. The information on this web page may be out of date. See All versions of this archived page. Loading media information

Try Solidity Online

chrisethchriseth Member Posts: 170 ✭✭✭
edited November 2014 in Solidity
tl;dr: Try Solidity in your browser - don't expect it to be stable but please report bugs via github.

As Solidity comes closer and closer to a language that supports all features provided by the Ethereum virtual machine, I would like to get some feedback from the community about the language itself.

As some of you might have noticed already, the Solidity compiler is activated in AlethZero by entering some source code that starts with the word "contract", but probably it is more convenient to just try Solidity in your browser:
Browser-based Solidity compiler

Note that the planned IDE will be different, this is only to be able to play with Solidity with prerequisites close to zero. One drawback of the browser interface is that you cannot execute or debug contracts, but you will get parse errors and the compiled bytecode. It is pre-filled with an example contract that should explain most of the features, otherwise please ask here or on IRC. It may be wise to disable the optimizer while writing (untick the "optimize" checkbox). Furthermore, the emscripten build is an unofficial build and will only be updated manually by me for now, so don't expect the latest features to be available from there.

The browser interface is powered by the wonderful project emscripten, which compiles the Solidity compiler written in C++ to javascript, so that it can be used directly in the browser without a server-side backend.

Current limitations of Solidity (which will all be resolved in the future):
  • no access to blockchain data (query balance, block number, etc.)
  • no access to other contracts
  • no way to send messages / transactions
  • no constructor / init function
  • no structs as local variables or function arguments, only the first return value can be accessed in local calls
  • no real, string or text types (only uint*, int*, hash*, address and bool are supported)
  • "const" is not enforced
  • functions can fail to compile if expressions are too complex or if there are too many variables (access to only the topmost 16 stack element)
Have fun!

Comments

Sign In or Register to comment.