aboutsummaryrefslogtreecommitdiffstats
path: root/docs/contracts.rst
diff options
context:
space:
mode:
authorcseberino <cseberino@gmail.com>2016-05-31 04:27:02 +0800
committerchriseth <c@ethdev.com>2016-08-01 18:12:06 +0800
commita20e03135b4fd681a25544acd78865c9388faaed (patch)
treec1ee753279342a250fda5d61858f8dc7c66edb13 /docs/contracts.rst
parent8c5a56d8648c9722d96638bf6dc1be94c7828cb3 (diff)
downloaddexon-solidity-a20e03135b4fd681a25544acd78865c9388faaed.tar.gz
dexon-solidity-a20e03135b4fd681a25544acd78865c9388faaed.tar.zst
dexon-solidity-a20e03135b4fd681a25544acd78865c9388faaed.zip
Update contracts.rst
Diffstat (limited to 'docs/contracts.rst')
-rw-r--r--docs/contracts.rst8
1 files changed, 6 insertions, 2 deletions
diff --git a/docs/contracts.rst b/docs/contracts.rst
index 81c5d353..372d24da 100644
--- a/docs/contracts.rst
+++ b/docs/contracts.rst
@@ -23,7 +23,10 @@ name as the contract) is executed once.
From ``web3.js``, i.e. the JavaScript
API, this is done as follows::
+ var source = <<Need to specify some source including contract name for the data param below.>>
+
// The json abi array generated by the compiler
+
var abiArray = [
{
"inputs":[
@@ -41,12 +44,13 @@ API, this is done as follows::
}
];
- var MyContract = web3.eth.contract(abiArray);
+ var MyContract_ = web3.eth.contract(source);
+ MyContract = web3.eth.contract(MyContract_.CONTRACT_NAME.info.abiDefinition);
// deploy new contract
var contractInstance = MyContract.new(
10,
11,
- {from: myAccount, gas: 1000000}
+ {from: myAccount, gas: 1000000, data = MyContract.CONTRACT_NAME.code}
);
.. index:: constructor;arguments