Customizing SDK Components

Overview

This guide documents how to run customized components in your own Scroll SDK deployment. We’ll see how to modify a service, build a custom Docker image, and deploy your changes to an existing Scroll SDK deployment.

Prerequisites

  1. Clone the scroll-sdk repo to your local machine
  2. Install dependencies:
  3. Verify installations by running:
    • docker -v
    • kubectl version
    • minikube status
    • helm version

Modifying a Service

  1. Clone the repository of the service you want to modify
  2. Make your desired code modifications
  3. Test your changes locally

Available Services

ServiceRepository
bridge-history-apiscroll-tech/scroll/bridge-history-api
bridge-history-fetcherscroll-tech/scroll/bridge-history-fetcher
chain-monitorscroll-tech/chain-monitor
contractsscroll-tech/scroll-contracts
coordinator-apiscroll-tech/scroll/coordinator-api
coordinator-cronscroll-tech/scroll/coordinator-cron
frontendsscroll-tech/frontends
gas-oraclescroll-tech/scroll/gas-oracle
l1-devnetscroll-tech/scroll-sdk/l1-devnet
l2-bootnodescroll-tech/go-ethereum
l2-rpcscroll-tech/go-ethereum
l2-sequencerscroll-tech/go-ethereum
rollup-explorer-backendscroll-tech/rollup-explorer-backend
rollup-nodescroll-tech/scroll/rollup-node

Building a Custom Docker Image

  1. Locate the Dockerfile for your service

  2. Build the image:

    docker build -f <dockerfile> -t <service-name>:<version> .
  3. Choose one of two options for making the image available:

    Option 1: Publish to Docker Hub

    docker login
    docker push <your_docker_user_name>/<service_name>:<version>

    Option 2: Load Directly to Minikube

    minikube image load <service_name>:<version>

Updating the Service Configuration

  1. Locate the values.yaml file for your service in devnet/scroll-sdk/charts/<service-name>/values.yaml

  2. Update the image field based on your chosen deployment method:

    For published Docker Hub images:

    image:
    repository: <your_docker_user_name>/<service_name>
    pullPolicy: Always
    tag: <version>

    For local Minikube images:

    image:
    repository: <service_name>
    tag: <version>
  3. Apply your changes:

    make install
  4. Verify the deployment:

    kubectl get pods
Stay up-to-date on the latest Scroll Developer news
Roadmap updates, virtual and live events, ecosystem opportunities and more
Thank you for subscribing!

Resources

Follow Us