diff options
author | Denton Liu <liu.denton+github@gmail.com> | 2016-05-14 02:06:02 +0800 |
---|---|---|
committer | Denton Liu <liu.denton+github@gmail.com> | 2016-05-18 23:35:32 +0800 |
commit | ff26ea6c08a400192c5a5fff581a7ce649f717bd (patch) | |
tree | 591bc28004622375dc280175f8777a53f25be59c /docs/introduction-to-smart-contracts.rst | |
parent | d4ad3231a294bad3b5c81cde6e27ff38ecef7f76 (diff) | |
download | dexon-solidity-ff26ea6c08a400192c5a5fff581a7ce649f717bd.tar.gz dexon-solidity-ff26ea6c08a400192c5a5fff581a7ce649f717bd.tar.zst dexon-solidity-ff26ea6c08a400192c5a5fff581a7ce649f717bd.zip |
Added space to example code
Diffstat (limited to 'docs/introduction-to-smart-contracts.rst')
-rw-r--r-- | docs/introduction-to-smart-contracts.rst | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/introduction-to-smart-contracts.rst b/docs/introduction-to-smart-contracts.rst index cecd6b91..6dd0cf8f 100644 --- a/docs/introduction-to-smart-contracts.rst +++ b/docs/introduction-to-smart-contracts.rst @@ -20,9 +20,11 @@ Storage contract SimpleStorage { uint storedData; + function set(uint x) { storedData = x; } + function get() constant returns (uint retVal) { return storedData; } @@ -88,10 +90,12 @@ registering with username and password - all you need is an Ethereum keypair. function Coin() { minter = msg.sender; } + function mint(address receiver, uint amount) { if (msg.sender != minter) return; balances[receiver] += amount; } + function send(address receiver, uint amount) { if (balances[msg.sender] < amount) return; balances[msg.sender] -= amount; |