OperateRunning an OperatorJoin as an OperatorLeave as Operator

Leave as an Operator

Operators can leave the operator role by scheduling a leave and then completing it after the leave delay period has passed.

Schedule Operator Leave

Step 1: Schedule Operator Leave

Ensure you have joined as an operator first, see Join as an Operator.

export HTTP_RPC_URL="https://..."
export WS_RPC_URL="wss://..."
export KEYSTORE_PATH="./keystore"
export TANGLE_CONTRACT="0x..."
export RESTAKING_CONTRACT="0x..."
export STATUS_REGISTRY_CONTRACT="0x..."
 
cargo tangle operator start-leaving \
  --http-rpc-url "$HTTP_RPC_URL" \
  --ws-rpc-url "$WS_RPC_URL" \
  --keystore-path "$KEYSTORE_PATH" \
  --tangle-contract "$TANGLE_CONTRACT" \
  --restaking-contract "$RESTAKING_CONTRACT" \
  --status-registry-contract "$STATUS_REGISTRY_CONTRACT"

The CLI flag name is --restaking-contract for compatibility; it refers to the staking contract.

If successful, your leave will be scheduled.

Execute Operator Leave

Step 2: Execute Operator Leave

Ensure you have scheduled a leave and the leave delay period has passed.

cargo tangle operator complete-leaving \
  --http-rpc-url "$HTTP_RPC_URL" \
  --ws-rpc-url "$WS_RPC_URL" \
  --keystore-path "$KEYSTORE_PATH" \
  --tangle-contract "$TANGLE_CONTRACT" \
  --restaking-contract "$RESTAKING_CONTRACT" \
  --status-registry-contract "$STATUS_REGISTRY_CONTRACT"

If successful, you will no longer be an operator.