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

# Setup & Prerequisites

> Obtain contract addresses, configure your RPC client, and install an Ethereum library

## Prerequisites

Before you begin, make sure you have:

1. **An Amplify API key** — Contact [Paxos Labs](mailto:support@paxoslabs.com) to get one
2. **An Ethereum RPC endpoint** — From [Alchemy](https://www.alchemy.com/), [Infura](https://www.infura.io/), [QuickNode](https://www.quicknode.com/), or any provider
3. **A wallet** with the deposit token (e.g., USDC) and ETH for gas fees
4. **The ABI snippets** — Provided in each guide (no need to compile Solidity). See [Concepts](/v0.5.2/intro/products/earn/developers/guides/direct-contract/concepts#what-is-an-abi) for an explanation of ABIs.

***

## Obtaining Contract Addresses

Contract addresses differ by **account** and **chain**. All contract addresses needed for direct integration are available via the Amplify GraphQL API — the same API the SDK uses internally.

### GraphQL Query

Send a POST request to `https://api.paxoslabs.com/graphql` with your API key:

```bash theme={null}
curl -s -X POST "https://api.paxoslabs.com/graphql" \
  -H "Content-Type: application/json" \
  -H "x-api-key: $AMPLIFY_API_KEY" \
  -d '{
    "query": "query AmplifySdkConfigs($chainId: Int, $yieldType: YieldType) { amplifySdkConfigs(chainId: $chainId, yieldType: $yieldType) { id chainId yieldType vault { id name chainId boringVaultAddress tellerModuleId accountantModuleId withdrawQueueModuleId communityCodeDepositorModuleId supportedAssets { address chainId depositable withdrawable symbol tokenName decimals } } } }",
    "variables": {}
  }' | jq
```

<Info>
  Pass `variables` to filter results. For example, `{"chainId": 1}` returns
  only Ethereum mainnet accounts, and `{"yieldType": "CORE"}` returns only CORE
  strategy accounts.
</Info>

### Response

Each item in `amplifySdkConfigs` contains a `vault` object with all the contract addresses you need:

```json theme={null}
{
  "data": {
    "amplifySdkConfigs": [
      {
        "id": "config-id",
        "chainId": 1,
        "yieldType": "CORE",
        "vault": {
          "id": "vault-id",
          "name": "Amplify Core",
          "chainId": 1,
          "boringVaultAddress": "0x...",
          "tellerModuleId": "0x...",
          "accountantModuleId": "0x...",
          "withdrawQueueModuleId": "0x...",
          "communityCodeDepositorModuleId": "0x...",
          "supportedAssets": [
            {
              "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
              "chainId": 1,
              "depositable": true,
              "withdrawable": true,
              "symbol": "USDC",
              "tokenName": "USD Coin",
              "decimals": 6
            }
          ]
        }
      }
    ]
  }
}
```

### Mapping Response Fields to Contract Addresses

| GraphQL Field                          | Contract                     | Used For                                                                                                                    |
| -------------------------------------- | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| `vault.boringVaultAddress`             | **BoringVault**              | ERC-20 account share token — approvals, balances                                                                            |
| `vault.communityCodeDepositorModuleId` | **DistributorCodeDepositor** | [Deposits](/v0.5.2/intro/products/earn/developers/guides/direct-contract/deposits) — `deposit()`, `depositWithPermit()`     |
| `vault.withdrawQueueModuleId`          | **WithdrawQueue**            | [Withdrawals](/v0.5.2/intro/products/earn/developers/guides/direct-contract/withdrawals) — `submitOrder()`, `cancelOrder()` |
| `vault.accountantModuleId`             | **Accountant**               | Exchange rate — `getRateInQuoteSafe()` for slippage/share conversion                                                        |
| `vault.tellerModuleId`                 | **Teller**                   | Pause state — `isPaused()`                                                                                                  |

<Note>
  The GraphQL field `communityCodeDepositorModuleId` is a legacy name. The contract it points to is the **DistributorCodeDepositor**. Use this address wherever the documentation refers to the `distributorCodeDepositorAddress`.
</Note>

<Warning>
  `withdrawQueueModuleId` and `communityCodeDepositorModuleId` can be `null`
  for accounts that don't support external withdrawals or deposits. Check for
  non-null values before using.
</Warning>

### Supported Assets

The `supportedAssets` array on each account tells you which tokens can be deposited or withdrawn:

| Field          | Description                                                    |
| -------------- | -------------------------------------------------------------- |
| `address`      | ERC-20 token contract address                                  |
| `chainId`      | Chain the token is on                                          |
| `depositable`  | Whether this token can be deposited                            |
| `withdrawable` | Whether this token can be used as the want asset on withdrawal |
| `symbol`       | Token symbol (e.g., `"USDC"`)                                  |
| `decimals`     | Token decimals (e.g., `6` for USDC)                            |

### Filtering by Chain or Yield Type

Pass `variables` to narrow results:

```bash theme={null}
# Ethereum mainnet only
curl -s -X POST "https://api.paxoslabs.com/graphql" \
  -H "Content-Type: application/json" \
  -H "x-api-key: $AMPLIFY_API_KEY" \
  -d '{
    "query": "query AmplifySdkConfigs($chainId: Int, $yieldType: YieldType) { amplifySdkConfigs(chainId: $chainId, yieldType: $yieldType) { id chainId yieldType vault { id name chainId boringVaultAddress tellerModuleId accountantModuleId withdrawQueueModuleId communityCodeDepositorModuleId supportedAssets { address chainId depositable withdrawable symbol tokenName decimals } } } }",
    "variables": { "chainId": 1 }
  }' | jq
```

```bash theme={null}
# CORE yield type only
curl -s -X POST "https://api.paxoslabs.com/graphql" \
  -H "Content-Type: application/json" \
  -H "x-api-key: $AMPLIFY_API_KEY" \
  -d '{
    "query": "query AmplifySdkConfigs($chainId: Int, $yieldType: YieldType) { amplifySdkConfigs(chainId: $chainId, yieldType: $yieldType) { id chainId yieldType vault { id name chainId boringVaultAddress tellerModuleId accountantModuleId withdrawQueueModuleId communityCodeDepositorModuleId supportedAssets { address chainId depositable withdrawable symbol tokenName decimals } } } }",
    "variables": { "yieldType": "CORE" }
  }' | jq
```

### Available Yield Types

| Value      | Description                 |
| ---------- | --------------------------- |
| `CORE`     | Standard yield strategy     |
| `PRIME`    | Maps to CORE in the SDK     |
| `TREASURY` | Treasury-backed strategy    |
| `TBILL`    | Maps to TREASURY in the SDK |
| `FRONTIER` | Higher-risk/reward strategy |
| `LENDING`  | Maps to FRONTIER in the SDK |

***

## Code Examples

Any language with an Ethereum JSON-RPC library can interact with Amplify contracts. The guides cover the contract methods you need to call — here are popular libraries for each language:

<Tabs>
  <Tab title="TypeScript" icon="code">
    **Library**: [viem](https://viem.sh)

    ```bash theme={null}
    pnpm add viem
    ```
  </Tab>

  <Tab title="Python" icon="code">
    **Library**: [web3.py](https://web3py.readthedocs.io/)

    ```bash theme={null}
    pip install web3
    ```
  </Tab>

  <Tab title="Go" icon="code">
    **Library**: [go-ethereum](https://geth.ethereum.org/) with `abigen`

    ```bash theme={null}
    go get github.com/ethereum/go-ethereum
    go install github.com/ethereum/go-ethereum/cmd/abigen@latest
    ```
  </Tab>

  <Tab title="Swift" icon="code">
    **Library**: [web3swift](https://github.com/web3swift-team/web3swift)

    Add via Swift Package Manager:

    ```
    https://github.com/web3swift-team/web3swift.git
    ```
  </Tab>

  <Tab title="Kotlin" icon="code">
    **Library**: [web3j](https://docs.web3j.io/)

    ```kotlin theme={null}
    // build.gradle.kts
    dependencies {
        implementation("org.web3j:core:4.12.0")
    }
    ```
  </Tab>

  <Tab title="Flutter" icon="code">
    **Library**: [web3dart](https://pub.dev/packages/web3dart)

    ```yaml theme={null}
    # pubspec.yaml
    dependencies:
      web3dart: ^2.7.3
      http: ^1.2.0
    ```
  </Tab>
</Tabs>

***

## Next Steps

* [Concepts](/v0.5.2/intro/products/earn/developers/guides/direct-contract/concepts) — Understand smart contracts, ABIs, approvals, permits, and account architecture
* [Deposits](/v0.5.2/intro/products/earn/developers/guides/direct-contract/deposits) — Implement your first deposit flow
