March 2, 2023

SCROLL Alpha Testnet Guide - Step by step 


Scroll is an EVM-compatible ZK-Rollup that seeks to solve scalability and gas issues in Ethereum.

Technically speaking, Scroll is built upon two major pieces. The core piece is the zkEVM, which is used to prove the correctness of EVM execution in Layer 2. We have been building it in the open with the Privacy and Scaling Explorations group at the Ethereum Foundation for over a year. But to turn the zkEVM into a full zkRollup on the Ethereum, we also need to build a complete L2 architecture around it.

You can get acquainted with the technical side of the project on their blog on the mirror, we will not dive into this, and move on to the main thing — the activities.

Fundraising:

Raised $30M from Polychain Capital, Bain Capital Crypto, Robot Ventures, Geometry DAO and others.

The Pre-Alpha Testnet is now open to all and everyone has a chance to test the project. The testnet won’t take much of your time, so we encourage you to take the time to do it. Airdrop is not confirmed, but the probability of an airdrop for testers is high.

Let’s start testing.

Using the bridge (Goerli Testnet & Alpha Testnet)

Adding Testnet Networks

  • First, let’s visit the Scroll Alpha Portal. Once there, click “Add to MetaMask” to add Scroll Goerli & Scroll Alpha Testnet network to MetaMask.

Goerli Faucet


Using the bridge

  • Go to Bridge and connect the wallet;
  • Send ETH Goerli to the Scroll Alpha Testnet;
  • Confirm the transaction in your wallet;
  • Done. The transfer should be processed within 20 minutes.
  • Make a transfer in the opposite direction.

Using the Orbiter Bridge

  • Go to Orbiter Finance Rinkeby and connect the wallet;
  • Select Goerli from the list, enter the amount and click “Send”;
  • On the next page we confirm the action.

Using the Uniswap V3

  • Go to Uniswap V3 and connect the wallet;
  • Select the assets, enter the amount and click “Swap”;

Deploy Contract

To deploy the token and contract you need to rent a server on Ubuntu. We recommend testing the guide on the cheapest Contabo server for 6 euros, with Ubuntu 20.04. A limited number of contracts can be deployed on one rented server.

Here we go!

  • Copy each command individually!
sudo apt updatesudo apt install git git clone https://github.com/scroll-tech/scroll-contract-deploy-demo.gitcd scroll-contract-deploy-democurl -L https://foundry.paradigm.xyz | bashsource /root/.bashrcfoundryupforge build — use 0.8.17
  • Then insert your data into the code, put the amount of ether — 0.0000001ether, unlock time on this site, the private key in your purse MetaMask. Then we copy the whole code and paste it into the terminal:
forge create — rpc-url https://alpha-rpc.scroll.io/l2 \ — value <number of ether to block in contract> \ — constructor-args <unlock time> \ — private-key <your private key> \ — legacy \contracts/Lock.sol:Lock — use 0.8.17
  • If everything has been done correctly you will see similar results:
Deployer: 0x4397FaBAE1318AB76ecb204a17f1dE9E9F888b11Deployed to: 0xE70cc2EE909f3C17A712721D688973DABD36eBC4

Copy your contract address (Deployed to) and paste it into the block browser.

Deploy Token

Now we will create our own token, follow the instructions below, read carefully, copy each line and paste into the terminal individually!

cd $HOMEsudo apt updatesudo apt install gitcurl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash -sudo apt-get install -y nodejsmkdir DeployTokencd DeployTokensudo npm init * Press Enter until the next step.sudo npm install — save-dev hardhatsudo npx hardhat * Press Enter until the very end.npm install — save-dev “@nomicfoundation/hardhat-toolbox@².0.0”npm i @openzeppelin/contractscd contractsnano <Your Token Name>.sol * Come up with a name for the token. Example:# nano NDFGG.sol An empty file should open (if it does not open automatically, press ENTER)# nano NDFGG.solAn empty file should open (if it does not open automatically, press ENTER)
  • Next, copy and paste the entire block of code into your file, changing the data to your own. Press CTRL+X to save the file after pasting, then press Y+ENTER:
// SPDX-License-Identifier: MITpragma solidity ^0.8.4;
import “@openzeppelin/contracts/token/ERC20/ERC20.sol”;
contract NFDGG is ERC20 { constructor() ERC20(“Your Token Name”, “Token Name Abbreviated”) { _mint(msg.sender, 1000000000 * 10 ** decimals()); }}
  • Next copy the entire block below, paste into the terminal, press ENTER, an empty file will open:
cd $HOME/DeployToken/scriptsrm -rf deploy.jsnano deploy.js * Press ENTER
  • Next, copy and paste the entire block of code, “Enter Your Token Name” into your file. Save the file after you paste it with CTRL+X, then press Y+ENTER:
const { ethers } = require(“hardhat”);
async function main() {
const token = await ethers.getContractFactory(“Your Token Name”);
const deployedToken = await token.deploy();
await deployedToken.deployed();
console.log(`The smart contract was deployed at: ${deployedToken.address} on Scroll L2!`);}
main().catch((error) => {console.error(error);process.exitCode = 1;});
  • Next, enter each command separately (you’ll find the Private Key in your wallet):
npm i dotenvcd $HOME/DeployTokennano .envPRIVATE_KEY=”YOUR PRIVATE KEY” * Save with ctrl+x, then y+Enter.rm -rf hardhat.config.jsnano hardhat.config.js
  • Then paste all the code block into the file, don’t change anything and save it by pressing ctrl+x, then y+enter:
require(“@nomicfoundation/hardhat-toolbox”);require(“dotenv”).config({ path: “.env” });
const PRIVATE_KEY = process.env.PRIVATE_KEY;
/** @type import(‘hardhat/config’).HardhatUserConfig */module.exports = {solidity: “0.8.17”,networks: { scrollL2: { url: `https://alpha-rpc.scroll.io/l2`, accounts: [PRIVATE_KEY] }}};
  • Next, enter the command:
npx hardhat run scripts/deploy.js — network scrollL2
  • If all goes well you will get the following text with the contract:
The smart contract was deployed at: 0x8a7B961ae27ecE78483E4D3b74cEB9D1909f98eb on Scroll L2!

Leaving feedback

  • Join their Discord and get verified. Stay active on their server and watch for updates.

Made in NFD.gg

More info in our Telegram