> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oumla.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Deployed Contracts

> SDK methods for managing deployed contracts

Manage deployed smart contracts and contract ABIs.

## Methods

### `getDeployedContracts()`

Get a paginated list of deployed contracts.

**Signature:**

```typescript theme={null}
getDeployedContracts(
  request?: GetDeployedContractsRequest,
  requestOptions?: RequestOptions
): Promise<DeployedContractsResponse>
```

**Example:**

```typescript theme={null}
const contracts = await client.deployedContracts.getDeployedContracts({
  networkId: 'your-network-id',
  skip: 0,
  take: 50
});

console.log('Deployed contracts:', contracts.data);
```

***

### `getDeployedContractById()`

Get details for a specific deployed contract by deployment ID.

**Signature:**

```typescript theme={null}
getDeployedContractById(
  deploymentId: string,
  requestOptions?: RequestOptions
): Promise<DeployedContractResponse>
```

**Example:**

```typescript theme={null}
const contract = await client.deployedContracts.getDeployedContractById('deployment-id');

console.log('Contract Address:', contract.data.deployedContract?.contractAddress);
console.log('Network:', contract.data.deployedContract?.network);
```

***

### `getDeployedContractByAddress()`

Get deployed contract details by contract address and network.

**Signature:**

```typescript theme={null}
getDeployedContractByAddress(
  contractAddress: string,
  networkId: string,
  requestOptions?: RequestOptions
): Promise<DeployedContractResponse>
```

**Parameters:**

| Parameter         | Type     | Required | Description                            |
| ----------------- | -------- | -------- | -------------------------------------- |
| `contractAddress` | `string` | Yes      | Contract address                       |
| `networkId`       | `string` | Yes      | Network ID (UUID from `getNetworks()`) |

**Example:**

```typescript theme={null}
const contract = await client.deployedContracts.getDeployedContractByAddress(
  '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
  'your-network-id'
);
```

***

### `fetchContractAbi()`

Fetch contract ABI from a blockchain explorer.

**Signature:**

```typescript theme={null}
fetchContractAbi(
  request: FetchContractAbiRequest,
  requestOptions?: RequestOptions
): Promise<ContractAbiResponse>
```

**Example:**

```typescript theme={null}
const abi = await client.deployedContracts.fetchContractAbi({
  contractAddress: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
  networkId: 'your-network-id'
});

console.log('ABI:', abi.data.contractAbi?.abi);
```

***

### `addContractAbi()`

Add or update contract ABI manually.

**Signature:**

```typescript theme={null}
addContractAbi(
  request: AddContractAbiRequest,
  requestOptions?: RequestOptions
): Promise<void>
```

**Example:**

```typescript theme={null}
await client.deployedContracts.addContractAbi({
  contractAddress: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
  networkId: 'your-network-id',
  name: 'MyContract',
  abi: [
    {
      "inputs": [],
      "name": "name",
      "outputs": [{"type": "string"}],
      "stateMutability": "view",
      "type": "function"
    }
  ]
});
```
