Skip to content

Commit

Permalink
Merge pull request #399 from scroll-tech/develop
Browse files Browse the repository at this point in the history
feat: update sdk docs to support contracts verification
  • Loading branch information
yiweichi authored Nov 25, 2024
2 parents 82d3af6 + a9a7fea commit d18f6d1
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 4 deletions.
1 change: 1 addition & 0 deletions public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@
"customizingSdkComponents": "Customizing SDK Components",
"awsDeployment": "AWS Deployment",
"operation": "Operating a Chain",
"contractsVerification": "Contracts Verification",
"gasAndFees": "Gas & Fee Management",
"monitoring": "Monitoring",
"security": "Security and Recovery",
Expand Down
4 changes: 4 additions & 0 deletions src/config/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,10 @@ export const getSidebar = () => {
{
section: t("sidebar.sdk.operation"),
contents: [
{
title: t("sidebar.sdk.contractsVerification"),
url: formatUrl("sdk/operation/contracts-verification"),
},
{
title: t("sidebar.sdk.gasAndFees"),
url: formatUrl("sdk/operation/gas-and-fees"),
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/en/sdk/guides/aws-deployment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Make sure to follow the installation instructions for each tool on their respect
To install the scroll-sdk-cli, run:

```bash
npm install -g @scroll-tech/scroll-sdk-cli
npm install -g @scroll-tech/scroll-sdk-cli@0.1.1
```

{/* TODO: Replace with new command */}
Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/en/sdk/guides/devnet-deployment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ As we migrate to the Blockscout upgrade with native Scroll SDK support, we haven
- `brew install nvm`
- `nvm install node`
- scroll-sdk-cli *(Experimental, APIs may change)*
- `npm install -g @scroll-tech/scroll-sdk-cli`
- `npm install -g @scroll-tech/scroll-sdk-cli@0.1.1`
3. You should now be able to open a terminal and run the following:
- `docker -v`
- `kubectl version`
Expand Down Expand Up @@ -125,7 +125,7 @@ As we migrate to the Blockscout upgrade with native Scroll SDK support, we haven
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
# Re-login or source your shell configuration
nvm install 20
npm install -g @scroll-tech/scroll-sdk-cli
npm install -g @scroll-tech/scroll-sdk-cli@0.1.1
```
{/* TODO: Update the cli command to use the new `scrollsdk` install command */}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Please be aware that Blockscout will take a few extra steps to setup without aut
- k9s *(optional)*


To install the scroll-sdk-cli, run `npm install -g @scroll-tech/scroll-sdk-cli`
To install the scroll-sdk-cli, run `npm install -g @scroll-tech/scroll-sdk-cli@0.1.1`

Then, run `scrollsdk test dependencies` to test that the tool works and to check the required dependencies listed above.

Expand Down
31 changes: 31 additions & 0 deletions src/content/docs/en/sdk/operation/contracts-verification.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
section: sdk
title: "Upgrading Scroll SDK"
lang: "en"
permalink: "sdk/operation/contracts-verification"
excerpt: "Learn more about verify smart contract scource code on blockchain explorer"
---

import Steps from '../../../../../components/Steps/Steps.astro';

## Overview

This guide documents how to verify the smart contract source code of your own Scroll SDK deployment on blockchain explorers.

### Devnet deployment

<Steps>
1. Go to the `devnet` folder of `scroll-sdk` repository
2. Configurate `[contracts.verification]` section of your config.toml file as described [here](/en/sdk/technical-stack/configuration#contracts-verification)
3. To start the verification process, run the following command:
- `make verify`
</Steps>

### Production deployment

<Steps>
1. Go to the root directory of your local workspace repo
2. Configurate `[contracts.verification]` section of your config.toml file as described [here](/en/sdk/technical-stack/configuration#contracts-verification)
3. To start the verification process, run the following command:
- `scrollsdk setup verify-contracts`
</Steps>
15 changes: 15 additions & 0 deletions src/content/docs/en/sdk/technical-stack/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,21 @@ Contained in the `[contracts.overrides]` section.
| L2_WETH | Override address for the L2 WETH contract. | `0x5300000000000000000000000000000000000004` |
| L2_TX_FEE_VAULT | Override address for the L2 transaction fee vault contract. | `0x5300000000000000000000000000000000000005` |

### Contracts Verification

Contained in the `[contracts.verification]` section.

| Config Variable | Description | Default Value |
|-----------------|-------------|---------------|
| VERIFIER_TYPE_L1 | Verifier type for the L1 contracts. supports `blockscout`, `etherscan` and `sourcify`. | `blockscout` |
| VERIFIER_TYPE_L2 | Verifier type for the L2 contracts. supports `blockscout`, `etherscan` and `sourcify`. | `blockscout` |
| EXPLORER_URI_L1 | Homepage URL of L1 explorer. | `http://l1-explorer.scrollsdk` |
| EXPLORER_URI_L2 | Homepage URL of L2 explorer. | `http://blockscout.scrollsdk` |
| RPC_URI_L1 | RPC URL of L1 network. | `http://l1-devnet.scrollsdk` |
| RPC_URI_L2 | RPC URL of L1 network. | `http://l1-devnet.scrollsdk` |
| EXPLORER_API_KEY_L1 | Explorer API key for L1 contracts verification. Leave it blank if verifier type is `blockscout`. | |
| EXPLORER_API_KEY_L2 | Explorer API key for L2 contracts verification. Leave it blank if verifier type is `blockscout`. | |

### Coordinator

Contained in the `[coordinator]` section.
Expand Down

0 comments on commit d18f6d1

Please sign in to comment.