aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2016-08-01 18:14:17 +0800
committerchriseth <c@ethdev.com>2016-08-01 18:14:17 +0800
commitd5e536a4fb2a87efe8de3df9bda487ca2459e24c (patch)
tree67315359234f7c9382ba6e13418bd90276cd5330 /docs
parenta20e03135b4fd681a25544acd78865c9388faaed (diff)
downloaddexon-solidity-d5e536a4fb2a87efe8de3df9bda487ca2459e24c.tar
dexon-solidity-d5e536a4fb2a87efe8de3df9bda487ca2459e24c.tar.gz
dexon-solidity-d5e536a4fb2a87efe8de3df9bda487ca2459e24c.tar.bz2
dexon-solidity-d5e536a4fb2a87efe8de3df9bda487ca2459e24c.tar.lz
dexon-solidity-d5e536a4fb2a87efe8de3df9bda487ca2459e24c.tar.xz
dexon-solidity-d5e536a4fb2a87efe8de3df9bda487ca2459e24c.tar.zst
dexon-solidity-d5e536a4fb2a87efe8de3df9bda487ca2459e24c.zip
Made snippet work as is.
Diffstat (limited to 'docs')
-rw-r--r--docs/contracts.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/contracts.rst b/docs/contracts.rst
index 372d24da..3d592ecf 100644
--- a/docs/contracts.rst
+++ b/docs/contracts.rst
@@ -23,10 +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.>>
+ // Need to specify some source including contract name for the data param below
+ var source = "contract CONTRACT_NAME { function CONTRACT_NAME(unit a, uint b) {} }";
// The json abi array generated by the compiler
-
var abiArray = [
{
"inputs":[
@@ -50,7 +50,7 @@ API, this is done as follows::
var contractInstance = MyContract.new(
10,
11,
- {from: myAccount, gas: 1000000, data = MyContract.CONTRACT_NAME.code}
+ {from: myAccount, gas: 1000000}
);
.. index:: constructor;arguments