Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15,056 changes: 7,316 additions & 7,740 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"@types/github-slugger": "^1.3.0",
"@typescript-eslint/eslint-plugin": "^5.43.0",
"@typescript-eslint/parser": "^5.43.0",
"astro": "^2.4.4",
"astro": "^2.5.5",
"dart-linkcheck": "^2.0.15",
"dotenv": "^16.0.3",
"eslint": "^8.27.0",
Expand Down
30 changes: 24 additions & 6 deletions public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,14 @@
"alphaBlockExplorer": "Alpha Block Explorer",
"goerliBlockExplorer": "Goerli Block Explorer",
"community": "Community",
"discord": "Discord",
"communityForum": "Community Forum"
},
"developers": {
"developers": "Developers",
"buildingOnScroll": "Building on Scroll",
"developerQuickstart": "Developer Quickstart",
"verifyingSmartContracts": "Verifying Smart Contracts",
"alphaTestnetContracts": "Alpha Testnet Contracts",
"integrations": "Integrations",
"ethereum&AlphaTestnetDifferences": "Ethereum & Alpha Testnet Differences",
Expand All @@ -74,14 +76,30 @@
"goerliBlockExplorer": "Goerli Block Explorer"
},
"technology": {
"overview": "Overview",
"scrollArchitecture": "Scroll Architecture"
"architecture": "Architecture",
"scrollArchitecture": "Scroll Architecture",
"principles": "Principles",
"zkevm": "zkEVM",
"introToZkevm": "Intro to zkEVM",
"zkevmOverview": "zkEVM Overview",
"bridge": "Bridge",
"bridgeOverview": "Bridge Overview",
"rollupProcess": "Rollup Process",
"sequencer": "Sequencer",
"executionClient": "Execution Client",
"zkTrie": "zkTrie",
"syncService": "Sync Service",
"prover": "Prover",
"proofGeneration": "Proof Generation",
"cpuProverRepo": "CPU Prover Repo"
},
"learn": {
"zkEVMOverview": "zkEVM Overview"
},
"infrastructure": {
"introduction": "Introduction"
"ethereumAndProtocols": "Ethereum & Protocols",
"theScalabilityProblem": "The Scalability Problem",
"introToRollups": "Intro to Rollups",
"zeroKnowledge": "Zero Knowledge",
"polynomialCommitmentSchemes": "Polynomial Commitment Schemes",
"kzgCommitmentScheme": "KZG Commitment Scheme"
}
},
"notTranslated": {
Expand Down
6 changes: 4 additions & 2 deletions src/components/ClickToZoom.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@
import { Image } from "@astrojs/image/components"
export type Props = {
src: string
alt: string
caption: string
}
const { src } = Astro.props as Props
const { src, alt } = Astro.props as Props

/**
* This component adds the classNames required by the scripts/click-to-zoom.ts script.
*/
---

<Image src={src} class="click-to-zoom" quality={80} format="avif" alt="image" />
<Image src={src} class="click-to-zoom" quality={80} format="avif" alt={alt || "image"} />

<style>
.click-to-zoom {
Expand Down
3 changes: 0 additions & 3 deletions src/components/RightSidebar/TableOfContents/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,6 @@ const TableOfContents: FunctionalComponent<{
<>
<h2 className="heading">On this page</h2>
<ul ref={tableOfContents}>
<li className={`header-link depth-2 ${currentID === "overview" ? "active" : ""}`.trim()}>
<a href="#overview">Overview</a>
</li>
{headings
.filter(({ depth }) => depth > 1 && depth < 4)
.map((header) => (
Expand Down
96 changes: 65 additions & 31 deletions src/config/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const getSidebar = () => {
section: t("sidebar.gettingStarted.community"),
contents: [
{
title: "Discord",
title: t("sidebar.gettingStarted.discord"),
url: "https://discord.gg/scroll",
},
{
Expand All @@ -61,6 +61,7 @@ export const getSidebar = () => {
contents: [
{ title: t("sidebar.developers.buildingOnScroll"), url: "developers" },
{ title: t("sidebar.developers.developerQuickstart"), url: "developers/developer-quickstart" },
{ title: t("sidebar.developers.verifyingSmartContracts"), url: "developers/verifying-smart-contracts" },
{ title: t("sidebar.developers.alphaTestnetContracts"), url: "developers/alpha-testnet-contracts" },
{ title: t("sidebar.developers.integrations"), url: "developers/integrations" },
{
Expand Down Expand Up @@ -89,66 +90,99 @@ export const getSidebar = () => {
],
technology: [
{
section: t("sidebar.technology.overview"),
section: t("sidebar.technology.architecture"),
contents: [
{
title: t("sidebar.technology.scrollArchitecture"),
url: "architecture-overview/architecture-overview",
children: [
{
title: "Child Page A",
url: "architecture-overview/architecture-request-model",
},
{
title: "Child Page B",
url: "architecture-overview/architecture-request-model",
},
],
url: "technology/architecture/scroll-architecture",
},
{
title: t("sidebar.technology.principles"),
url: "technology/architecture/principles",
},
],
},
{
section: "Another Section",
section: t("sidebar.technology.zkevm"),
contents: [
{
title: "Introduction to Rollups",
url: "data-feeds",
title: t("sidebar.technology.introToZkevm"),
url: "technology/zkevm/intro-to-zkevm",
},
{
title: t("sidebar.technology.zkevmOverview"),
url: "technology/zkevm/zkevm-overview",
},
],
},
],
learn: [
{
section: "zkEVM",
contents: [{ title: t("sidebar.learn.zkEVMOverview"), url: "/" }],
section: t("sidebar.technology.bridge"),
contents: [
{
title: t("sidebar.technology.bridgeOverview"),
url: "technology/bridge/bridge-overview",
},
{
title: t("sidebar.technology.rollupProcess"),
url: "technology/bridge/rollup-process",
},
],
},
{
section: "Section",
section: t("sidebar.technology.sequencer"),
contents: [
{
title: t("sidebar.learn.zkEVMOverview"),
url: "/",
title: t("sidebar.technology.executionClient"),
url: "technology/sequencer/execution-client",
},
{
title: t("sidebar.technology.zkTrie"),
url: "technology/sequencer/zktrie",
},
{
title: t("sidebar.technology.syncService"),
url: "technology/sequencer/sync-service",
},
],
},
{
section: "Resources",
section: t("sidebar.technology.prover"),
contents: [
{ title: "Getting Help", url: "resources/getting-help" },
{
title: "Off-site Link (Doesn't work)",
url: "https://scroll.io/",
title: t("sidebar.technology.proofGeneration"),
url: "technology/prover/proof-generation",
},
{
title: t("sidebar.technology.cpuProverRepo"),
url: "https://github.com/",
},
],
},
],
infrastructure: [
learn: [
{
section: t("sidebar.learn.ethereumAndProtocols"),
contents: [
{
title: t("sidebar.learn.theScalabilityProblem"),
url: "learn/the-scalability-problem",
},
{
title: t("sidebar.learn.introToRollups"),
url: "learn/intro-to-rollups",
},
],
},
{
section: "EXTERNAL ADAPTERS",
section: t("sidebar.learn.zeroKnowledge"),
contents: [
{
title: t("sidebar.infrastructure.introduction"),
url: "",
title: t("sidebar.learn.polynomialCommitmentSchemes"),
url: "learn/zero-knowledge/polynomial-commitment-schemes",
},
{
title: t("sidebar.learn.kzgCommitmentScheme"),
url: "learn/zero-knowledge/kzg-commitment-scheme",
},
],
},
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ permalink: "developers/alpha-testnet-contracts"
excerpt: "The network info and contract addresses you need to start with Scroll Alpha Testnet."
---

import Aside from "../../../../components/Aside.astro"

## Network Info

| Network Name | Scroll Alpha Testnet | Goerli Testnet |
Expand Down Expand Up @@ -60,8 +62,9 @@ excerpt: "The network info and contract addresses you need to start with Scroll

## Tokens

> ℹ️ **Note**
>
> Bridged tokens from Goerli using the native bridge can be added to the [token-list](https://github.com/scroll-tech/token-list) repo.
<Aside type="note" title="note">
Bridged tokens from Goerli using the native bridge can be added to the
[token-list](https://github.com/scroll-tech/token-list) repo.
</Aside>

- Goerli USDC: `0x67aE69Fd63b4fc8809ADc224A9b82Be976039509`
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ date: Last Modified
title: "Developer Quickstart"
lang: "en"
permalink: "developers/developer-quickstart"
whatsnext: { "Verify Your Smart Contracts": "/developers/verifying-smart-contracts" }
---

import Aside from "../../../../components/Aside.astro"

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.
Expand Down Expand Up @@ -62,11 +65,21 @@ To deploy using the Scroll Alpha Testnet Public RPC, run:

After compiling your contracts, the easiest way to deploy using Remix is by [setting up Metamask](/user-guide/setup#metamask), then selecting the **Scroll Alpha Testnet** network.

<figure><img src="../.gitbook/assets/image (11).png" alt=""><figcaption><p>Metamask with the Scroll Alpha Testnet selected as Network</p></figcaption></figure>
<figure>
<img src="../.gitbook/assets/image (11).png" alt="" />
<figcaption>
<p>Metamask with the Scroll Alpha Testnet selected as Network</p>
</figcaption>
</figure>

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

<figure><img src="../.gitbook/assets/image (18).png" alt=""><figcaption><p>Remix using MetaMask as a Network Provider for accessing the Scroll Alpha Testnet</p></figcaption></figure>
<figure>
<img src="../.gitbook/assets/image (18).png" alt="" />
<figcaption>
<p>Remix using MetaMask as a Network Provider for accessing the Scroll Alpha Testnet</p>
</figcaption>
</figure>

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

Expand Down Expand Up @@ -145,9 +158,10 @@ module.exports = {

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.

> ⚠️ Warning
>
> 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`
<Aside type="danger" title="warning">
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`
</Aside>

#### Configure the Frontend

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,24 @@ permalink: "developers/ethereum-and-alpha-testnet-differences"
excerpt: "There are a number of technical details that differ between Ethereum mainnet's EVM and Scroll's modified design for a zkEVM. Below you can see those differences as they exist now."
---

import Aside from "../../../../components/Aside.astro"

There are a number of technical details that differ between Ethereum mainnet's EVM and Scroll's modified design for a zkEVM. Below you can see those differences as they exist now.

For open-source contributors and infrastructure builders, please contact our team for additional support.

> ℹ️ **Info**
>
> For the average Solidity developer, these details won't affect your development experience.
<Aside type="note" title="note">
For the average Solidity developer, these details won't affect your development experience.
</Aside>

## EVM Opcodes

| Opcode | Solidity equivalent | Ethereum Behavior | Scroll Behavior |
| --------------------------- | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `BLOCKHASH` | `block.blockhash` | <p><strong>Input:</strong> <code>blockNumber</code> from top of the stack, and the valid range is [<code>NUMBER</code>-256, <code>NUMBER</code>-1].</p><p><strong>Output:</strong> hash of the given block number, or 0 if the block number is not in the valid range.</p> | Matches Ethereum, but limits the range of input `blockNumber` to be `NUMBER`-1. |
| `COINBASE` | `block.coinbase` | In Ethereum Clique, the eth address of the signer. | Returns the pre-deployed fee vault contract address. See [Alpha Testnet Contracts](/developers/alpha-testnet-contracts). |
| `DIFFICULTY` / `PREVRANDAO` | `block.difficulty` | After PoS, the previous block’s `randao` value. | Returns 0. |
| `SELFDESTRUCT` | `selfdestruct` | [Plans to deprecate and substitute with `SENDALL`](https://eips.ethereum.org/EIPS/eip-4758) | <p>Disabled in the sequencer. Runtime error, same behavior as the INVALID opcode.<br><em>Will change to adopt Ethereum’s solution in the future.</em></p> |
| Opcode | Solidity equivalent | Ethereum Behavior | Scroll Behavior |
| --------------------------- | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `BLOCKHASH` | `block.blockhash` | <p><strong>Input:</strong> <code>blockNumber</code> from top of the stack, and the valid range is [<code>NUMBER</code>-256, <code>NUMBER</code>-1].</p><p><strong>Output:</strong> hash of the given block number, or 0 if the block number is not in the valid range.</p> | Matches Ethereum, but limits the range of input `blockNumber` to be `NUMBER`-1. |
| `COINBASE` | `block.coinbase` | In Ethereum Clique, the eth address of the signer. | Returns the pre-deployed fee vault contract address. See [Alpha Testnet Contracts](/developers/alpha-testnet-contracts). |
| `DIFFICULTY` / `PREVRANDAO` | `block.difficulty` | After PoS, the previous block’s `randao` value. | Returns 0. |
| `SELFDESTRUCT` | `selfdestruct` | [Plans to deprecate and substitute with `SENDALL`](https://eips.ethereum.org/EIPS/eip-4758) | <p>Disabled in the sequencer. Runtime error, same behavior as the INVALID opcode.<br /><em>Will change to adopt Ethereum’s solution in the future.</em></p> |

## State Account

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ excerpt: "Our Alpha Testnet allows the community to deploy smart contracts on Sc

Our Alpha Testnet allows the community to deploy smart contracts on Scroll. In this tutorial, we will teach you how to deploy a contract on the Scroll Testnet. This [demo repo](https://github.com/scroll-tech/scroll-contract-deploy-demo) illustrates contract deployment with [Hardhat](https://hardhat.org/) and [Foundry](https://github.com/foundry-rs/foundry).

> ℹ️ **Note**
>
> Before you start deploying the contract, you need to request test tokens from a Goerli faucet and use the [bridge](https://scroll.io/alpha/bridge) to transfer some test ETH from _Goerli_ to _Scroll Alpha_.
:::note[Note]
Before you start deploying the contract, you need to request test tokens from a Goerli faucet and use the [bridge](https://scroll.io/alpha/bridge) to transfer some test ETH from _Goerli_ to _Scroll Alpha_.
:::

### Deploy contracts with Hardhat

Expand Down
Loading