How to change the defaultownership of an ERC777 contract?

@abcoathup
How to implement in an ERC777 contract to change or add the function of defaultownership for change the Owner. If an example you will make for me it will more helpful for me.

Thanks for help and support continuously :revolving_hearts: :revolving_hearts:@abcoathup

1 Like

Hi @Rahaman,

An ERC777 doesn’t have an owner unless you add ownership to your contract.

An ERC777 can have default operators that are set at the time of deployment.

1 Like

@abcoathup
Then How to change the default operators & sat an owner?

1 Like

Hi @Rahaman,

Apologies, I had missed your followup question.

For how to use Ownable, please see the documentation: https://docs.openzeppelin.com/contracts/3.x/access-control#ownership-and-ownable

We can set the defaultOperators in the constructor of our ERC777 contract: https://docs.openzeppelin.com/contracts/3.x/api/token/erc777#ERC777-constructor-string-string-address---

1 Like

@abcoathup
No need to Apologies! Thanks for help and support ! :+1: :revolving_hearts:

1 Like