A hands-on tutorial: Working with Smart Contracts in Ethereum
Was prepared with the assistance of Mohammad H. Tabatabaei from the University of Oslo
Working with Smart Contracts in Ethereum Was prepared with the - - PowerPoint PPT Presentation
A hands-on tutorial: Working with Smart Contracts in Ethereum Was prepared with the assistance of Mohammad H. Tabatabaei from the University of Oslo Different tools provide different functionality Tools Remix Ganache MyEtherWallet Geth
Was prepared with the assistance of Mohammad H. Tabatabaei from the University of Oslo
Tools Remix Ganache MyEtherWallet Geth Activities 1 Configuring the Blockchain
2 Deploying the Blockchain
Not Persistent
+
3 Developing the contract +
4 Compiling the contract +
5 Creating user account + + + + 6 Deploying the contract +
+ 7 Creating the UI for interacting +
+ 8 Run the client +
+ 9 Interact with the contract & have fun +
+ 10 Monitoring the execution
1
3 4 1 2 5 10 6 7 8 9 https://remix.ethereum.org/ http://truffleframework.com/ganache/ https://github.com/kvhnuke/etherwallet/releases/tag/v3.21.06
accounts
2
user accounts
3
4
5
Getter function Setter function Variable
6
7
8
from scratch, the old one will not be saved.
be used with this option.
the URL address to the selected provider: geth, parity or any Ethereum client.
a contract.
9
10
11
Press getValue to see the initial amount Input a value and press setValue button to create and confirm the transaction Press getValue again to see the result 1 2 3
12
13
We want to save the address of the contract creator
14
Only the contract creator is permitted to set value
15
Payable keyword allows receiving ether We can get the balance of the contract
16
Input the value as wei (10-18 of ether) Click the receiveFunds button to transfer the money to the contract 2 1
17
Transfer some money from the contract to the mentioned account
18
19
Tools Remix Ganache MyEtherWallet Geth Activities 1 Configuring the Blockchain
2 Deploying the Blockchain
Not Persistent
+
3 Developing the contract +
4 Compiling the contract +
5 Creating user account + + + + 6 Deploying the contract +
+ 7 Creating the UI for interacting +
+ 8 Run the client +
+ 9 Interact with the contract & have fun +
+ 10 Monitoring the execution
3 4 1 2 5 10 6 7 8 9
20
21
22
23
24
25
26
27
28
29
Extract the contract address from Ganache Extract the ABI (Application Binary Interface) of the code from Remix Interact with the contract in MyEtherWallet (Import the contract address and the ABI into the MyEtherWallet) Select a function
Read Write
Receive the result Generate the transaction Pay some gas
30
31
32
33
34
35
36
37
38
39
1 2
40
41
42
Folder name of your blockchain
43
44
45
46
47
48
49