You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+75-8Lines changed: 75 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,15 +7,17 @@ Embark is a framework that allows you to easily develop and deploy DApps.
7
7
8
8
With Embark you can:
9
9
* Automatically deploy contracts and make them available in your JS code. Embark watches for changes, and if you update a contract, Embark will automatically redeploy the contracts (if needed) and the dapp.
10
+
* Use any build pipeline or tool you wish, including grunt and meteor.
10
11
* Do Test Driven Development with Contracts using Javascript.
11
12
* Easily deploy to & use decentralized systems such as IPFS.
13
+
* Keep track of deployed contracts, deploy only when truly needed.
12
14
* Quickly create advanced DApps using multiple contracts.
13
15
14
16
See the [Wiki](https://github.com/iurimatias/embark-framework/wiki) for more details.
15
17
16
18
Installation
17
19
======
18
-
Requirements: geth (1.0.0), solc (0.9.23), node (0.12.2) and npm
20
+
Requirements: geth (1.0.0), solc (0.1.0) or serpent (develop), node (0.12.2) and npm
19
21
20
22
For specs: pyethereum, ethertdd.py
21
23
@@ -49,6 +51,8 @@ This will automatically deploy the contracts, update their JS bindings and deplo
49
51
50
52
Note that if you update your code it will automatically be re-deployed, contracts included. There is no need to restart embark, refreshing the page on the browser will do.
51
53
54
+
note: for a demo using meteor do ```embark meteor_demo``` followed by ```embark deploy``` then ```meteor```
55
+
52
56
Creating a new DApp
53
57
======
54
58
@@ -62,7 +66,7 @@ DApp Structure
62
66
63
67
```Bash
64
68
app/
65
-
|___ contracts/ #solidity contracts
69
+
|___ contracts/ #solidity or serpent contracts
66
70
|___ html/
67
71
|___ css/
68
72
|___ js/
@@ -74,7 +78,7 @@ DApp Structure
74
78
|___ contracts/ #contracts tests
75
79
```
76
80
77
-
Solidity files in the contracts directory will automatically be deployed with embark run. Changes in any files will automatically be reflected in app, changes to contracts will result in a redeployment and update of their JS Bindings
81
+
Solidity/Serpent files in the contracts directory will automatically be deployed with embark run. Changes in any files will automatically be reflected in app, changes to contracts will result in a redeployment and update of their JS Bindings
78
82
79
83
Using Contracts
80
84
======
@@ -145,6 +149,7 @@ You can now deploy many instances of the same contract. e.g
145
149
# config/contracts.yml
146
150
development:
147
151
Currency:
152
+
deploy: false
148
153
args:
149
154
- 100
150
155
Usd:
@@ -171,16 +176,44 @@ Contracts addresses can be defined, If an address is defined the contract wouldn
171
176
...
172
177
```
173
178
179
+
You can also define contract interfaces (Stubs) and actions to do on deployment
180
+
181
+
```Yaml
182
+
development:
183
+
DataSource:
184
+
args:
185
+
MyDataSource:
186
+
args:
187
+
instanceOf: DataSource
188
+
Manager:
189
+
stubs:
190
+
- DataSource
191
+
args:
192
+
- $MyDataSource
193
+
onDeploy:
194
+
- Manager.updateStorage($MyDataSource)
195
+
- MyDataSource.set(5)
196
+
...
197
+
```
198
+
174
199
Tests
175
200
======
176
201
177
202
You can run specs with ```embark spec```, it will run any files ending *_spec.js under ```spec/```.
178
203
179
-
Embark includes a testing lib to fastly run & test your contracts in a EVM.
204
+
Embark includes a testing lib to fastly run & test your contracts in a EVM.
To deploy a dapp to IPFS, all you need to do is run a local IPFS node and then run ```embark ipfs```.
296
+
If you want to deploy to the live net then after configuring you account on ```config/blockchain.yml``` on the ```production``` environment then you can deploy to that chain by specifying the environment ```embark ipfs production```.
297
+
245
298
LiveReload Plugin
246
299
======
247
300
@@ -255,5 +308,19 @@ Because embark is internally using grunt tasks, debugging is not straightforward
255
308
- normally you would write something like `node-debug -p 7000 embark -- deploy`
256
309
- This gives you nothing with embark. If you look at `deploy` command in [`./bin/embark`](https://github.com/iurimatias/embark-framework/blob/develop/bin/embark#L32-L35) you will notice that it internally runs grunt task `grunt deploy_contracts:[env]`
257
310
- with this knowledge we can prepare proper command to start debugging
0 commit comments