I created mapping address-> uint
and i need to make whole mapping -> uints
values set to 0 is it possible?
1 Answer
i need to make whole mapping -> uints values set to 0
If you're talking about immediately after creation, they already are.
https://docs.soliditylang.org/en/v0.8.0/types.html?highlight=types#mapping-types
"You can think of mappings as hash tables, which are virtually initialised such that every possible key exists and is mapped to a value whose byte-representation is all zeros, a type’s default value."
If you're talking about later on, after the mapping has been used, then you'll need a way to record which addresses have had non-zero values set.
See Clearing Mappings in the official docs.