Ethereum: Write your own contracts

100 %
0 %
Information about Ethereum: Write your own contracts
Finance

Published on March 5, 2014

Author: mids106

Source: slideshare.net

Description

Write your own Ethereum Contracts. Presentation given at the Ethereum Meetup Amsterdam by Joris Bontje / @mids106

ethereum Write Your Own Contracts Joris Bontje! @mids106

What can you do with them?

Platform

Contracts lives on the Ethereum block chain Have own Ethereum address and balance Can send and receive transactions “Activated” when you send a transaction to it

Turing complete language Fee per CPU step (extra for storage, tx, crypto) 2^256 Storage entries Scripts can modify their own code(!)

Available languages

EtherScript TXVALUE PUSH 25 PUSH 10 PUSH 18 EXP MUL LE NOT PUSH 34 JMPI STOP PUSH 34 JMP PUSH 0 TXDATA SLOAD NOT PUSH 0 TXDATA PUSH 1000 LT NOT MUL NOT NOT PUSH 34 JMPI STOP PUSH 1 TXDATA PUSH 0 TXDATA SSTORE

CLL: C-Like Language if tx.value <= 25 * 10^18: stop elif contract.storage[tx.data[0]] or tx.data[0] < 1000: stop contract.storage[tx.data[0]] = tx.data[1]

LLL: Lisp-Like Language (seq (unless (>= (txvalue) (* 20 (basefee))) (stop)) (if (txdatan) (seq (sstore (txsender) (- (sload (txsender)) (txdata 0))) (mktx (txsender) (txdata 0) 0) ) (sstore (txsender) (+ (sload (txsender)) (- (txvalue) (* 20 (basefee))) ) ) ) )

Contract Walkthrough

sub-currency.cll

namecoin.cll

NameReg in Action

Scary Screenshot AlethZero v0.3.4 - 2014-02-14

Future Contract Editor?

Simulation

Resources

Ethereum whitepaper
 https://github.com/ethereum/wiki/wiki/%5BEnglish%5D-WhitePaper Code examples & Simulators
 https://github.com/jorisbontje/cll-sim/
 https://github.com/k1n0k0/ethereum-simulator/ CLL
 https://github.com/ethereum/wiki/wiki/%5BEnglish%5D-CLL LLL
 https://github.com/ethereum/cpp-ethereum/wiki/LLL%20Tutorial
 https://github.com/ethereum/cpp-ethereum/wiki/LLL %20Examples

http://youtu.be/BSEJEanSvUU

Questions?! @mids106

Add a comment

Related presentations

Les changements sur le marché du distressed aux Etats-Unis et en Europe

Main Sections of the Report 1) Nifty Technical View 2) 4 Large Cap Trade Ide...

This presentation consits the yearly results of Kinepolis Group

Related pages

Ethereum: Write your own smart contracts + Q&A - YouTube

Want to watch this again later? Sign in to add this video to a playlist. Joris Bontje presents how to write your own smart contracts with ...
Read more

Create a Hello World Contract in ethereum

... World contract on the ethereum command line. If you don't know how to ... on to write further contracts, ... contract has to implement its own ...
Read more

Ethereum Project

You are responsible for your own ... assets built on Ethereum, as well as write, ... Ethereum, you can create a contract that will hold a ...
Read more

EtherCasts - YouTube

Ethereum: Write your own smart contracts ... Zaki Manian talks about security problems with the domain name system and how the Ethereum blockchain can help.
Read more

How to build your own transparent bank on the blockchain

... how to build your own transparent bank on the blockchain ... to use the Ethereum Wallet to create your own ... Contracts tab you’ll ...
Read more

Counterparty Recreates Ethereum’s Smart Contract ...

... or write your own, and run it on Bitcoin with Counterparty. ... Further reading on the Ethereum contract language(s) is available here: Ethereum White ...
Read more

blockchain - Ethereum - contract - Bitcoin Stack Exchange

Once my smart contract is active on the Ethereum, ... "If you’d rather use your own machine, you probably noticed ... Can an Ethereum contract be updated ...
Read more

Tutorial 1: Your first contract - Ethereum Community Forum

Tutorial 1: Your first contract. KenK ... we'll write a simple contract that functions ... understand that will help you master ethereum contracts: ...
Read more

Writing Smart Contracts FAQ (outdated) - Ethereum ...

Writing Smart Contracts FAQ ... need a separate app if you've chosen to write in this ... implementation in Ethereum: Amusing marriage contract:
Read more