Hi Nico,

as you say, there is no right or wrong, all depends on your specific use case.

However, looking back at the blockchain history should be acceptable for audits, even if uncomfortable for administration. Since the code is also clearer by using a mapping and this article is intended to teach other developers, I changed RBAC.sol according to your suggestion. I even did some extra work to show the gas usage of hasRole.

Thanks again!

Written by

Blockchain Architect | Distributed and High Performance Computing Expert | Chaotic and Complex Systems Fanboy

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store