I want to map names(string) with a wallet address in solidity but solidity throws an error saying that its not allowed!
mapping(string => address) public users;
And this is the error I get:
TypeError: Dynamically-sized keys for public mappings are not supported.
mapping(string => address) public users;
^-------------------------------------^
Is there any other way to do it?
New here! Suggestions would be appreciated! Thanks in advance!
public
tointernal
orprivate
. – goodvibration Nov 13 '19 at 11:05