The news is by your side.

Smart Contracts

0 1

Get real time updates directly on you device, subscribe now.

Smart contracts mean different things depending on the blockchain
platform. Ethereum smart contracts are short computer programs that
are stored on Ethereum’s blockchain, replicated across all the nodes, and
are available for anyone to inspect. There are two steps that are
performed separately:
1. Uploading the smart contract to Ethereum’s blockchain
2. Making the smart contract run
You upload a smart contract by sending the code to miners in a special
transaction. If the transaction is successfully processed, the smart
contract will then exist at a specific address on Ethereum’s blockchain171.
You may then make it run by creating a transaction that says ‘Please run
the smart contract found at address x’.
Here is an example of a basic smart contract. It creates a token called
‘GavCoin’ that initially issues 1 million GavCoins to the creator of the
smart contract, and then allows them to send GavCoins to other users172:
For a real example of a smart contract, the smart contract that holds the
balances of the Indorse ICO tokens can be found at address
0xf8e386eda857484f5a12e4b5daa9984e06e73705173.
Once a contract has been uploaded, it behaves a bit like a jukebox. When
you want to run it, you create a transaction pointing to the contract and
supply whatever information the contract expects. You pay gas to the
miner to run it. As part of the mining process, each miner will execute the
transaction, which involves running the smart contract.
The miner who successfully wins the proof-of-work challenge will publish
the winning block to the rest of the network. The other nodes will validate
the block, add the block to their own blockchains, and process the
transactions, including running the smart contracts. This is how
Ethereum’s blockchain gets updated, and how the state of the EVMs on
each node’s machine is synchronised.
Ethereum smart contracts are described, ‘Turing complete’. This means
that they are fully functional and can perform any computation that can
be done in any other programming language.
Smart Contract languages: Solidity / Serpent, LLL (Lisp Like
Language)
The most common language that Ethereum smart contracts are written in
is Solidity. Serpent and LLL can also be used. Smart contracts written in
these languages will all compile and run on Ethereum Virtual Machines.
• Solidity is similar to the language JavaScript. This is currently the
most popular and functional smart contract scripting language.
• Serpent is similar to the language Python and was popular in the
early history of Ethereum.
• LLL is similar to Lisp and was used mainly in the very early days
only. It is probably the hardest to write in.
Ethereum software: geth, eth, pyethapp
The three official Ethereum clients (full node software) are all open
source. You can see the code behind them and tweak them to make your
own versions. They are:
• geth174 (written in a language called Go)
• eth175 (written in C++)
• pyethapp176 (written in Python)
These are all command-line based programs (think green text on black
backgrounds) and so additional software can be used for a nicer graphical
interface. Currently, the most popular graphical interface is Mist
(https://github.com/Ethereum/mist), which runs on top of geth or eth.
So, geth/eth does the background stuff, and Mist is the pretty screen on
top.
Currently the most popular Ethereum clients are geth and Parity177. Parity
is Ethereum software built by a company called Parity Technologies. It is
also open source178 and is developed in the Rust programming language.

Get real time updates directly on you device, subscribe now.

Leave A Reply

Your email address will not be published.

Subscribe to our newsletter
Sign up here to get the latest news delivered directly to your inbox.
You can unsubscribe at any time

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More