Questions about creating ERC20 contract with Ownable and MinterRole functionalities

Hi,
I want to create an ERC20 contract.
It’s able to mint more token after initial issue.
At the same time, after its depolyment I want to tranfer the ownership of the contract to another account.
Only the owner of contract can mint token.

I have created mintable contract using:

contract ERC20MintableRatio is ERC20, MinterRole {
}

so how can I add ownership function based on that? can you show some demo code for reference?
meanwhile, after the ownership transfer, will the mint capability also transfer to new account? it’s a little confused.

Thanks for your help.

1 Like

Have you read the docs on Ownership and Access Control?

1 Like

Thanks for your info. I found the method to define and transfer Ownership from the link.

1 Like

Hi @Ntydrm,

Depending on your requirements, you may not need an Owner, you could just have an account with the MinterRole and then add additional minters, renounce minters as required.