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
- Clone the scroll-sdk repo to your local machine
- Install dependencies:
- Verify installations by running:
docker -v
kubectl version
minikube status
helm version
Modifying a Service
- Clone the repository of the service you want to modify
- Make your desired code modifications
- Test your changes locally
Available Services
Service | Repository |
---|---|
bridge-history-api | scroll-tech/scroll/bridge-history-api |
bridge-history-fetcher | scroll-tech/scroll/bridge-history-fetcher |
chain-monitor | scroll-tech/chain-monitor |
contracts | scroll-tech/scroll-contracts |
coordinator-api | scroll-tech/scroll/coordinator-api |
coordinator-cron | scroll-tech/scroll/coordinator-cron |
frontends | scroll-tech/frontends |
gas-oracle | scroll-tech/scroll/gas-oracle |
l1-devnet | scroll-tech/scroll-sdk/l1-devnet |
l2-bootnode | scroll-tech/go-ethereum |
l2-rpc | scroll-tech/go-ethereum |
l2-sequencer | scroll-tech/go-ethereum |
rollup-explorer-backend | scroll-tech/rollup-explorer-backend |
rollup-node | scroll-tech/scroll/rollup-node |
Building a Custom Docker Image
-
Locate the Dockerfile for your service
-
Build the image:
-
Choose one of two options for making the image available:
Option 1: Publish to Docker Hub
Option 2: Load Directly to Minikube
Updating the Service Configuration
-
Locate the
values.yaml
file for your service indevnet/scroll-sdk/charts/<service-name>/values.yaml
-
Update the
image
field based on your chosen deployment method:For published Docker Hub images:
For local Minikube images:
-
Apply your changes:
-
Verify the deployment: