From d8b41162da44c57b82a95b2a1c520663fe1ee411 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E4=BF=8A=E9=92=A6?= Date: Sat, 11 Mar 2017 16:54:59 +0800 Subject: [PATCH 1/3] Update README.md Correct directory, update dapp structure, update deployment usage guide --- README.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6e2edae7f..449de065b 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ Table of Contents * [Testing Contracts](#tests) * [Working with different chains](#working-with-different-chains) * [Custom Application Structure](#structuring-application) -* [Deploying to IPFS](#deploying-to-ipfs) +* [Deploying to IPFS](#deploying-to-ipfs-and-swarm) * [Extending Functionality with Plugins](#plugins) * [Donations](#donations) @@ -147,6 +147,9 @@ DApp Structure config/ |___ blockchain.json #environments configuration |___ contracts.json #contracts configuration + |___ storage.json #storage configuration + |___ webserver.json #webserver configuration + |___ communication.json #communication configuration test/ |___ #contracts tests ``` @@ -323,14 +326,20 @@ events: Client side deployment will be automatically available in Embark for existing contracts: ```Javascript - SimpleStorage.deploy().then(function(anotherSimpleStorage) {}); + SimpleStorage.deploy([args], {options}).then(function(anotherSimpleStorage) {}); ``` or it can be manually definied as ```Javascript 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 From 15e8b4692340f967f1846eddb1dff68a4f684620 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E4=BF=8A=E9=92=A6?= Date: Sat, 11 Mar 2017 17:04:51 +0800 Subject: [PATCH 2/3] Update README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 449de065b..3fa98e19b 100644 --- a/README.md +++ b/README.md @@ -145,11 +145,11 @@ DApp Structure |___ css/ |___ js/ config/ - |___ blockchain.json #environments configuration - |___ contracts.json #contracts configuration - |___ storage.json #storage configuration - |___ webserver.json #webserver configuration - |___ communication.json #communication configuration + |___ blockchain.json #rpc and blockchain configuration + |___ contracts.json #ethereum contracts configuration + |___ storage.json #ipfs configuration + |___ communication.json #whisper/orbit configuration + |___ webserver.json #dev webserver configuration test/ |___ #contracts tests ``` From f8322ba665378b314e153858f594487f3ff94d86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E4=BF=8A=E9=92=A6?= Date: Sat, 11 Mar 2017 17:07:34 +0800 Subject: [PATCH 3/3] Update embarkjs.rst update deploy usage --- docs/embarkjs.rst | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/embarkjs.rst b/docs/embarkjs.rst index 50c0e7474..dd6a39fcc 100644 --- a/docs/embarkjs.rst +++ b/docs/embarkjs.rst @@ -20,11 +20,17 @@ existing contracts: .. code:: javascript - SimpleStorage.deploy().then(function(anotherSimpleStorage) {}); + SimpleStorage.deploy([args], {options}).then(function(anotherSimpleStorage) {}); or it can be manually definied as .. code:: javascript 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) {});