Skip to content

Commit

Permalink
Merge pull request #176 from 0xPolygon/docs/fix-menu
Browse files Browse the repository at this point in the history
Docs: fix menu for importing
  • Loading branch information
praetoriansentry authored Jul 8, 2024
2 parents d6cdf9a + 2dc5af9 commit 2effe11
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 36 deletions.
50 changes: 50 additions & 0 deletions docs/connect-testnet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
comments: true
---

## Stavanger

The [CDK Stavanger testnet](https://polygon.technology/cdk-stavanger-testnet) is a validium testnet based on Sepolia.

- Add the RPC network details to your wallet by navigating to the add network input and entering the data as given in the table below.
- Use the faucet to get test ETH.
- Bridge assets from Sepolia to Stavanger using the bridge.
- Confirm your transactions with the block explorer.

!!! tips "Setting up your wallet"
- Click **Connect wallet** on the [Stavanger explorer](https://sn2-stavanger-blockscout.eu-north-2.gateway.fm/) to auto set up your wallet.
- Check out the latest on [setting up a custom network with MetaMask](https://support.metamask.io/hc/en-us/articles/360043227612-How-to-add-a-custom-network-RPC).

### Stavanger network details

| Name | Value | Usage |
| ------- | ----------- | --------- |
| JSON RPC | https://sn2-stavanger-rpc.eu-north-2.gateway.fm | Make remote procedure calls to the CDK testnet. |
| Faucet | https://sn2-stavanger-faucet.eu-north-2.gateway.fm | Get testnet ETH |
| Bridge | https://sn2-stavanger-bridge.eu-north-2.gateway.fm | Bridge tokens from Sepolia |
| Block explorer | https://sn2-stavanger-blockscout.eu-north-2.gateway.fm | Confirm transactions with the explorer |
| Chain id | 686669576 | Chain identification value |
| Currency | ETH | Test token |

## Blackberry

The [Blackberry testnet](https://raas.gelato.network/rollups/details/public/polygon-blackberry) is a zero-knowledge-powered, layer 2 testnet based on Sepolia. It uses Polygon CDK for transaction validity while keeping transaction data off-chain using [DACs](https://docs.polygon.technology/cdk/glossary/#data-availability-committee-dac).

- Add the RPC network details to your wallet by navigating to the add network input and entering the data as given in the table below.
- Obtain Sepolia ETH from the public faucets available.
- Bridge assets from the Ethereum Sepolia network to Blackberry using the bridge service.
- Confirm your transactions with the block explorer.

!!! tips "More information"
- For more information on bridging and faucet services on Blackberry, head over to the [Gelato documentation](https://docs.gelato.network/rollup-public-testnet/faucets-and-bridging).

### Blackberry network details

| Name | Value | Usage |
| -------------- | --------------------------------------------------------- | ------------------------------------------------------ |
| JSON RPC | `https://rpc.polygon-blackberry.gelato.digital` | Make remote procedure calls to the Blackberry testnet. |
| Faucet | `https://www.alchemy.com/faucets/ethereum-sepolia` | Obtain sepolia ETH |
| Bridge | `https://bridge.gelato.network/bridge/polygon-blackberry` | Bridge assets from the ethereum sepolia network |
| Block explorer | `https://polygon-blackberry.gelatoscout.com/` | Confirm transactions with the explorer |
| Chain id | `94204209` | Chain identification value |
| Currency | sETH | Test token |
6 changes: 3 additions & 3 deletions docs/quick-test-stack.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,16 @@ Status `1` signifies a successful transaction.

1. Add the network details manually to MetaMask and accept the defaults and auto-populating fields.

![MetaMask manual network entry](../img/how-to/manual-network-entry.png)
![MetaMask manual network entry](img/how-to/manual-network-entry.png)

2. In local/test setup you will find a pre-funded account with private key: `0x12d7de8621a77640c9241b2595ba78ce443d05e94090365ab3bb5e19df82c625`. Import the account into MetaMask.

<center>
![Import pre-funded account](../img/how-to/account.png){ width=45% }
![Import pre-funded account](img/how-to/account.png){ width=45% }
</center>

3. Send a transaction to another MetaMask account.

![Transaction sending success](../img/how-to/tx-success.png)
![Transaction sending success](img/how-to/tx-success.png)

</br>
34 changes: 16 additions & 18 deletions docs/use-native-token.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The diagram below illustrates the interchange of assets between layers, focusing

It depicts several scenarios, such as bridging an ERC20 token from mainnet to another ERC20 token in LY, bridging L1 ETH to the LY gas token, or bridging a wrapped ERC20 token living on LX to LY ETH.

![Unfied bridge exchanges](../img/how-to/gas-token-img/ulxly-exchanges.drawio.png)
![Unfied bridge exchanges](img/how-to/gas-token-img/ulxly-exchanges.drawio.png)

## Set up and prerequisites

Expand All @@ -30,14 +30,12 @@ It depicts several scenarios, such as bridging an ERC20 token from mainnet to an
kurtosis run --enclave cdk-v1 --args-file params.yml --image-download always .
```

!!! tip
For full set up and deploy instructions, check out the [quickstart](../quickstart/deploy-stack.md) documentation.

It takes a few minutes to compile and deploy the full set of contracts.

The screenshot below shows the full set of deployed services and highlights the bridge UI, L1 RPC, and L2 RPC services which we will focus on throughout this document.

![Deployed services](../img/how-to/gas-token-img/services.png)
![Deployed services](img/how-to/gas-token-img/services.png)

### Mint gas token on L1

Expand Down Expand Up @@ -107,7 +105,7 @@ The first derived private key from the `code...quality` mnemonic is

1. On the bridge UI, click the token dropdown menu:

![Token dropdown menu](../img/how-to/gas-token-img/01_bridge.png)
![Token dropdown menu](img/how-to/gas-token-img/01_bridge.png)

2. Get the ERC20 gas token address from earlier and paste it in with:

Expand All @@ -117,29 +115,29 @@ The first derived private key from the `code...quality` mnemonic is

In my case, the gas token address is `0xBDF337Ae0209B33285034c476f35733BFC890707`.

![Paste token in](../img/how-to/gas-token-img/02_bridge.png)
![Paste token in](img/how-to/gas-token-img/02_bridge.png)

3. Confirm the details and click the **Add CDK Gas Token** button.

![Paste token in](../img/how-to/gas-token-img/03_bridge.png)
![Paste token in](img/how-to/gas-token-img/03_bridge.png)

### Bridge tokens

1. Select the token for bridging.

![Select token for bridging](../img/how-to/gas-token-img/04_bridge.png)
![Select token for bridging](img/how-to/gas-token-img/04_bridge.png)

2. Add a value to bridge and click **Continue**.

![Bridging details](../img/how-to/gas-token-img/05_bridge.png)
![Bridging details](img/how-to/gas-token-img/05_bridge.png)

3. Your bridge deposit should be pending.

![Token bridging processing](../img/how-to/gas-token-img/06_bridge.png)
![Token bridging processing](img/how-to/gas-token-img/06_bridge.png)

4. After some time, the transaction should complete.

![Bridging complete](../img/how-to/gas-token-img/07_bridge.png)
![Bridging complete](img/how-to/gas-token-img/07_bridge.png)

!!! tip
If that doesn't happen, it's possible the auto-claiming service on L2 is not funded. Send it some Ether on L2 by running a command like this:
Expand All @@ -154,23 +152,23 @@ The first derived private key from the `code...quality` mnemonic is

5. Switch to your L2 network on Metamask to see the bridged value on L2.

![Check bridge success on L2 in MetaMask](../img/how-to/gas-token-img/07_bridge.png)
![Check bridge success on L2 in MetaMask](img/how-to/gas-token-img/07_bridge.png)

### Transfer token

1. To complete the test, lets transfer some of the value on L2 to another address.

![Transfer to another L2 address](../img/how-to/gas-token-img/07_bridge.png)
![Transfer to another L2 address](img/how-to/gas-token-img/07_bridge.png)

2. Check the balance in MetaMask after importing the private key `0903a9a721167e2abaa0a33553cbeb209dc9300d28e4e4d6d2fac2452f93e357`.

![Balance of receiving account](../img/how-to/gas-token-img/07_bridge.png)
![Balance of receiving account](img/how-to/gas-token-img/07_bridge.png)

### Withdraw the token

1. After initiating a withdraw transaction, wait for the transaction data to be proven on L1.

![Balance of receiving account](../img/how-to/gas-token-img/11_bridge.png)
![Balance of receiving account](img/how-to/gas-token-img/11_bridge.png)

!!! warning
- As of 2024-03-27, there might be a small bug in the bridge UI which causes the transaction not to be claimable on L1 with the UI.
Expand All @@ -179,7 +177,7 @@ The first derived private key from the `code...quality` mnemonic is
2. Click **Finalize**.
![Balance of receiving account](../img/how-to/gas-token-img/12_bridge.png)
![Balance of receiving account](img/how-to/gas-token-img/12_bridge.png)
## Using cast to withdraw assets from the bridge
Expand Down Expand Up @@ -265,11 +263,11 @@ sh scripts/bridge-manual-claim.sh
You should see something like this:
![Output from cast bridging script](../img/how-to/gas-token-img/14_bridge.png)
![Output from cast bridging script](img/how-to/gas-token-img/14_bridge.png)
Confirm the claim went through using MetaMask and the bridge UI.
![MetaMask confirmation](../img/how-to/gas-token-img/15_bridge.png)
![MetaMask confirmation](img/how-to/gas-token-img/15_bridge.png)
!!! info
Even though the bridge UI didn't allow me to claim, it does correctly show that a claim was executed.
24 changes: 9 additions & 15 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,16 @@ theme:
- content.code.copy
- content.action.edit


nav:
- Overview: index.md
- Deploy and manage a CDK stack:
- Deploy the CDK stack: quickstart/deploy-stack.md
- Set up a permissionless node: quickstart/set-up-permissionless-node.md
- Observability: quickstart/observability.md
- Breakdown the deployment: quickstart/breakdown-deployment.md
- How to:
- Migrate:
- Fork id 7 to 9: how-to/migrate/forkid-7-to-9.md
- General guide for partners: how-to/migrate/fork.md
- Mint, bridge, and use tokens: how-to/use-native-token.md
- Integrate a DAC: how-to/integrate-da.md
- Manage allowlists with policies: how-to/manage-policies.md
- Quickly test a running stack: how-to/quick-test-stack.md
- Connect to CDK testnets: quickstart/connect-testnet.md
- Migrate:
- Fork id 7 to 9: migrate/forkid-7-to-9.md
- General guide for partners: migrate/fork.md
- Create custom native token: use-native-token.md
- Integrate a DAC: integrate-da.md
- Manage allowlists with policies: manage-policies.md
- Quickly test a running stack: quick-test-stack.md
- Connect to CDK testnets: connect-testnet.md



Expand Down

0 comments on commit 2effe11

Please sign in to comment.