Renounce the ownership

:computer: Environment

:memo:Details

:1234: Code to reproduce

Hello, i know it is easy but i don’t know how to renounce the ownership when i create a crypto, can you guys tell me how to do it, please ?
Thanks

1 Like

why this information is unfindable ?

1 Like

Does your contract inherit ownable?

Is your contract ownable?

It should have a function called renounceOwnership

If you are new to developing please follow OpenZeppelin Upgrades: Step by Step Tutorial for Hardhat

Read through the documentation.

https://docs.openzeppelin.com/contracts/4.x/

1 Like

Thank you.

I used the code of binance : https://docs.binance.org/smart-chain/developer/issue-BEP20.html

There is a function to renounce ownership which is :

function renounceOwnership() public onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}

But I do not know how do I activate the function. I create my token but then how do I use this function please ?

Thanks.

1 Like

Go to your contract on https://bscscan.com/, connect to Web3, and activate the function if you are the owner.

I highly recommend following beginner tutorials if you are new. Taking the time to learn these things seems like a hassle, but it is worth it in the long run.

1 Like

Thank you very mutch !

1 Like

Question: if a contract with an Admin upgradeability proxy is renounced, can the proxy still make changes to the contract?