# Identify version of contracts

## Identifying Your Vesting Contract Version

Before using any of the guides below, you need to determine which version of the Decubate Vesting contract your project is using. There are three versions: **V1**, **V2**, and **V3**.

***

### Quick Identification Steps

#### Step 1: Open Your Contract on a Block Explorer

1. Go to the block explorer for your chain (e.g., Etherscan, BscScan, BaseScan, Polygonscan).
2. Paste your vesting contract address in the search bar.
3. Navigate to the **"Read Contract"** tab (or **"Read as Proxy"** if available).

#### Step 2: Look for These Functions

Use the table below to identify your version. Check whether the following functions exist on your contract:

| Function / Field                    | V1 | V2  | V3  |
| ----------------------------------- | -- | --- | --- |
| `getVestingInfo` returns `vestType` | No | Yes | Yes |
| `claimFee`                          | No | No  | Yes |
| `setManagerRole`                    | No | No  | Yes |
| `setVestingStatus`                  | No | No  | Yes |
| `hasRole`                           | No | No  | Yes |
| `vestingPools` returns `vestType`   | No | Yes | Yes |

#### Step 3: Follow the Decision Tree

```
1. Go to "Read Contract" (or "Read as Proxy").

2. Do you see a function called "claimFee"?
   ├─ YES → You are on V3. Follow the V3 guide.
   └─ NO  → Continue to step 3.

3. Call "getVestingInfo" with input 0.
   Does the result include a "vestType" field?
   ├─ YES → You are on V2. Follow the V2 guide.
   └─ NO  → You are on V1. Follow the V1 guide.
```

> **Tip:** If the explorer shows a **"Read as Proxy"** tab, your contract is likely V3 (the upgradeable version). V1 and V2 are not upgradeable and will only show **"Read Contract"**.

***

### Version Summary

#### V1 — DecubateVesting

* **Vesting type:** Linear only (no Monthly or Interval options).
* **Access control:** Single owner (`Ownable`).
* **Key trait:** `getVestingInfo` returns 6 fields (name, cliff, start, duration, initialUnlockPercent, revocable) — no `vestType`.

#### V2 — DecubateVestingV2 (Ownable)

* **Vesting types:** Linear, Monthly, and Interval.
* **Access control:** Single owner (`Ownable`).
* **Key trait:** `getVestingInfo` returns fields including `vestType`, `interval`, `unlockPerInterval`, and `timestamps` — but no `isDisabled` field. No `claimFee` function.

#### V3 — DecubateVestingV2 (Upgradeable)

* **Vesting types:** Linear, Monthly, and Interval.
* **Access control:** Role-based (`AccessControl`) with `DEFAULT_ADMIN_ROLE` and `MANAGER_ROLE`.
* **Key trait:** Has `claimFee` function, `setManagerRole`, `setVestingStatus`, and `getVestingInfo` returns an `isDisabled` field. Uses a proxy pattern ("Read as Proxy" on the explorer).

***

### Next Steps

Once you know your version, follow the appropriate guide:

* V1 Vesting Guide
* V2 Vesting Guide
* V3 Vesting Guide


---

# 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://tms-finance.gitbook.io/tms.finance/vesting-contracts/identify-version-of-contracts.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.
