Skip to content

Commit 064ba51

Browse files
committed
edited filenames
1 parent b5b6b7c commit 064ba51

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

README.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,26 @@
1-
# solidity_compiler_helper
1+
This is helper to compile and deploy smart contracts through geth.
2+
3+
Start geth with following flags (along with the others you may need). You can change the rpcport to any port number. Just remember to change that in the script.
4+
5+
`geth --rpc --rpcport 8100 --rpccorsdomain "*"`
6+
7+
Then move `solc_helper` to somewhere in your path.
8+
To compile your code run
9+
10+
`solc_helper contract.sol`
11+
12+
This will generate a javascript file and print out a statement like follows.
13+
14+
`loadScript('/path/contract.js')`
15+
16+
Paste this statement into the geth console. Your code will be loaded. There are aalso a few helper functions to easily deploy the contracts in the js file.
17+
18+
``` createContract(abiDefinition)
19+
20+
getContractInstance(contract, input, account, code, gas)
21+
```
22+
23+
You can use them to deploy the contract.
24+
25+
`var contract = createContract(compiled.SimpleStorage.info.abiDefinition);`
26+
`var instance = getContractInstance(contract, 10, eth.coinbase, compiled.SimpleStorage.code,10000);
File renamed without changes.

0 commit comments

Comments
 (0)