Skip to content

scmo/geth-hello-world

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Geth Installation

Please follow this guide for installing Geth with Windows, OSX, or Linux. To install Solidity, follow this guide for Windows, OSX, or Linux.

Deploy a Hello World Contract with Geth

Prerequisites

Assuming that you have Geth and Solidity installed, have an account and have some Ether's on you account.

An alternative to the Solidity Compiler is the online Remix - Solidity IDE.

To gain some Ether's use Ether faucet.

Starting Geth Console

Open Terminal and start Geth :

geth --rinkeby --fast

In a new Terminal tab/window, attach to Geth and open the JavaScript Console

geth attach $HOME/.ethereum/rinkeby/geth.ipc

Call sayHello()-Method

The HelloWorld contract has already been deployed. The contract address is 0xEC90Dc181274b3Aa38ec6d1f0d098aFE07D6a6f7. The transaction for the deployment is here.

To call the sayHello()-Method, open the JavaScript Console tab/window and execute:

var abi = [{"constant":true,"inputs":[],"name":"sayHello","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"inputs":[],"payable":false,"type":"constructor"}];
var aimsHelloWorldContractInstance = eth.contract(abi).at("0xEC90Dc181274b3Aa38ec6d1f0d098aFE07D6a6f7");

aimsHelloWorldContractInstance.sayHello(); // OUTPUT: "Hello World"

If the output is "Hello World" then you have successfully installed geth and you are ready for the AIMS Smart Contract Lab.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published