Skip to content

Commit 8009d93

Browse files
committed
updated README
1 parent 7fabc30 commit 8009d93

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

README.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,30 @@ This will generate a javascript file and print out a statement like the followin
1515
loadScript('/path/contract.js')
1616
```
1717

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.
1919

2020
There are also a few helper functions to easily deploy the contracts.
2121

2222
```javascript
23-
createContract(abiDefinition)
24-
deployContract(contract, input, account, code, gas)
23+
create(abiDefinition)
24+
deploy(contract, input, account, code, gas)
2525
```
2626

2727
You can use them to deploy the contract.
2828

2929
```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);
3244
```

0 commit comments

Comments
 (0)