Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update prod with latest changes #165

Merged
merged 45 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
abc78bc
Translation: Getting Started & Developers[zh]
Sep 26, 2023
5e5ecb9
Merge branch 'scroll-tech:develop' into develop
Junweif2 Oct 3, 2023
c8043a5
Merge branch 'scroll-tech:develop' into develop
Junweif2 Oct 19, 2023
77ce189
Merge branch 'scroll-tech:develop' into develop
Junweif2 Nov 6, 2023
dfc9bda
Translation: Technology & Learn[zh]
Nov 6, 2023
daa19d0
adjustments
Nov 7, 2023
16347d2
Merge branch 'scroll-tech:develop' into develop
Junweif2 Dec 9, 2023
1aef298
resolve feedbacks
Dec 9, 2023
3987bb6
revert mainnet issue
Dec 20, 2023
34a26b6
Merge branch 'develop' of ssh://github.com/scroll-tech/scroll-documen…
ChuhanJin Jan 23, 2024
1ec28ef
translate translation.json
ChuhanJin Jan 24, 2024
6ca7672
add zh
ChuhanJin Jan 24, 2024
b1356c5
fix some missing parts
ChuhanJin Jan 24, 2024
835bd6d
fix missing parts
ChuhanJin Jan 24, 2024
699cbd2
add /zh/
ChuhanJin Jan 24, 2024
291549b
fix missing words
ChuhanJin Jan 24, 2024
1fc16ec
fix typo
ChuhanJin Jan 24, 2024
518c125
fix typo
ChuhanJin Jan 24, 2024
39a1a50
better style
ChuhanJin Jan 24, 2024
34cdf9d
better style
ChuhanJin Jan 24, 2024
9a45350
better style
ChuhanJin Jan 24, 2024
a11f7c8
better style
ChuhanJin Jan 24, 2024
024cf98
updates v1
ChuhanJin Jan 25, 2024
09882c9
update zh docs
ChuhanJin Jan 25, 2024
02501e5
update index
ChuhanJin Jan 25, 2024
a2b972c
fix type
ChuhanJin Jan 25, 2024
b46d6e9
fix scroll-contracts
ChuhanJin Jan 25, 2024
e3eb97d
fix zh faucet doc link
ChuhanJin Jan 25, 2024
3f394c2
Update package-lock.json
zzq0826 Jan 26, 2024
3731d41
Update [...slug].astro
zzq0826 Jan 26, 2024
919a6b0
Merge pull request #93 from Junweif2/develop
dghelm Feb 1, 2024
74689d2
update contracts pages, es needs overhaul
dghelm Feb 1, 2024
bd483f3
fix stray todo link
dghelm Feb 1, 2024
d254d88
add section for basic L2 Gas Oracle usage with upgrade notice
dghelm Feb 1, 2024
a178ebe
add notices for dev: bridging parent page
dghelm Feb 1, 2024
8185c22
add notices for technology pages along with comments on enforced txs
dghelm Feb 1, 2024
62487f4
add Scroll Upgrades page with information for tracking future upgrades
dghelm Feb 2, 2024
3b14677
Merge pull request #8 from scroll-tech/develop
Turupawn Feb 6, 2024
8c65171
translationL: updated scroll contracts page
Turupawn Feb 6, 2024
32d7207
fixes around ETHGateway change and updating dates
dghelm Feb 7, 2024
2b5ceda
Typo fix en scroll-contracts.mdx
Turupawn Feb 7, 2024
ac2d2ea
more edits
dghelm Feb 7, 2024
f6697bc
update TBA hash and audit url
dghelm Feb 7, 2024
5c30b92
Merge pull request #163 from scroll-tech/feb2024-bridge-updates-sepolia
dghelm Feb 7, 2024
7934261
Merge pull request #164 from Turupawn/es-language-selector
dghelm Feb 7, 2024
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
2 changes: 1 addition & 1 deletion astro-i18next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
export default {
defaultLocale: "en",
showDefaultLocale: true,
locales: ["en", "es"],
locales: ["en", "es", "zh"],
load: ["server", "client"],
}
4,236 changes: 696 additions & 3,540 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 @@ -54,7 +54,7 @@
},
"devDependencies": {
"@astrojs/mdx": "^0.19.7",
"@astrojs/preact": "^1.2.0",
"@astrojs/preact": "^3.0.1",
"@astrojs/react": "^2.2.0",
"@astrojs/sitemap": "^1.0.0",
"@nomicfoundation/hardhat-toolbox": "^2.0.0",
Expand Down
1 change: 1 addition & 0 deletions public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
"introduction": "Introduction",
"principles": "Principles",
"scrollArchitecture": "Scroll Architecture",
"scrollUpgrades": "Scroll Upgrades",
"overview": "Overview",

"scrollChain": "Scroll Chain",
Expand Down
128 changes: 115 additions & 13 deletions public/locales/zh/translation.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
{
"rightSidebar": {
"onThisPage": "本页",
"more": "更多",
"editThisPage": "编辑本页",
"joinOurCommunity": "加入我们的社区",
"feedback": "反馈"
},
"ui": {
"whatsNext": "接下来是什么",
"readMore": "阅读更多"
},
"landing": {
"test": "test",
"search": {
Expand Down Expand Up @@ -38,45 +49,136 @@
},
"NewsletterCTA": {
"title": "随时了解最新的 Scroll 新闻",
"placeholder": "输入你的电子邮箱地址",
"buttonText": "报名"
"text": "路线图更新,虚拟和现场活动,生态机会等等",
"placeholder": "在此输入您的电子邮件地址",
"thankYouForSubscribing": "感谢您的订阅!",
"correctEmail": "请使用正确的电子邮件地址。",
"pleaseInsertEmail": "请输入您的电子邮件。"
}
},
"sidebar": {
"gettingStarted": {
"gettingStarted": "入门",
"overview": "概述",
"overview": "概览",
"scrollSepoliaTestnet": "Scroll Sepolia 测试网",
"userGuide": "用户指南",
"setup": "设置",
"faucet": "水龙头",
"bridge": "桥接器",
"bridge": "跨链桥",
"transferTokens": "转移代币",
"commonErrors": "常见错误",
"rollupExplorer": "Rollup浏览器",
"rollupExplorer": "Rollup 浏览器",
"scrollSepoliaBlockExplorer": "Scroll Sepolia 浏览器",
"scrollMainnet": "Scroll 主网",
"scrollscan": "Scrollscan 区块浏览器",
"sepoliaBlockExplorer": "Sepolia 浏览器",
"community": "社区",
"discord": "Discord",
"communityForum": "社区论坛"
},
"developers": {
"developers": "开发者",
"buildingOnScroll": "构建Scroll应用",
"buildingOnScroll": "在 Scroll 上开发",
"developerQuickstart": "开发者快速入门",
"integrations": "集成",
"verifyingSmartContracts": "验证智能合约",
"scrollContracts": "Scroll 合约",
"ethereumAndScrollDifferences": "以太坊 和 Scroll 的区别",
"l1AndL2Bridging": "L1 和 L2 跨链",
"ethAndErc20TokenBridge": "ETH 和 ERC20 代币跨链桥",
"erc721NftBridge": "ERC721 NFT 跨链桥",
"erc1155TokenBridge": "ERC1155 代币跨链桥",
"theScrollMessenger": "The Scroll Messenger",
"transactionFeesOnScroll": "Scroll 上的交易手续费",
"l2Fee": "L2 Fee",
"l1Fee": "L1 Fee",
"gasOracle": "Gas 预言机",
"future": "未来",
"guides": "指南",
"contractDeploymentTutorial": "合约部署教程",
"crossChainInteraction": "Scroll Messenger 跨链交互",
"bridgingERC20TokenThroughCustomGateway": "通过自定义网关跨链 ERC20",
"bridgingERC721NftThroughCustomGateway": "通过自定义网关跨链 ERC721 NFT",
"bridgingERC1155ThroughCustomGateway": "通过自定义网关跨链 ERC1155",
"estimatingGasAndTxFees": "预估 Gas 费和交易手续费",
"resources": "资源",
"rollupExplorer": "Rollup浏览器"
"mainnetResources": "主网资源",
"sepoliaResources": "Sepolia资源",
"scrollBlockExplorer": "Scrollscan 区块浏览器",
"rollupExplorer": "Rollup 浏览器",
"scrollSepoliaBlockExplorer": "Scroll Sepolia 浏览器",
"sepoliaRollupExplorer": "Rollup 浏览器",
"sepoliaBlockExplorer": "Sepolia 浏览器"
},
"technology": {
"overview": "概述",
"scrollArchitecture": "Scroll架构"
"introduction": "介绍",
"principles": "原则",
"scrollArchitecture": "Scroll 架构",
"overview": "概览",

"scrollChain": "Scroll 链",
"accountsAndState": "账户和状态",
"blocks": "区块",
"transactions": "交易",
"rollupProcess": "Rollup 流程",
"evmDifferencesFromEthereum": "和以太坊 EVM 的区别",

"bridge": "跨链桥",
"crossDomainMessaging": "跨链消息传递",
"depositGateways": "存款网关",
"withdrawGateways": "提款网关",

"sequencer": "排序器",
"executionNode": "执行节点",
"rollupNode": "Rollup 节点",
"zkTrie": "zkTrie树",

"zkevm": "zkEVM",
"introToZkevm": "zkEVM 介绍",
"zkevmOverview": "zkEVM 概览",
"bridgeOverview": "跨链桥 概览",
"prover": "prover",
"proofGeneration": "证明生成",
"cpuProverRepo": "CPU prover 代码仓库",

"security": "安全",
"auditsAndBugBounty": "审计和漏洞赏金",
"l2BeatAssessment": "L2Beat 评估"
},
"learn": {
"zkEVMOverview": "zkEVM概述"
"ethereumAndProtocols": "以太坊与协议",
"theScalabilityProblem": "扩容问题",
"introToRollups": "Rollups 介绍",
"zeroKnowledge": "零知识证明",
"introToZeroKnowledge": "零知识证明介绍",
"polynomialCommitmentSchemes": "多项式承诺方案",
"kzgCommitmentScheme": "KZG 承诺方案",
"additionalResources": "其他资源"
}
},
"footer": {
"aboutScroll": {
"title": "关于 Scroll",
"bugBounty": "漏洞赏金",
"joinUs": "加入我们",
"healthStatus": "健康状况",
"privacyPolicy": "隐私政策",
"termsAndConditions": "条款和条件"
},
"resources": {
"title": "资源",
"scrollDocsURL": "https://docs.scroll.io/",
"blog": "博客",
"documentation": "文档",
"brandKit": "品牌工具包"
},
"infrastructure": {
"introduction": "介绍"
"followUs": {
"title": "关注我们"
}
},
"pageNotFound": {
"title": "页面未找到",
"text": "很抱歉,我们找不到您正在寻找的页面"
},
"notTranslated": {
"notTranslated": "此页面尚未翻译。"
}
Expand Down
8 changes: 7 additions & 1 deletion src/config/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,13 @@ export const getSidebar = () => {
technology: [
{
section: t("sidebar.technology.overview"),
contents: [{ title: t("sidebar.technology.scrollArchitecture"), url: formatUrl("technology") }],
contents: [
{ title: t("sidebar.technology.scrollArchitecture"), url: formatUrl("technology") },
{
title: t("sidebar.technology.scrollUpgrades"),
url: "technology/overview/scroll-upgrades",
},
],
},
{
section: t("sidebar.technology.scrollChain"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ For a more comprehensive explanation and details on the formula, check the docum

## Interfacing with values

To fetch these values and calculate the final fee, we’ll interact with Scroll’s public RPC and pre-deployed Smart Contract L1GasOracle.sol, which is deployed at [`TODO: 0x5300000000000000000000000000000000000002`](TODO: https://blockscout.scroll.io/address/0x5300000000000000000000000000000000000002)
To fetch these values and calculate the final fee, we’ll interact with Scroll’s public RPC and pre-deployed Smart Contract `L1GasOracle.sol`, deployed at [`0x5300000000000000000000000000000000000002`](https://scrollscan.com/address/0x5300000000000000000000000000000000000002).

For our example codebase, we make a Hardhat project and fetch values using the [Ethers.js](https://docs.ethers.org/v6/) library.

Expand Down
4 changes: 3 additions & 1 deletion src/content/docs/en/developers/l1-and-l2-bridging.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ excerpt: "An overview of Scroll's Bridging architecture"
---

import ClickToZoom from "../../../../components/ClickToZoom.astro"
import Aside from "../../../../components/Aside.astro"
import L1GatewayWHITE from "../../../../assets/images/developers/L1GatewayWHITE.png"
import withdrawWHITE from "../../../../assets/images/developers/withdrawWHITE.png"

Expand All @@ -22,6 +23,7 @@ In addition to token transfers, the Scroll Messenger contract enables cross-chai

## L1 Gateway architecture


<ClickToZoom src={L1GatewayWHITE} />

There are many entry points from the user to the Scroll bridge. This will depend on what you want to do and how you want to do it. If you want to send ETH or ERC20 tokens, you should use the `GatewayRouter` . If you want to send NFTs, you should use the `L1ERC721Gateway` or `L1ERC1155Gateway`. If you want to send arbitrary data, you should use the `L1ScrollMessenger`. All Gateway transfers use the Scroll Messenger to send assets cross-chain, whose job is to append the transactions to the Message Queue for L2 inclusion.
Expand All @@ -32,4 +34,4 @@ There are many entry points from the user to the Scroll bridge. This will depend

Regarding possible permissionlessly callable entry points, the L2 Gateway Architecture is very similar to L1. The difference is that when sending a message from L2, calling the `appendMessage` function will store the message in an append-only binary merkle tree (aka withdraw tree) in the `L2MessageQueue`. When a new message is sent to the `L2MessageQueue`, the relayer will detect it and store it in the database. When the block is finalized, it will generate a proof of the new merkle path and pass it to the L1geth node to execute on `L1ScrollMessenger` . All finalized withdraw roots will be stored in the rollup contract so we can verify the proof against them. In the next Scroll versions, the Relayer won't be needed since all users will be able to finalize the transaction on L1.

In the upcoming sections, we will explore the technical aspects of the bridge, including the smart contract API required to utilize its capabilities. Detailed guides with code examples are provided in the Developer Guides section to assist developers and users in understanding and implementing these functionalities.
In the upcoming sections, we will explore the technical aspects of the bridge, including the smart contract API required to utilize its capabilities. Detailed guides with code examples are provided in the Developer Guides section to assist developers and users in understanding and implementing these functionalities.
19 changes: 11 additions & 8 deletions src/content/docs/en/developers/scroll-contracts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ Use the table below to configure your Ethereum tools to the Scroll mainnet.

### ETH and ERC20 Bridge

- L1 ERC20 Gateway Router: [`0xF8B1378579659D8F7EE5f3C929c2f3E332E41Fd6`](https://etherscan.io/address/0xF8B1378579659D8F7EE5f3C929c2f3E332E41Fd6)
- L2 ERC20 Gateway Router: [`0x4C0926FF5252A435FD19e10ED15e5a249Ba19d79`](https://scrollscan.com/address/0x4C0926FF5252A435FD19e10ED15e5a249Ba19d79)
- L1 Gateway Router: [`0xF8B1378579659D8F7EE5f3C929c2f3E332E41Fd6`](https://etherscan.io/address/0xF8B1378579659D8F7EE5f3C929c2f3E332E41Fd6)
- L2 Gateway Router: [`0x4C0926FF5252A435FD19e10ED15e5a249Ba19d79`](https://scrollscan.com/address/0x4C0926FF5252A435FD19e10ED15e5a249Ba19d79)

### Advanced Bridge Contracts

Expand All @@ -68,8 +68,10 @@ Use the table below to configure your Ethereum tools to the Scroll mainnet.
- ERC1155 Bridge
- L1 ERC1155 Gateway: [`0xb94f7F6ABcb811c5Ac709dE14E37590fcCd975B6`](https://etherscan.io/address/0xb94f7F6ABcb811c5Ac709dE14E37590fcCd975B6)
- L2 ERC1155 Gateway: [`0x62597Cc19703aF10B58feF87B0d5D29eFE263bcc`](https://scrollscan.com/address/0x62597Cc19703aF10B58feF87B0d5D29eFE263bcc)
- Gas Oracle
- L2 Gas Oracle (deployed on Mainnet): [`0x987e300fDfb06093859358522a79098848C33852`](https://scrollscan.com/address/0x987e300fDfb06093859358522a79098848C33852)
- Gas Oracle (deployed on Mainnet)
- L2 Gas Oracle (*soon to be deprecated*): [`0x987e300fDfb06093859358522a79098848C33852`](https://etherscan.io/address/0x987e300fDfb06093859358522a79098848C33852)
- *after [Feb '24 Bridge Upgrade](https://scroll.io/blog/protocol-upgrade-bridging-cost-reduction)*
- L2 Message Queue With Gas Price Oracle: [`0x0d7E906BD9cAFa154b048cFa766Cc1E54E39AF9B`](https://etherscan.io/address/0x0d7E906BD9cAFa154b048cFa766Cc1E54E39AF9B)

### L2 Predeploys

Expand Down Expand Up @@ -155,8 +157,8 @@ Use the table below to configure your Ethereum tools to the Scroll Sepolia Testn

#### ETH and ERC20 Bridge

- L1 ERC20 Gateway Router: [`0x13FBE0D0e5552b8c9c4AE9e2435F38f37355998a`](https://sepolia.etherscan.io/address/0x13FBE0D0e5552b8c9c4AE9e2435F38f37355998a)
- L2 ERC20 Gateway Router: [`0x9aD3c5617eCAa556d6E166787A97081907171230`](https://sepolia.scrollscan.com/address/0x9aD3c5617eCAa556d6E166787A97081907171230)
- L1 Gateway Router: [`0x13FBE0D0e5552b8c9c4AE9e2435F38f37355998a`](https://sepolia.etherscan.io/address/0x13FBE0D0e5552b8c9c4AE9e2435F38f37355998a)
- L2 Gateway Router: [`0x9aD3c5617eCAa556d6E166787A97081907171230`](https://sepolia.scrollscan.com/address/0x9aD3c5617eCAa556d6E166787A97081907171230)

#### Advanced Bridge Contracts

Expand All @@ -179,8 +181,9 @@ Use the table below to configure your Ethereum tools to the Scroll Sepolia Testn
- ERC1155 Bridge
- L1 ERC1155 Gateway: [`0xa5Df8530766A85936EE3E139dECE3bF081c83146`](https://sepolia.etherscan.io/address/0xa5Df8530766A85936EE3E139dECE3bF081c83146)
- L2 ERC1155 Gateway: [`0xe17C9b9C66FAF07753cdB04316D09f52144612A5`](https://sepolia.scrollscan.com/address/0xe17C9b9C66FAF07753cdB04316D09f52144612A5)
- Gas Oracle
- L2 Gas Oracle (deployed on Sepolia): [`0x247969F4fad93a33d4826046bc3eAE0D36BdE548`](https://sepolia.scrollscan.com/address/0x247969F4fad93a33d4826046bc3eAE0D36BdE548)
- Gas Oracle (deployed on Sepolia)
- L1 Message Queue With Gas Price Oracle: [`0xF0B2293F5D834eAe920c6974D50957A1732de763`](https://sepolia.etherscan.io/address/0xF0B2293F5D834eAe920c6974D50957A1732de763)
- L2 Gas Oracle (*deprecated*): [`0x247969F4fad93a33d4826046bc3eAE0D36BdE548`](https://sepolia.etherscan.io/address/0x247969F4fad93a33d4826046bc3eAE0D36BdE548)

#### L2 Predeploys

Expand Down
26 changes: 23 additions & 3 deletions src/content/docs/en/developers/transaction-fees-on-scroll.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ Returns the latest known l1 base fee
#### getL1Fee

```solidity
function getL1Fee(bytes memory _data) external view returns (uint256);
function getL1Fee(bytes memory data) external view returns (uint256);
```

Computes the L1 portion of the fee based on the size of the RLP encoded input transaction, the current L1 base fee, and the various dynamic parameters.
Expand All @@ -165,10 +165,30 @@ Computes the amount of L1 gas used for a transaction. Adds the overhead which re
| --------- | ----------------------------------------------------------- |
| data | Signed fully RLP-encoded transaction to get the L1 fee for. |

## L1 Originated Transactions

When messaging from L1 to L2, the user pays all transaction fees on L1. The user pays L1 gas fees, but because of this, doesn't need to pay Scroll an L1 Data Fee. They will need to account for L2 Execution Fees in their L1 transaction though, and will need to know how much L2 gas to pay.

Contracts on L1 can use an L2 Gas Price Oracle deployed to the L1 to get the gas fee for a given transaction. The oracle also exposes the current l2BaseFee and estimated cross-domain message fee for a given gas limit.

On mainnet, the `L2GasPriceOracle` is deployed at [`0x987e300fDfb06093859358522a79098848C33852`](https://etherscan.io/address/0x987e300fDfb06093859358522a79098848C33852).

On Sepolia, an upgraded `L1MessageQueueWithGasPriceOracle` should be used, deployed to [`0xF0B2293F5D834eAe920c6974D50957A1732de763`](https://sepolia.etherscan.io/address/0xF0B2293F5D834eAe920c6974D50957A1732de763).

If your system supports off-chain mechanisms, you can also call `eth_estimateGas` and `eth_gasPrice` on any Scroll RPC node to get an estimate of the gas required for a given transaction.

<Aside type="danger" title="Upgrade Notice">
After the February 2024 Bridge Upgrade, `L1GasPriceOracle` will be deprecated in favor of `L1MessageQueueWithGasPriceOracle`, which will be available at [`0x0d7E906BD9cAFa154b048cFa766Cc1E54E39AF9B`](https://etherscan.io/address/0x0d7E906BD9cAFa154b048cFa766Cc1E54E39AF9B).

The upgrade is expected to be finalized on February 21, 2024, after a two-week timelock. Scroll Sepolia has already undergone this upgrade. Read more [here](https://scroll.io/blog/protocol-upgrade-bridging-cost-reduction).

</Aside>
{/* TODO: Add full documentation of key methods */}

## Future Roadmap

Currently, the computation required for proof generation is completed by and subsidized by Scroll and various proving partners.
Currently, the computation required for proof generation and gas for proof verification on L1 is subsidized by Scroll and various proving partners. It is partially covered by setting a floor to L2 Gas Price.

As the prover network becomes decentralized, incentives for proof generation will need to be incorporated into the protocol for the system to be sustainable and scalable.

We expect the final gas cost will include the cost of this proof generation. With further protocol optimization, this cost for the user should be minimal, as each proof covers many transactions.
We expect the final gas cost will explicitly include the cost of this proof generation. With further protocol optimization, this cost for the user should be minimal, as each proof covers many transactions.
Loading
Loading