aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/introduction-to-smart-contracts.rst4
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;