1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-18 20:41:29 +02:00

Merge pull request #3269 from chriszimmerman/GH-3065-solidity-constant

[Solidity/en] - # 3065 - Adds deprecation reminder for constant modifier in Solidity English d…
This commit is contained in:
Divay Prakash
2018-10-08 23:14:37 +05:30
committed by GitHub

View File

@@ -111,6 +111,7 @@ contract SimpleBank { // CapWords
/// @return The balance of the user
// 'constant' prevents function from editing state variables;
// allows function to run locally/off blockchain
// NOTE: 'constant' on functions is an alias to 'view', but this is deprecated and is planned to be dropped in version 0.5.0.
function balance() constant public returns (uint) {
return balances[msg.sender];
}