Skip to content

Commit

Permalink
zk fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Litteri authored and Ivan Litteri committed Jan 19, 2024
1 parent 48a90a0 commit 5e98b84
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions validium_mode_example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,36 @@ In order to start the node as a validium and run the example follow the next ste

### Run the server

To run this example we need to run the server in validium mode. In the `zksync-era` directory, you can run the following command:
To run this example we need to run the server in validium mode. In the `zksync-era` directory, you can run the following
command:

```sh
zk && zk clean --all && zk init --validium-mode && zk server
```

> [!IMPORTANT]
> Make sure that the flag `--validium-mode` is present when initilizing the server.
> [!IMPORTANT] Make sure that the flag `--validium-mode` is present when initilizing the server.
This will set up the Ethereum node with the validium contracts, and also define an `env` var which the server will pick up in order to run as a validium node.
This will set up the Ethereum node with the validium contracts, and also define an `env` var which the server will pick
up in order to run as a validium node.

### Run the example

In this example we're going to run some transactions.

Once the server is running, run this command in other terminal:

```sh
cargo run --release --bin zksync_full_stack
```

This test does the following:
- Inits a wallet
- Deposits some funds into the wallet
- Deploys a sample ERC20 contract
- Query the contract for the token name and symbol
- Mint 100000 tokens into the address `CD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826`
- Transfer 1000 tokens from `CD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826` to `bBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB`

- Inits a wallet
- Deposits some funds into the wallet
- Deploys a sample ERC20 contract
- Query the contract for the token name and symbol
- Mint 100000 tokens into the address `CD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826`
- Transfer 1000 tokens from `CD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826` to `bBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB`

### Logs and prints

Expand Down Expand Up @@ -65,5 +68,5 @@ L2 fee: 31366500000000
L1 max fee per gas: 1000000010
```

> [!NOTE]
> You can observe how the diferent fields evolve depending on the operation. The `transaction hash` is a changing field.
> [!NOTE] You can observe how the diferent fields evolve depending on the operation. The `transaction hash` is a
> changing field.

0 comments on commit 5e98b84

Please sign in to comment.