Merge pull request #243 from imtypist/patch-1

update readme and docs
This commit is contained in:
Iuri Matias 2017-03-11 12:29:45 -05:00 committed by GitHub
commit 77f2994a62
2 changed files with 22 additions and 7 deletions

View File

@ -49,7 +49,7 @@ Table of Contents
* [Testing Contracts](#tests) * [Testing Contracts](#tests)
* [Working with different chains](#working-with-different-chains) * [Working with different chains](#working-with-different-chains)
* [Custom Application Structure](#structuring-application) * [Custom Application Structure](#structuring-application)
* [Deploying to IPFS](#deploying-to-ipfs) * [Deploying to IPFS](#deploying-to-ipfs-and-swarm)
* [Extending Functionality with Plugins](#plugins) * [Extending Functionality with Plugins](#plugins)
* [Donations](#donations) * [Donations](#donations)
@ -145,8 +145,11 @@ DApp Structure
|___ css/ |___ css/
|___ js/ |___ js/
config/ config/
|___ blockchain.json #environments configuration |___ blockchain.json #rpc and blockchain configuration
|___ contracts.json #contracts configuration |___ contracts.json #ethereum contracts configuration
|___ storage.json #ipfs configuration
|___ communication.json #whisper/orbit configuration
|___ webserver.json #dev webserver configuration
test/ test/
|___ #contracts tests |___ #contracts tests
``` ```
@ -323,14 +326,20 @@ events:
Client side deployment will be automatically available in Embark for existing contracts: Client side deployment will be automatically available in Embark for existing contracts:
```Javascript ```Javascript
SimpleStorage.deploy().then(function(anotherSimpleStorage) {}); SimpleStorage.deploy([args], {options}).then(function(anotherSimpleStorage) {});
``` ```
or it can be manually definied as or it can be manually definied as
```Javascript ```Javascript
var myContract = new EmbarkJS.Contract({abi: abiObject, code: code}); var myContract = new EmbarkJS.Contract({abi: abiObject, code: code});
myContract.deploy().then(function(anotherMyContractObject) {}); myContract.deploy([args], {options}).then(function(anotherMyContractObject) {});
```
so you can define your gas as
```Javascript
myContract.deploy([100, "seconde argument"], {gas: 800000}).then(function(anotherMyContractObject) {});
``` ```
EmbarkJS - Storage EmbarkJS - Storage

View File

@ -20,11 +20,17 @@ existing contracts:
.. code:: javascript .. code:: javascript
SimpleStorage.deploy().then(function(anotherSimpleStorage) {}); SimpleStorage.deploy([args], {options}).then(function(anotherSimpleStorage) {});
or it can be manually definied as or it can be manually definied as
.. code:: javascript .. code:: javascript
var myContract = new EmbarkJS.Contract({abi: abiObject, code: code}); var myContract = new EmbarkJS.Contract({abi: abiObject, code: code});
myContract.deploy().then(function(anotherMyContractObject) {}); myContract.deploy([args], {options}).then(function(anotherMyContractObject) {});
so you can define your gas as
.. code:: javascript
myContract.deploy([100, "seconde argument"], {gas: 800000}).then(function(anotherMyContractObject) {});