Created
March 31, 2020 16:21
-
-
Save agoiabel/f664ab137d7b4d8758d1115d6f4acb42 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.5.3; | |
contract Mapping { | |
mapping(address => uint) balances; | |
function manipulateMap() external { | |
balances[msg.sender] = 100; //assign a value; | |
balances[msg.sender] //read a value; | |
balances[unknown_key] //will return the default value of the type, i.e 0 for uint | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment