Developer Quickstart

Scroll Alpha Testnet is now deprecated.

Please visit our new documentation for the Scroll Sepolia Testnet at https://docs.scroll.io/

With Scroll, your favorite tools for building and testing smart contracts just work.

Since Scroll is bytecode equivalent with the EVM, you’ll just need to point your favorite builder tools at a Scroll Alpha Testnet RPC Provider.

If you run into any issues, please reach out in our Discord.

Acquiring Testnet Ether

To start building on Scroll, you'll first need to acquire some testnet ETH. See the Faucet page for tips on getting test tokens on Goerli. After this, you can bridge your testnet ETH to the Scroll Alpha Testnet (Layer 2) using our Bridge.

For a walkthrough, start with the User Guide's Setup page.

Network Configuration

Use the table below for configuring your Ethereum tools to the Scroll Alpha Testnet.

Network NameScroll Alpha TestnetGoerli test network

RPC URL

Chain ID

534353

5

Currency Symbol

ETH

ETH

Block Explorer URL

Configure your tooling

For setting up tooling to verify a smart contract deployments, see Verifying Smart Contracts.

Hardhat

Modify your Hardhat config file hardhat.config.ts to point at the Scroll Alpha Testnet public RPC.

...

const config: HardhatUserConfig = {
  ...
  networks: {
    scrollAlpha: {
      url: "https://alpha-rpc.scroll.io/l2" || "",
      accounts:
        process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
    },
  },
};

...

Foundry

To deploy using the Scroll Alpha Testnet Public RPC, run:

forge create ... --rpc-url=https://alpha-rpc.scroll.io/l2 --legacy

Remix Web IDE

After compiling your contracts, the easiest way to deploy using Remix is by setting up Metamask, then selecting the Scroll Alpha Testnet network.

Now, in the “Deploy and Run Transactions” tab, use the “Environment” drop down and select “Injected Provider - MetaMask.”

Connect your wallet and select the Scroll Alpha Testnet. Your account should be selected automatically in Remix, and you can click “Deploy.”

Truffle

Assuming you already have a truffle environment setup, go to the Truffle configuration file, truffle.js. Make sure to have installed HDWalletProvider: npm install @truffle/hdwallet-provider@1.4.0

const HDWalletProvider = require("@truffle/hdwallet-provider")
...
module.exports = {
  networks: {
    scrollAlpha: {
      provider: () =>
        new HDWalletProvider(process.env.PRIVATE_KEY, "https://alpha-rpc.scroll.io/l2"),
      network_id: '*',
    },
  }
}

Brownie

To add the Scroll Alpha Testnet, run the following command:

brownie networks add Ethereum scrollAlpha host=https://alpha-rpc.scroll.io/l2 chainid=534353

To set this as your default network, add the following in your project config file:

networks:
    default: scrollAlpha

Another way to add the Scroll Alpha Testnet is to create a yaml file and run a command to add it.

This is an example of a yaml file called network-config.yaml

live:
- name: Ethereum
 networks:
 - chainid: 534353
   explorer: https://blockscout.scroll.io/
   host: https://alpha-rpc.scroll.io/l2
   id: scrollAlpha
   name: Scroll Alpha Testnet

To add the Scroll Alpha Testnet to the network list, run the following command:

brownie networks import ./network-config.yaml

To deploy on Scroll, run the following command. In this example, token.py is the script to deploy the smart contract. Replace this with the name of your script:

brownie run token.py --network scrollAlpha

ethers.js

Setting up a Scroll Alpha Testnet provider in an ethers script:

import { ethers } from 'ethers';

const provider = new ethers.providers.JsonRpcProvider(
  'https://alpha-rpc.scroll.io/l2'
);

scaffold-eth

To deploy using Scaffold-eth, you’ll need to point both your Hardhat and React settings at the Scroll Alpha Testnet.

Configure Hardhat

In the packages/hardhat/hardhat.config.js file, you’ll add the network and select it as the default network.

...
//
// Select the network you want to deploy to here:
//
const defaultNetwork = "scrollAlpha";
...
module.exports = {
...
	networks: {
...
          scrollAlpha: {
            url: "https://alpha-rpc.scroll.io/l2",
            accounts: {
              mnemonic: mnemonic(),
            },
          },
	}
...
}

Be sure to fund the deployment wallet as well! Run yarn generate to create the wallet and yarn account to check its funds. Once funded, run yarn deploy --network scrollAlpha to deploy on the Alpha testnet.

On some project forks, you'll want to disable the contract verification which relies on Etherscan. This can be commented out in packages/hardhat/deploy/00_deploy_your_contract.js

Configure the Frontend

To configure your frontend, you need to add the Scroll Alpha Testnet as a network option, then select it as default.

To add the network, modify packages/react-app/src/constants.js .

...
export const NETWORKS = {
...
  scrollAlpha: {
    name: "scrollAlpha",
    color: "#e9d0b8",
    chainId: 534353,
    rpcUrl: "https://alpha-rpc.scroll.io/l2",
    blockExplorer: "https://blockscout.scroll.io",
  },
...
}

Next, in packages/react-app/src/App.jsx modify

...
/// 📡 What chain are your contracts deployed to?
const initialNetwork = NETWORKS.scrollAlpha;
...

Last updated