Skip to content

Mapping doesn't have keys. How do we loop through the addresses?

Notifications You must be signed in to change notification settings

bernardpeh/solidity-loop-addresses-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Solidity mapping might look similar to an associative array but it is not. It doesn't have indices.

It is very common to use mapping to store user addresses and their value. Eg

mapping (address => uint) Users;

How do you loop through the addresses since it doesn't have any indices?

About

Mapping doesn't have keys. How do we loop through the addresses?

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published