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

# Symbiotic — Operator Opt-In Guide

> Deploy all required Symbiotic modules, configure your Vault, register your Operator, and opt-in to a Ditto Network.

## Common Addresses

**Sepolia Testnet**

* **wstETH:** `0xB82381A3fBD3FaFA77B3a7bE693342618240067b`
* **Network:** `0x683Ed12e213a6D78C338D4e18440C42bb936085A`
* **NetworkMiddleware:** `0xdCcD546F81958e438640A425c1024ff95Efc592c`
* **NetworkOptInService:** `0x58973d16FFA900D11fC22e5e2B6840d9f7e13401`
* **VaultOptInService:** `0x95CC0a052ae33941877c9619835A233D21D57351`
* **OperatorRegistry:** `0x6F75a4ffF97326A00e52662d82EA4FdE86a2C548`

**Mainnet**

* **wstETH:** `0xC329400492c6ff2438472D4651Ad17389fCb843a`
* **Network:** `0x8560C667Ae72F28D09465B342A480daB28821f6b`
* **NetworkMiddleware:** \`\`
* **NetworkOptInService:** `0x7133415b33B438843D581013f98A08704316633c`
* **VaultOptInService:** `0xb361894bC06cbBA7Ea8098BF0e32EB1906A5F891`
* **OperatorRegistry:** `0xAd817a6Bc954F678451A71363f04150FDD81Af9F`

### Prerequisites

> [!NOTE]
>
> For technical users who're comfortable running Foundry scripts, we've provided example code for every step in the setup process.
> → [Setup Scripts](https://github.com/dittonetwork/ditto-contracts/tree/25_add_OperatorMiddlewareScript/script/operator)\
> Alternatively the Symbiotic CLI can assist in many of these steps. Refer to their [docs](https://docs.symbiotic.fi/guides/cli/).

**Docs:**

* [Symbiotic Docs](https://docs.symbiotic.fi)
* [Foundry Docs](https://book.getfoundry.sh/)

**Tooling:**

* `git clone` - **Git** — [install](https://github.com/git-guides/install-git)
* `forge script, cast` - **Foundry** — [install](https://github.com/foundry-rs/foundry#installation)
* `python3 symb.py` - **Symbiotic CLI** — [install](https://docs.symbiotic.fi/guides/cli)

***

## Vault

Before Opt-In, you have to find suitable or deploy your own Vault

> **[Symbiotic Vault Deployment](https://dittonetwork.mintlify.site/operator-guide/symbiotic-vault.md)**
>
> Deploy your own Vault in symbiotic

## Register Operator & Opt-In

Your EOA (or node runner contract) must be registered as an **Operator** inside
Symbiotic. Opt-in links that operator to a specific Network and Vault.

For the official Symbiotic approach, see: [Symbiotic Operator Registration Guide](https://docs.symbiotic.fi/handbooks/operators-handbook#through-cli)

### Register in Symbiotic and opt-in to vault and network

We suggest using one of two approaches. First is from official Symbiotic docs:

**1. Install symbiotic CLI**

```bash theme={null}
git clone https://github.com/symbioticfi/cli.git
cd cli
pip3 install -r requirements.txt
```

**2. Register operator in Symbiotic**

**Sepolia Testnet**

```bash theme={null}
python symb.py --chain sepolia register-operator --private-key YOUR_OPERATOR_PRIVATE_KEY
```

**Mainnet**

```bash theme={null}
python symb.py --chain mainnet register-operator --private-key YOUR_OPERATOR_PRIVATE_KEY
```

**3. Opt in to Ditto network**

**Sepolia Testnet**

```bash theme={null}
python symb.py --chain sepolia opt-in-network 0x683Ed12e213a6D78C338D4e18440C42bb936085A --private-key YOUR_OPERATOR_PRIVATE_KEY
```

**Mainnet**

```bash theme={null}
python symb.py --chain mainnet opt-in-network 0x8560C667Ae72F28D09465B342A480daB28821f6b --private-key YOUR_OPERATOR_PRIVATE_KEY
```

**4. Opt in to the vault**

**Sepolia Testnet**

```bash theme={null}
python symb.py --chain sepolia opt-in-vault VAULT_ADDRESS --private-key YOUR_OPERATOR_PRIVATE_KEY
```

**Mainnet**

```bash theme={null}
python symb.py --chain mainnet opt-in-vault VAULT_ADDRESS --private-key YOUR_OPERATOR_PRIVATE_KEY
```

Or you can use our Foundry scripts to opt in to Ditto network:

```bash theme={null}
# Clone ditto-contracts repository
git clone https://github.com/dittonetwork/ditto-contracts
cd ditto-contracts
```

**Sepolia**

```bash theme={null}
# Define parameters
NETWORK_OPT_IN_SERVICE=0x58973d16FFA900D11fC22e5e2B6840d9f7e13401
NETWORK=0x683Ed12e213a6D78C338D4e18440C42bb936085A
VAULT_OPT_IN_SERVICE=0x95CC0a052ae33941877c9619835A233D21D57351
VAULT=<vault address from previous steps>
OPERATOR_REGISTRY=0x6F75a4ffF97326A00e52662d82EA4FdE86a2C548

# Execute the script
forge script script/operator/04_OperatorOptInSetup.s.sol:SetupOperatorOptIn \
  --sig "run(address,address,address,address,address)" \
  $NETWORK_OPT_IN_SERVICE $NETWORK $VAULT_OPT_IN_SERVICE $VAULT $OPERATOR_REGISTRY \
  --rpc-url https://ethereum-sepolia-rpc.publicnode.com \
  --chain sepolia \
  --private-key <your-private-key> \
  --etherscan-api-key <etherscan api key> \
  --broadcast
```

**Mainnet**

```bash theme={null}
# Define parameters
NETWORK_OPT_IN_SERVICE=0x7133415b33B438843D581013f98A08704316633c
NETWORK=0x8560C667Ae72F28D09465B342A480daB28821f6b
VAULT_OPT_IN_SERVICE=0xb361894bC06cbBA7Ea8098BF0e32EB1906A5F891
VAULT=<vault address from previous steps>
OPERATOR_REGISTRY=0xAd817a6Bc954F678451A71363f04150FDD81Af9F

# Execute the script
forge script script/operator/04_OperatorOptInSetup.s.sol:SetupOperatorOptIn \
  --sig "run(address,address,address,address,address)" \
  $NETWORK_OPT_IN_SERVICE $NETWORK $VAULT_OPT_IN_SERVICE $VAULT $OPERATOR_REGISTRY \
  --rpc-url https://ethereum-rpc.publicnode.com \
  --chain mainnet \
  --private-key <your-private-key> \
  --etherscan-api-key <etherscan api key> \
  --broadcast
```

### Register in Ditto network middleware

To Register in Ditto network, you have to contact us and send this info:

```
Vault Address: <vault> 
Operator Address: <operator>
Operator Public Key: <key>
```

If you have access to register by yourself, you can run this scripts:

**Sepolia**

```bash theme={null}
# --- env vars ---
MIDDLEWARE=0x9403942D5B9EbC1D2cF9Ff0960b688d64588B094      # Contact Ditto for this address
OPERATOR=<operator address>          # Your operator address
KEY=<key>                            # Your operator's public key
VAULT=<vault address>                # Optional: ONLY FOR OperatorSpecificDelegator and OperatorNetworkSpecificDelegator - Your vault address from previous steps
# ----------------

forge script script/middleware/OperatorMiddlewareScript.s.sol:OperatorMiddlewareScript \
  --sig "registerOperator(address,address,address,bytes)" \
  $MIDDLEWARE $OPERATOR $KEY $VAULT \
  --rpc-url https://ethereum-sepolia-rpc.publicnode.com \
  --chain sepolia \
  --private-key <your-private-key> \
  --etherscan-api-key <etherscan api key> \
  --broadcast
```

**Mainnet**

```bash theme={null}
# --- env vars ---
MIDDLEWARE=<middleware address>      # Contact Ditto for this address
OPERATOR=<operator address>          # Your operator address
KEY=<key>                            # Your operator's public key
VAULT=<vault address>                # Optional: ONLY FOR OperatorSpecificDelegator and OperatorNetworkSpecificDelegator - Your vault address from previous steps 
# ----------------

forge script script/middleware/OperatorMiddlewareScript.s.sol:OperatorMiddlewareScript \
  --sig "registerOperator(address,address,address,bytes)" \
  $MIDDLEWARE $OPERATOR $KEY $VAULT \
  --rpc-url https://ethereum-rpc.publicnode.com \
  --chain mainnet \
  --private-key <your-private-key> \
  --etherscan-api-key <etherscan api key> \
  --broadcast
```

***

## Troubleshooting

If you encounter any issues during the setup process, check our common troubleshooting solutions:

> **Transaction Errors**
>
> * Verify all addresses are correct
> * Ensure you have sufficient ETH for gas
> * Check that array parameters are properly formatted

> **Contract Errors**
>
> * Confirm dependencies are properly installed (`forge install`)
> * Ensure you're using compatible versions of contracts

> **Deployment Verification**
>
> * Verify all contracts are properly deployed using a block explorer
> * Test contract interactions before proceeding to the next step

For further assistance, contact Ditto support.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.