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

# Change Operator Address

> Update the validator operator address on the execution layer (BeaconDeposit) for BeraChef and other contract interactions.

The following walks you through the process of changing your operator address using Foundry `cast`.

## What is an operator address?

The Operator Address is the `$BERA` wallet address that is associated with a validator node.

It is responsible for receiving block rewards and is the sole address that has permission to change the Reward Allocation to distribute `$BGT` emissions to Reward Vaults.

## Requirements

Before you begin, ensure you have the following:

* Operator Address Private Key
* Your Validator Withdraw Credential Address (if different than Operator Address)
* [BeaconKit Binary](https://github.com/berachain/beacon-kit/releases) (for Validator PubKey)
* `$BERA` to process the transaction
* [Foundry](https://book.getfoundry.sh/getting-started/installation)

## Procedure

<Warning>
  This process revokes the current operator's permissions to receive block rewards and change the
  validator's Reward Allocation.
</Warning>

### Step 1 - Get your validator PubKey

```bash theme={null}
# FROM: /path/to/beacond

# BeaconKit Configuration
YOUR_BEACOND_HOME_DIR="<YOUR_BEACOND_HOME_DIRECTORY>";

# Withdraw Credential Address - Can be the same as the Operator Address
YOUR_VALIDATOR_WITHDRAW_CRED_ADDRESS="<0xYOUR_VALIDATOR_WITHDRAW_CRED_ADDRESS>";

# Genesis Configurations - DO NOT CHANGE THESE
GENESIS_VALIDATORS_ROOT="0x053397d1ddb01f3910e91ef762070a075e4b17ba3472c3c4dd391a68bd5d95a1";
GENESIS_FORK_VERSION="0x04000000";
VAL_DEPOSIT_GWEI_AMOUNT="250000000000000";
DEPOSIT_CONTRACT_ADDRESS="0x4242424242424242424242424242424242424242";

DEPOSIT_OUTPUT=$(./beacond deposit create-validator $YOUR_VALIDATOR_WITHDRAW_CRED_ADDRESS $VAL_DEPOSIT_GWEI_AMOUNT $GENESIS_FORK_VERSION $GENESIS_VALIDATORS_ROOT --home $YOUR_BEACOND_HOME_DIR);
echo $DEPOSIT_OUTPUT;

# [Expected Similar Output]:
# 7:00AM INF Deposit Message CallData amount=0x773594000
# pubkey=0xYOUR_VALIDATOR_PUBKEY
# signature=0x...
# withdrawal credentials=0x010000000000000000000000YOUR_VALIDATOR_WITHDRAW_CRED_ADDRESS...

YOUR_VALIDATOR_PUBKEY=$(echo "$DEPOSIT_OUTPUT" | grep "pubkey=" | awk -F'pubkey=' '{print $2}' | awk -F' ' '{print $1}');
echo $YOUR_VALIDATOR_PUBKEY;

# [Expected Similar Output]:
# 0xYOUR_VALIDATOR_PUBKEY_92CHARS_INCLUDING_0X
```

### Step 2 - Check your current operator address

This will double check your current operator address.

```bash theme={null}
cast call 0x4242424242424242424242424242424242424242 "getOperator(bytes)" <0xYOUR_VALIDATOR_PUBKEY> --rpc-url http://localhost:8545;

# [Expected Similar Output]:
# 0x000000000000000000000000YOUR_CURRENT_OPERATOR_ADDRESS
```

### Step 3 - Change your operator address

This will change your operator address.

```bash theme={null}
cast send 0x4242424242424242424242424242424242424242 "requestOperatorChange(bytes,address)" <0xYOUR_VALIDATOR_PUBKEY> <0xYOUR_NEW_OPERATOR_ADDRESS> --rpc-url http://localhost:8545 --private-key <0xYOUR_CURRENT_OPERATOR_PRIVATE_KEY>;
```
