@@ -18,8 +18,8 @@ Paste this statement into the geth console. Your code will be loaded and your co
18
18
There are also a few helper functions to easily deploy the contracts.
19
19
20
20
``` javascript
21
- create (abiDefinition)
22
- deploy (account, value, gas, contract, code, input= optional)
21
+ create (abiDefinition);
22
+ deploy (account, value, gas, contract, code, input= optional);
23
23
```
24
24
25
25
You can use them to deploy the contract.
@@ -33,7 +33,10 @@ var instance = deploy(eth.coinbase, 10, 10000, contract, compiled.SimpleStorage.
33
33
To call a function in the contract you can use the ` call ` function
34
34
35
35
``` javascript
36
- call (account, gas, contractInstance .function , input)
36
+ call (accountIndex, gas, contractInstance .function , input);
37
+
38
+ // For example to call using ether from eth.accounts[1]
39
+ call (1 , 100000 , multiplier .multiply , 1 , 2 )A ;
37
40
```
38
41
39
42
To watch an event you can use the watcher function.
@@ -46,7 +49,7 @@ The script will also printout the gas estimates when you try to compile.
46
49
47
50
To send some ether from your account to another. You can use ` send ` function
48
51
``` javascript
49
- send (accountIndex, toAccount, valueInEther, gas)
52
+ send (accountIndex, toAccount, valueInEther, gas);
50
53
51
54
// For example to send some ether from eth.accounts[2]
52
55
send (2 , ' 0xb8290f9757b5c9daa11a8016d663829af812fc0e' , 10 , 30000 );
0 commit comments