Skip to content

šŸš€ Quick Start

Get a local Sunrise DA node, a minimal Rollkit‑based sovereign rollup, and a sample dApp running in ≤ 20 minutes.

This guide will walk you through setting up a complete development environment for building on Sunrise Layer. You’ll learn how to:

  • Set up a local Sunrise Data Availability (DA) node
  • Create a minimal sovereign rollup using Rollkit
  • Interact with the network using the Sunrise client
  • Run a sample dApp that demonstrates key features

For a more comprehensive guide covering all aspects of building on Sunrise, check out the Sunrise Builders Kit.


Before you begin, ensure you have the following tools installed:

ToolVersionPurpose
Go>=1.22Build Sunrise binaries and core components
Rust + CargostableBuild Rollkit demo chain and smart contracts
Node.js>=20Run JS client, scripts, and web applications
Docker + Docker ComposelatestRun containerized services and development stack
(Optional) direnvanyAutomatically load environment variables in your shell
Terminal window
# macOS (brew) example
brew install go rustup node docker direnv
rustup default stable

We’ll create a development playground with three main components:

Terminal window
mkdir sunrise-playground && cd $_
git clone https://github.com/sunriselayer/network sunrise-da
git clone https://github.com/rollkit/rollkit rollkit
git clone https://github.com/sunriselayer/examples examples
  • sunrise-da: The core Sunrise network implementation
  • rollkit: A framework for building sovereign rollups
  • examples: Sample applications and integration examples

The Sunrise DA node is the foundation of the network, providing data availability services for rollups:

Terminal window
cd sunrise-da
make install # builds 'sunrised'
sunrised init dev --chain-id goldberg-local
sunrised start
ServicePortPurpose
Tendermint RPC26657Main RPC endpoint for transactions and queries
gRPC9090Protocol buffer interface for advanced operations

Create and fund a test account to interact with the network:

Terminal window
sunrised keys add alice --keyring-backend test
sunrised tx bank mint $(sunrised keys show alice -a) 1000000000urise \
--from alice --keyring-backend test --yes

This creates a new account named ā€œaliceā€ and mints 1 billion micro-RISE tokens (urise) for testing.

Rollkit is a framework for building sovereign rollups that can use Sunrise for data availability:

Terminal window
cd ../rollkit
make demo # builds demo binary 'demo-rollup'
# Configure Rollkit to store blobs on Sunrise DA
cat <<EOF > rollup.config.toml
[da]
rpc_address = "http://localhost:26657"
fee_denom = "uusdrise"
gas_price = "0.025"
[rollup]
chain_id = "demo-rollup-1"
EOF
./demo-rollup start --config rollup.config.toml

The rollup automatically publishes its block data to Sunrise and retrieves DA proofs.

The Sunrise client is a JavaScript/TypeScript library for interacting with the Sunrise network. Here’s how to use it:

Terminal window
# inside the root playground directory
npm create vite@latest js-client-demo -- --template vanilla
cd js-client-demo && npm i @sunriselayer/client
cat <<'JS' > src/index.js
import { SunriseClient } from "@sunriselayer/client";
const rpc = "http://localhost:26657";
const main = async () => {
const client = await SunriseClient.connect(rpc);
const { transactionHash } = await client.da.submitBlob(
"Hello Sunrise!",
{ gasLimit: 200_000, feeDenom: "uusdrise", gasPrice: "0.025" }
);
console.log("Blob tx:", transactionHash);
const proof = await client.da.getBlobProof(transactionHash);
console.log("Inclusion proof:", proof);
};
main();
JS
node src/index.js

This example demonstrates:

  • Connecting to a Sunrise node
  • Submitting a data blob
  • Retrieving a Merkle proof of inclusion

The example dApp demonstrates a token swap using Sunrise’s liquidity pool module:

Terminal window
cd ../../examples/swap-demo
npm i
npm run dev # opens http://localhost:5173

The demo UI:

  • connects to @sunriselayer/client
  • swaps test‑tokens via the rollup’s x/swap module
  • shows live balances pulled from Sunrise DA
WhatWhereDescription
Full client referenceClient DocumentationComplete API documentation for @sunriselayer/client
Build a production Rollkit chainRollkit GuideGuide to deploying a production rollup
Validators & DA proofsValidators GuideLearn about validator setup and DA proof generation
Conceptual deep divesLearn SectionUnderstanding Sunrise’s core concepts
SymptomFixExplanation
ECONNREFUSED on port 26657sunrised start not running or wrong RPC URLEnsure the Sunrise node is running and accessible
Rollkit cannot post blobsCheck ~/.sunrise/config/app.toml for min-gas-pricesVerify gas price settings match network requirements
Blob tx stuck in mempoolLow gas price → use —gas-prices 0.025uriseIncrease gas price to ensure transaction processing
Terminal window
pkill sunrised demo-rollup || true
docker compose -f docker/local-da.yml down -v || true
rm -rf ~/sunrise-playground

Happy hacking! šŸŽ‰