13.06.2017 Views

Whitepaper - Ethereum Classic With Cover

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Ethereum</strong> <strong>Classic</strong> Documentation, Release 0.1<br />

1.7.2 Contracts<br />

What is a contract?<br />

A contract is a collection of code (its functions) and data (its state) that resides at a specific address on the <strong>Ethereum</strong><br />

blockchain. Contract accounts are able to pass messages between themselves as well as doing practically Turing<br />

complete computation. Contracts live on the blockchain in a <strong>Ethereum</strong>-specific binary format called <strong>Ethereum</strong><br />

Virtual Machine (EVM) bytecode.<br />

Contracts are typically written in some high level language such as Solidity and then compiled into bytecode to<br />

be uploaded on the blockchain.<br />

See also:<br />

Other languages also exist, notably Serpent and LLL, which are described further in the <strong>Ethereum</strong> high level<br />

languages section of this documentation.<br />

Dapp development resources lists the integrated development environments, developer tools that help you develop<br />

in these languages, offering testing, and deployment support among other features.<br />

<strong>Ethereum</strong> high level languages<br />

Contracts live on the blockchain in an <strong>Ethereum</strong>-specific binary format (EVM bytecode) that is executed by the<br />

<strong>Ethereum</strong> Virtual Machine (EVM). However, contracts are typically written in a higher level language and then<br />

compiled using the EVM compiler into byte code to be deployed to the blockchain.<br />

Below are the different high level languages developers can use to write smart contracts for <strong>Ethereum</strong>.<br />

Solidity<br />

Solidity is a language similar to JavaScript which allows you to develop contracts and compile to EVM bytecode.<br />

It is currently the flagship language of <strong>Ethereum</strong> and the most popular.<br />

• Solidity Documentation - Solidity is the flagship <strong>Ethereum</strong> high level language that is used to write contracts.<br />

• Solidity online realtime compiler<br />

• Standardized Contract APIs<br />

• Useful Ðapp Patterns - Code snippets which are useful for Ðapp development.<br />

Serpent<br />

Serpent is a language similar to Python which can be used to develop contracts and compile to EVM bytecode. It<br />

is intended to be maximally clean and simple, combining many of the efficiency benefits of a low-level language<br />

with ease-of-use in programming style, and at the same time adding special domain-specific features for contract<br />

programming. Serpent is compiled using LLL.<br />

• Serpent on the ethereum wiki<br />

• Serpent EVM compiler<br />

LLL<br />

Lisp Like Language (LLL) is a low level language similar to Assembly. It is meant to be very simple and minimalistic;<br />

essentially just a tiny wrapper over coding in EVM directly.<br />

• LIBLLL in GitHub<br />

• Examples of LLL<br />

1.7. Contracts and Transactions 79

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!