diff options
author | Denton Liu <liu.denton+github@gmail.com> | 2016-05-18 23:05:28 +0800 |
---|---|---|
committer | Denton Liu <liu.denton+github@gmail.com> | 2016-05-18 23:35:32 +0800 |
commit | 7c22a387f34d5cbc92b6b6ed78c281a480ba7739 (patch) | |
tree | 8300e1a97cc6537ff463ef705a5b28b313cfb6a0 /docs/contracts.rst | |
parent | ff26ea6c08a400192c5a5fff581a7ce649f717bd (diff) | |
download | dexon-solidity-7c22a387f34d5cbc92b6b6ed78c281a480ba7739.tar.gz dexon-solidity-7c22a387f34d5cbc92b6b6ed78c281a480ba7739.tar.zst dexon-solidity-7c22a387f34d5cbc92b6b6ed78c281a480ba7739.zip |
Changed whitespace formatting
Diffstat (limited to 'docs/contracts.rst')
-rw-r--r-- | docs/contracts.rst | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/docs/contracts.rst b/docs/contracts.rst index ddfeb78c..dd75e857 100644 --- a/docs/contracts.rst +++ b/docs/contracts.rst @@ -25,27 +25,28 @@ API, this is done as follows:: // The json abi array generated by the compiler var abiArray = [ - { - "inputs":[ - {"name":"x","type":"uint256"}, - {"name":"y","type":"uint256"} - ], - "type":"constructor" - }, - { - "constant":true, - "inputs":[], - "name":"x", - "outputs":[{"name":"","type":"bytes32"}], - "type":"function" - } + { + "inputs":[ + {"name":"x","type":"uint256"}, + {"name":"y","type":"uint256"} + ], + "type":"constructor" + }, + { + "constant":true, + "inputs":[], + "name":"x", + "outputs":[{"name":"","type":"bytes32"}], + "type":"function" + } ]; var MyContract = web3.eth.contract(abiArray); // deploy new contract var contractInstance = MyContract.new( - 10, 11, - {from: myAccount, gas: 1000000} + 10, + 11, + {from: myAccount, gas: 1000000} ); .. index:: constructor;arguments @@ -375,13 +376,13 @@ possible. contract Caller { - function callTest(address testAddress) { - Test(testAddress).call(0xabcdef01); // hash does not exist - // results in Test(testAddress).x becoming == 1. - Rejector r = Rejector(0x123); - r.send(2 ether); - // results in r.balance == 0 - } + function callTest(address testAddress) { + Test(testAddress).call(0xabcdef01); // hash does not exist + // results in Test(testAddress).x becoming == 1. + Rejector r = Rejector(0x123); + r.send(2 ether); + // results in r.balance == 0 + } } .. index:: ! event |