diff options
author | Adam <adam@adambard.com> | 2016-10-21 15:35:09 -0700 |
---|---|---|
committer | Adam <adam@adambard.com> | 2016-10-21 15:35:09 -0700 |
commit | 620e5d20402be961d27ce6cc6a007204c81391d4 (patch) | |
tree | e33427b1aa82c11a8e974ccd8a02b789de4c9737 /solidity.html.markdown | |
parent | de376b4357e79fc847e4c1ae2717946fe05d3bef (diff) | |
parent | 0659107a78bddd722df816daa01ee622fb4508d1 (diff) |
Merge branch 'master' of github.com:adambard/learnxinyminutes-docs
Diffstat (limited to 'solidity.html.markdown')
-rw-r--r-- | solidity.html.markdown | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/solidity.html.markdown b/solidity.html.markdown index 9bf5bf4d..0ad8af32 100644 --- a/solidity.html.markdown +++ b/solidity.html.markdown @@ -230,9 +230,9 @@ mapping (string => uint) public balances; balances["charles"] = 1; console.log(balances["ada"]); // is 0, all non-set key values return zeroes // 'public' allows following from another contract -contractName.balances("claude"); // returns 1 +contractName.balances("charles"); // returns 1 // 'public' created a getter (but not setter) like the following: -function balances(address _account) returns (uint balance) { +function balances(string _account) returns (uint balance) { return balances[_account]; } |