aboutsummaryrefslogtreecommitdiffstats
path: root/docs/frequently-asked-questions.rst
diff options
context:
space:
mode:
authorRJ <catalanor0220@gmail.com>2016-03-24 05:42:01 +0800
committerRJ <catalanor0220@gmail.com>2016-03-24 05:42:01 +0800
commit49dc38bac02580a5082d4519b67a1336ff0aa6e2 (patch)
treefd533a0d249b0ec420e7336e4c219677265a01b0 /docs/frequently-asked-questions.rst
parent2c5641a1dbfdda4104176c7eb238891f99478664 (diff)
downloaddexon-solidity-49dc38bac02580a5082d4519b67a1336ff0aa6e2.tar
dexon-solidity-49dc38bac02580a5082d4519b67a1336ff0aa6e2.tar.gz
dexon-solidity-49dc38bac02580a5082d4519b67a1336ff0aa6e2.tar.bz2
dexon-solidity-49dc38bac02580a5082d4519b67a1336ff0aa6e2.tar.lz
dexon-solidity-49dc38bac02580a5082d4519b67a1336ff0aa6e2.tar.xz
dexon-solidity-49dc38bac02580a5082d4519b67a1336ff0aa6e2.tar.zst
dexon-solidity-49dc38bac02580a5082d4519b67a1336ff0aa6e2.zip
Update frequently-asked-questions.rst
Diffstat (limited to 'docs/frequently-asked-questions.rst')
-rw-r--r--docs/frequently-asked-questions.rst15
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/frequently-asked-questions.rst b/docs/frequently-asked-questions.rst
index db37a272..94fc9344 100644
--- a/docs/frequently-asked-questions.rst
+++ b/docs/frequently-asked-questions.rst
@@ -613,6 +613,7 @@ Note that the full code of the created contract has to be included in the creato
This also means that cyclic creations are not possible (because the contract would have
to contain its own code) - at least not in a general way.
+
How do you create 2-dimensional arrays?
=======================================
@@ -647,6 +648,20 @@ gas and return your 20 Wei).
In the above example, the low-level function `call` is used to invoke another
contract with `p.data` as payload and `p.amount` Wei is sent with that call.
+How do I initialize a contract with only a specific amount of wei?
+==================================================================
+
+Currently the approach is a little ugly, but there is little that can be done to improve it.
+You will need to make sure that you have both contracts aware of each other's presence.
+In this example::
+ contract B {}
+ contract A {
+ address child;
+ function test() {
+ child = (new B).value(10)(); //construct a new B with 10 wei
+ }
+ }
+
Can a contract function accept a two-dimensional array?
=======================================================