mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-05-05 14:28:31 +00: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:
commit
2c7c608d8c
@ -111,6 +111,7 @@ contract SimpleBank { // CapWords
|
|||||||
/// @return The balance of the user
|
/// @return The balance of the user
|
||||||
// 'constant' prevents function from editing state variables;
|
// 'constant' prevents function from editing state variables;
|
||||||
// allows function to run locally/off blockchain
|
// 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) {
|
function balance() constant public returns (uint) {
|
||||||
return balances[msg.sender];
|
return balances[msg.sender];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user