I attended Bankok DevMorning #10. BKK DevMorning
I tried to run a solidity example in my local environment.
Final version
remix-ide (web based repl) on local machine
$ git clone git@github.com:ethereum/remix-ide.git $ cd remix-ide $ git checkout gh-pages $ rackup -b "run Rack::Directory.new('.')" -p 9494 $ open http://localhost:9494/index.html
code snippet
I read this and copy and paste 🙂
Hello world on solidity Ethereum – Wagner Nicolas – Medium
pragma solidity ^0.4.11; contract helloWorld { function renderHelloWorld () public pure returns (string) { return 'helloooooooWorld'; } }
how to run
Move to compile tab, Start to compiler
. Then move to Run tab. After compile, you can use “hello world”. I chose “hello world” and selected “create”. Then I chose “render hello world”. I can see this in the browser console!
[call] from:0xca35b7d915458ef540ade6068dfe2f44e8fa733c, to:helloWorld.renderHelloWorld(), data:942ae...ae0a7, return: Details Debug { "0": "string: helloooooooWorld" }
Awesome!
Reduce warning from
I added method visibility public
and pure
word, according to warn.
Done!
Yak shavings
- Read Solidity Tutorials | Ethereum Builder’s Guide
- Install and set up remix-ide, and I failed this ;(
sudo apt-get install ethereum