I have a token, let's call it TokenA, that inherits from Open Zeppelin Whitelist.sol. TokenB and TokenC both inherit from TokenA and they each have some additional functions.
I want all three Tokens to share the same whitlist, meaning: - if I call addAddressToWhitelist in TokenA, whitelist(address), which is a function that returns true if the address is whitelisted and false if not, should return true if called from contract B or C.
How do I do that (or is it even possible)?
My current solution is to call addAddressToWhitelist in all 3 Tokens which doesn't seem very elegant.
TokenA
instances in your system. Are you sure that this aligns well with your design intentions? What exactly is your purpose in having the other two tokens inherit from the first one? Sounds to me like they should take its address at construction rather than inherit from it. – goodvibration Sep 2 '18 at 18:10