> For the complete documentation index, see [llms.txt](https://docs.tajirchain.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tajirchain.com/api-documentation/block-explorer-api/contract-verification-api.md).

# Contract Verification API

Tajir uses an Etherscan-compatible verification flow.

### **Verify Contract**

**Endpoint (POST)**

```
https://tajir-chain.gitbook.io/tajir_chain-docs/api-documentation/block-explorer-api/contract-verification-api
```

#### **Required Parameters**

| Name                   | Required | Description                                         |
| ---------------------- | -------- | --------------------------------------------------- |
| `addresshash`          | Yes      | Contract address to verify                          |
| `contractname`         | Yes      | Contract name (e.g., MyToken)                       |
| `sourceCode`           | Yes      | Solidity source code (flattened or JSON input)      |
| `codeformat`           | Yes      | `solidity-single` or `solidity-standard-json-input` |
| `compilerversion`      | Yes      | Solidity version (e.g., `v0.8.20+commit…`)          |
| `optimizationUsed`     | Yes      | `0` or `1`                                          |
| `runs`                 | Optional | Number of optimizer runs                            |
| `constructorArguments` | Optional | Hex-encoded constructor params                      |
| `evmversion`           | Optional | EVM version                                         |
| `apikey`               | Optional | API key if required                                 |

**Request Type**\
Must be sent as **multipart/form-data** (same as Etherscan).

***

#### **Sample Successful Response**

```json
{
  "status": "1",
  "message": "OK",
  "result": "GUID-123456789"
}
```

***

### **Check Verification Status**

**Endpoint (GET)**

```
GET https://<explorer-url>/api?module=contract&action=checkverifystatus&guid=<id>
```

#### **Sample Responses**

**Pending**

```json
{
  "status": "0",
  "message": "NOTOK",
  "result": "Pending in queue"
}
```

**Success**

```json
{
  "status": "1",
  "message": "OK",
  "result": "Verification successful"
}
```

**Failed**

```json
{
  "status": "0",
  "message": "NOTOK",
  "result": "Match bytecode failed"
}
```

***

### **Notes**

* Supports Etherscan-style verification workflow.
* Allows full public browsing of verified source code.
* Multi-file projects should use `solidity-standard-json-input`.
* Ensure constructor arguments are ABI-encoded when provided.
