# Delayed Upgrades

DeFiner upgradeable contracts (SavingAccount.sol, Bank.sol, Accounts.sol) are governed by the ProxyAdmin contract. These three contracts can be upgraded to new implementation via ProxyAdmin. From now on this ProxyAdmin contract's ownership is transferred to the TimelockController contract (from OpenZeppelin). Hence, any upgrade of the contract will be done via TimelockController contract. The TimelockController contract also enforces a delayed execution of the scheduled requests.

### TimelockController.sol

The TimelockController contract is developed by OpenZeppelin. This contract has three roles which manages the request and their execution. These three roles are.

1. **TIMELOCK\_ADMIN\_ROLE**: This role can grant or revoke other two roles from the contract.
2. **PROPOSER\_ROLE**: This role can propose and schedule a request to the contract for the delayed execution.
3. **EXECUTOR\_ROLE**: This role can execute an already scheduled request after the given delay is passed.

At DeFiner we are managing these roles with different hardware wallets. When in the future we plan to upgrade the contract, we will publish the information to the community, so that they can take the informed decisions. The upgrade will be executed after 48 hours of delay.

### Addresses

#### Mainnet

{% tabs %}
{% tab title="OKExChain" %}

| Contract           | Address                                                                                                                           |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------- |
| ProxyAdmin         | [0x7EbAe3a7839D8d75A228D277006FACF11A7c8675](https://www.oklink.com/okexchain/address/0x7EbAe3a7839D8d75A228D277006FACF11A7c8675) |
| TimelockController | [0xe7E657daE574f33B6FF2ee3c40f4d127C055E758](https://www.oklink.com/okexchain/address/0xe7E657daE574f33B6FF2ee3c40f4d127C055E758) |

{% endtab %}

{% tab title="Ethereum" %}

{% endtab %}
{% endtabs %}

#### Testnet

{% tabs %}
{% tab title="OKExChain" %}

| Contract           | Address                                                                                                                                |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------- |
| ProxyAdmin         | [0x3FAE1633a4E24BAc2f615Fae2F845E796b7f44F7](https://www.oklink.com/okexchain-test/address/0x3FAE1633a4E24BAc2f615Fae2F845E796b7f44F7) |
| TimelockController | [0x3B6779C6eEAa4b3b88bAf22B2c863dAF00E46a5D](https://www.oklink.com/okexchain-test/address/0x3B6779C6eEAa4b3b88bAf22B2c863dAF00E46a5D) |
| {% endtab %}       |                                                                                                                                        |

{% tab title="Ethereum" %}

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.definer.org/copy-of-definer.org/smart-contract-modules/delayed-upgrades.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
