@@ -15,18 +15,30 @@ This will generate a javascript file and print out a statement like the followin
15
15
loadScript (' /path/contract.js' )
16
16
```
17
17
18
- Paste this statement into the geth console. Your code will be loaded.
18
+ Paste this statement into the geth console. Your code will be loaded and your contract will be deployed automatically .
19
19
20
20
There are also a few helper functions to easily deploy the contracts.
21
21
22
22
``` javascript
23
- createContract (abiDefinition)
24
- deployContract (contract, input, account, code, gas)
23
+ create (abiDefinition)
24
+ deploy (contract, input, account, code, gas)
25
25
```
26
26
27
27
You can use them to deploy the contract.
28
28
29
29
``` javascript
30
- var contract = createContract (compiled .SimpleStorage .info .abiDefinition );
31
- var instance = deployContract (contract, 10 , eth .coinbase , compiled .SimpleStorage .code ,10000 );
30
+ var contract = create (compiled .SimpleStorage .info .abiDefinition );
31
+ var instance = deploy (contract, 10 , eth .coinbase , compiled .SimpleStorage .code ,10000 );
32
+ ```
33
+
34
+ To call a function in the contract you can use the ` callContractFunction ` function
35
+
36
+ ``` javascript
37
+ call (account, gas, contractInstance .function , input)
38
+ ```
39
+
40
+ To watch the watch an event you can use the watcher function.
41
+
42
+ ``` javascript
43
+ contractInstance .eventName (watcher);
32
44
```
0 commit comments