Hello,
I am trying to find the bytes32 for the roles in a contract and I am looking for any advice on where to find that.
Thank you
Hello,
I am trying to find the bytes32 for the roles in a contract and I am looking for any advice on where to find that.
Thank you
Your question is unclear and it appears as if you've made zero effort in trying to make it clear.
Are you looking for a way to convert a plain string into bytes32?
Are you looking for a way to query a given contract which roles have been granted by it?
Are you looking for a way to test if a given account has been granted a given role on a given contract?
Please spend a little more time and effort in explaining exactly what it is that you are trying to ask.
I believe he wants to know how he should setup roles or how he can get the roles in bytes32.
for example:
bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");
You can access the smart contract on read tab and see the bytes for this role.
If you're trying to find what are the available roles, that's unfortunately not possible since there's no standard way of interpreting the bytes32
representing each role in each contract.
Perhaps you may want to check this roles dictionary with the most common string
to bytes32
mappings of roles we've found.