Solidity Code Completion Medium +20 XP
Mapping Declaration
Complete the mapping for token balances.
SolidityFill in the blank
___(address => uint256) public balances;Type the missing code
Show answer and explanation
Answer: mapping
mapping is Solidity's key-value store. mapping(address => uint256) maps wallet addresses to token amounts.
Hint: What is Solidity's key-value type?
What this challenge tests
Code Completion in Solidity: mapping, data-structures.