If you’re using OpenZeppelin smart contract code with access control, you will encounter a function called
grantRole (see red box) depicted below on Remix on how to assign a role to a wallet address.
The question you might ask is what should I fill in the
role parameter. You actually have to fill in the role such as
MINTER_ROLE to assign the minting privilege to an address, or
DEFAULT_ADMIN_ROLE to assign a wallet to be the admin of the contract.
But the parameter only accepts bytes32 input. Thus, to obtain the bytes32 data, scroll down on the list of functions you have and find the variable
DEFAULT_ADMIN_ROLE and click on them, as shown below, in red boxes.
And you will get the bytes32 version such as
You then just have to copy these data types and paste them on the role parameter in the
grantRole function and also include a wallet address. Then, hit the call button.