diff options
author | Yoichi Hirai <i@yoichihirai.com> | 2016-11-04 17:55:03 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-04 17:55:03 +0800 |
commit | d97d267a96b973104e9d29bed3e6cedcd223a96b (patch) | |
tree | b36ddadd9cd0cd1412be91f95cfdd07286d4e535 | |
parent | 5d19727c2fc6956e68fc266874fa2a02d627c4f4 (diff) | |
parent | 364698255aef1638e8d3e917dfc5a577312e6d07 (diff) | |
download | dexon-solidity-d97d267a96b973104e9d29bed3e6cedcd223a96b.tar dexon-solidity-d97d267a96b973104e9d29bed3e6cedcd223a96b.tar.gz dexon-solidity-d97d267a96b973104e9d29bed3e6cedcd223a96b.tar.bz2 dexon-solidity-d97d267a96b973104e9d29bed3e6cedcd223a96b.tar.lz dexon-solidity-d97d267a96b973104e9d29bed3e6cedcd223a96b.tar.xz dexon-solidity-d97d267a96b973104e9d29bed3e6cedcd223a96b.tar.zst dexon-solidity-d97d267a96b973104e9d29bed3e6cedcd223a96b.zip |
Merge pull request #1323 from varunagarwal315/patch-1
Update solidity-by-example.rst
-rw-r--r-- | docs/solidity-by-example.rst | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/solidity-by-example.rst b/docs/solidity-by-example.rst index 2e53b78c..915cfa76 100644 --- a/docs/solidity-by-example.rst +++ b/docs/solidity-by-example.rst @@ -170,6 +170,15 @@ of votes. } } } + + // Calls winningProposal() function to get the index + // of the winner contained in the proposals array and then + // returns the name of the winner + function winnerName() constant + returns (bytes32 winnerName) + { + winnerName = proposals[winningProposal()].name; + } } Possible Improvements |