Skip to content

Commit 9ca4841

Browse files
docs: updates to zksync os dev preview (#443)
Updates to ZKsync OS dev preview docs: - adds an faq question about pre-deployed contracts - adds a link to the network details page on the quickstart - adds foundry quickstart - adds portal link
1 parent 389f343 commit 9ca4841

File tree

4 files changed

+62
-6
lines changed

4 files changed

+62
-6
lines changed

content/00.zksync-network/65.zksync-os/05.network-details.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ You can get testnet funds from one of many [testnet faucets](/zksync-network/eco
3535

3636
### Bridging testnet ETH
3737

38-
The ZKsync portal is not yet updated to support ZKsync OS.
39-
Until then, you can use `cast` or `zksync-sdk` to manually bridge funds over as shown in the examples below:
38+
You can use the [ZKsync OS Portal](https://zksync-os.portal.zksync.io/) to bridge testnet ETH over to the devnet.
39+
You can also use `cast` or `zksync-sdk` as shown in the examples below.
4040

4141
#### Bridging with `cast`
4242

@@ -55,6 +55,6 @@ export VALUE_TO_BRIDGE=<AMOUNT_TO_BRIDGE_IN_WEI>
5555
cast send -r $SEPOLIA_RPC $BRIDGEHUB_ADDRESS "requestL2TransactionDirect((uint256,uint256,address,uint256,bytes,uint256,uint256,bytes[],address))" "($CHAIN_ID,$VALUE_TO_BRIDGE,$ADDRESS,50,0x,300000,800,[],$ADDRESS)" --value $VALUE_TO_BRIDGE --private-key=$PRIVATE_KEY
5656
```
5757

58-
#### Bridging with `@zksync-sdk`
58+
#### Bridging with `zksync-sdk`
5959

60-
You can find examples for bridging with `ethers` or `viem` in the [`@zksync-sdk` docs](https://dutterbutter.github.io/zksync-sdk/overview/index.html).
60+
You can find examples for bridging with `ethers` or `viem` in the [`zksync-sdk` docs](https://dutterbutter.github.io/zksync-sdk/overview/index.html).

content/00.zksync-network/65.zksync-os/07.quickstart.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,22 @@ description: Getting starting developing with ZKsync OS
44
---
55

66
You can use all standard EVM tooling for ZKsync OS.
7+
You can find instructions for bridging testnet ETH to ZKsync OS devnet in the [Network Details](/zksync-network/zksync-os/network-details) page.
78

8-
To get started with Hardhat, follow the steps below:
9+
To get started with Foundry or Hardhat, follow the steps below:
910

1011
::content-switcher
1112
---
1213
items: [{
14+
label: 'Foundry',
15+
partial: '_partials/_foundry'
16+
}, {
1317
label: 'Hardhat 3 with Viem',
1418
partial: '_partials/_viem'
1519
}, {
1620
label: 'Hardhat 3 with Ethers',
1721
partial: '_partials/_ethers'
18-
}]
22+
},
23+
]
1924
---
2025
::

content/00.zksync-network/65.zksync-os/10.faqs.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Like with other EVM equivalent L2 solutions, there are a few distinctions that a
3030
For app developers this only affects storage proofs.
3131
More details about the storage model can be found in the [`zksync-os` repository](https://github.com/matter-labs/zksync-os/blob/main/docs/system/io/io.md).
3232
- Blake2f (`0x09`) and KZG point evaluation (`0x0a`) precompiles are not yet supported.
33+
- Priority fees do not yet affect the priority of transactions.
3334

3435
## Is ZKsync OS replacing EraVM? Will existing chains upgrade to it?
3536

@@ -79,3 +80,8 @@ Currently there is no public mainnet.
7980

8081
Running a ZKsync OS chain is not yet supported using `zkstack`.
8182
A full guide for running a ZKsync OS chain will be available soon.
83+
84+
## Are there pre-deployed contracts?
85+
86+
Yes, all [pre-deployed contracts](/zksync-protocol/evm-interpreter/pre-deployed-contracts)
87+
that were available on EraVM with the exceptions of the Create2 Deployer and Safe contracts are available.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
title: Foundry
3+
---
4+
5+
1. Create a new foundry project:
6+
7+
```bash
8+
forge init Counter
9+
cd Counter
10+
```
11+
12+
1. Build the project
13+
14+
```bash
15+
forge build
16+
```
17+
18+
1. Set your private key for deploying:
19+
20+
```bash
21+
export TESTNET_PRIVATE_KEY="0x..."
22+
```
23+
24+
1. Deploy the contract:
25+
26+
```bash
27+
forge script script/Counter.s.sol --rpc-url https://zksync-os-testnet-alpha.zksync.dev --broadcast --private-key $TESTNET_PRIVATE_KEY
28+
```
29+
30+
1. Set the number value:
31+
32+
```bash
33+
cast send 0xCA1386680bfd9D89c7cc6Fc3ba11938ba6E44fef \
34+
"setNumber(uint256)" 5 \
35+
--rpc-url https://zksync-os-testnet-alpha.zksync.dev \
36+
--private-key $TESTNET_PRIVATE_KEY
37+
```
38+
39+
1. Get the latest number value:
40+
41+
```bash
42+
cast call 0xCA1386680bfd9D89c7cc6Fc3ba11938ba6E44fef \
43+
"number()" \
44+
--rpc-url https://zksync-os-testnet-alpha.zksync.dev
45+
```

0 commit comments

Comments
 (0)