In my requirement I have list of whitelist domains(xyz.com, abc.com etc.) and I have to write smart contract to check the data is coming from one of our whitelisted domains...
Solution number two: Store whitelisted domains in string and loop through the array and if my newdomain is available in my whitelisted domains array.
I am wondering which solution is better for my scenario?
Also there is one more problem, how can I validate data like http://xyz.com, www.xyz.com, xyz.com etc all of them are valid domains