Reinitialise lub zresetuj wszystkie wartości w mapowaniu w solidności

// example mapping:
mapping(address => uint256) investments;

// you have to have an list storing the addresses in order to iterate over the mapping
address [] investers;

// function to reset all values in the mapping to {value}
function resetBalance(uint256 value)public {
	// iterate over the array to iterate over the mapping and reset all to value
    for (uint i=0; i< investers.length ; i++) {
        investments[investers[i]] = value;
    }
}
Anxious Alligator