> For the complete documentation index, see [llms.txt](https://yuga.gitbook.io/zkyuga-whitepaper/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://yuga.gitbook.io/zkyuga-whitepaper/developer-guide/erc20/renounceownership.md).

# renounceOwnership

## renounceOwnership

The `renounceOwnership` method enables the current owner of a smart contract to voluntarily surrender their ownership privileges. Upon execution, the contract will be left without an owner, and certain functionalities typically restricted to the owner may become inaccessible. It's crucial to exercise extreme caution before utilizing this method, as the operation is irreversible. This method is commonly utilized in contracts implementing the `Ownable` pattern.

### Function Signature

```javascript
async renounceOwnership(signer: WalletSigner): Promise<string>
```

#### Parameters

| Parameter | Type         | Description                                                                                                                                           |
| --------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| signer    | WalletSigner | The wallet signer instance responsible for signing the transaction. It must represent the current owner of the contract for the operation to succeed. |

#### Returns

* A `Promise` resolving to a `string`, typically indicating the success of the ownership renouncement through the transaction hash.

### Usage Example

Before executing the `renounceOwnership` method, ensure that you possess a signer instance corresponding to the current owner of the contract:

```javascript
const signer = zkyugaClient.createWalletSigner("current owner's private key");
```

Then, call the `renounceOwnership` method:

```javascript
const transactionHash = await contractInstance.renounceOwnership(signer);
console.log(`Ownership Renounced! Transaction Hash: ${transactionHash}`);
```

### Considerations

* **Irreversible Action**: Once ownership is renounced, it cannot be reclaimed. Thoroughly consider all implications before proceeding with this action.
* The provided `signer` must accurately represent the current owner of the contract. Otherwise, the transaction is likely to fail.
* This method is commonly found in contracts implementing the `Ownable` pattern or similar ownership structures.
* Always handle the `signer` securely to prevent unauthorized access. Avoid exposing private keys in insecure environments.

***
