Update README.md
This commit is contained in:
parent
0c614a457a
commit
82db1cb2e7
45
README.md
45
README.md
|
@ -1,4 +1,3 @@
|
||||||
note: This readme refers to version 1.2.0 of Embark. Not version 2.0 which will be released soon(ish).
|
|
||||||
|
|
||||||
What is embark
|
What is embark
|
||||||
======
|
======
|
||||||
|
@ -139,7 +138,7 @@ You can specify for each contract and environment its gas costs and arguments:
|
||||||
If you are using multiple contracts, you can pass a reference to another contract as ```$ContractName```, Embark will automatically replace this with the correct address for the contract.
|
If you are using multiple contracts, you can pass a reference to another contract as ```$ContractName```, Embark will automatically replace this with the correct address for the contract.
|
||||||
|
|
||||||
|
|
||||||
```Yaml
|
```Json
|
||||||
# config/contracts.json
|
# config/contracts.json
|
||||||
{
|
{
|
||||||
...
|
...
|
||||||
|
@ -202,34 +201,24 @@ You can now deploy many instances of the same contract. e.g
|
||||||
Contracts addresses can be defined, If an address is defined the contract wouldn't be deployed but its defined address will be used instead.
|
Contracts addresses can be defined, If an address is defined the contract wouldn't be deployed but its defined address will be used instead.
|
||||||
|
|
||||||
|
|
||||||
```Yaml
|
```Json
|
||||||
development:
|
# config/contracts.json
|
||||||
UserStorage:
|
{
|
||||||
address: 0x123456
|
|
||||||
UserManagement:
|
|
||||||
args:
|
|
||||||
- $UserStorage
|
|
||||||
...
|
...
|
||||||
```
|
"development": {
|
||||||
|
"contracts": {
|
||||||
You can also define contract interfaces (Stubs) and actions to do on deployment
|
"UserStorage": {
|
||||||
|
"address": "0x123456"
|
||||||
```Yaml
|
},
|
||||||
development:
|
"UserManagement": {
|
||||||
DataSource:
|
"args": [
|
||||||
args:
|
"$UserStorage"
|
||||||
MyDataSource:
|
]
|
||||||
args:
|
}
|
||||||
instanceOf: DataSource
|
}
|
||||||
Manager:
|
}
|
||||||
stubs:
|
|
||||||
- DataSource
|
|
||||||
args:
|
|
||||||
- $MyDataSource
|
|
||||||
onDeploy:
|
|
||||||
- Manager.updateStorage($MyDataSource)
|
|
||||||
- MyDataSource.set(5)
|
|
||||||
...
|
...
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
EmbarkJS
|
EmbarkJS
|
||||||
|
|
Loading…
Reference in New Issue