Skip to content

Commit 0c87fec

Browse files
commit latest
1 parent b19b702 commit 0c87fec

File tree

3 files changed

+23
-33
lines changed

3 files changed

+23
-33
lines changed

docs/cdk/get-started/deploy-validium/contracts/deploy-contracts.md

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,14 @@
33
1. `cd` to the `deployment/` directory and create a new `deploy_parameters.json` by copying the example
44

55
```bash
6-
cd /cdk-validium/cdk-validium-contracts-0.0.2/deployment
6+
cd deployment/
77
cp deploy_parameters.json.example deploy_parameters.json
88
```
99

10-
!!! info "Parameters updates at step 3 in `deploy_parameters.json`"
11-
- `trustedSequencer`
12-
- `trustedAggregator`
13-
- `admin`
14-
- `cdkValidiumOwner`
15-
- `initialCDKValidiumDeployerOwner`
16-
- `trustedSequencerURL`
17-
- `forkID`
18-
1910
2. Run the following `jq` script to streamline the process of replacing these fields:
2011

2112
```bash
22-
source /tmp/cdk/.env
13+
source /var/tmp/cdk/.env
2314
jq --arg TEST_ADDRESS "$TEST_ADDRESS" '.trustedSequencerURL = "http://127.0.0.1:8123" | .trustedSequencer = $TEST_ADDRESS | .trustedAggregator = $TEST_ADDRESS | .admin = $TEST_ADDRESS | .cdkValidiumOwner = $TEST_ADDRESS | .initialCDKValidiumDeployerOwner = $TEST_ADDRESS | .timelockAddress = $TEST_ADDRESS | .forkID = 6' ./deploy_parameters.json.example > ./deploy_parameters.json
2415
```
2516

@@ -64,7 +55,7 @@ This contract is a factory that deploys the deterministic contracts required by
6455
6556
The address of the contracts it creates depends on the salt and the `initialCDKValidiumDeployerOwner` inside `deploy_parameters.json`.
6657
67-
1. Run the deploy script.
58+
1. From the same `deployment` directory, run the deploy script.
6859
6960
```bash
7061
npm run deploy:deployer:CDKValidium:sepolia

docs/cdk/get-started/deploy-validium/contracts/prerequisites.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,16 @@ Use a public faucet to get Sepolia test ETH.
3232

3333
## Configuration files
3434

35-
Create a folder in `/tmp/cdk/` to store configuration files.
35+
Create a folder in `/var/tmp/cdk/` to store configuration files.
3636

3737
```bash
38-
mkdir /tmp/cdk/
38+
mkdir /var/tmp/cdk/
3939
```
4040

4141
## Environment variables
4242

4343
Create a `.env` file to store environment variables we will use later on.
4444

4545
```bash
46-
nano /var/tmp/.env
46+
nano /var/tmp/cdk.env
4747
```

docs/cdk/get-started/deploy-validium/contracts/set-up.md

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
1. Create a new directory and cd into it.
44

55
```bash
6+
cd ~/
67
mkdir cdk-validium
78
cd cdk-validium/
89
```
@@ -35,27 +36,15 @@ npm install
3536

3637
```bash
3738
cp .env.example .env
38-
nano .env
39-
```
40-
41-
2. Add the environment variables.
42-
43-
```bash
44-
MNEMONIC="<generated mnemonic>" # see instructions below in step 3
45-
INFURA_PROJECT_ID="<INFURA_PROJECT_ID>" # Generate a project id on [Infura](https://www.infura.io/)
46-
ETHERSCAN_API_KEY="<ETHERSCAN_API_KEY>" # Generate an API key on [Etherscan](https://etherscan.io)
4739
```
4840

49-
!!! info
50-
Check our documentation if you want to [use a different node provider](deploy-contracts.md#use-a-different-node-provider).
51-
52-
3. Generate a new mnemonic using `cast`.
41+
2. Generate a new mnemonic using `cast`.
5342

5443
```bash
5544
cast wallet new-mnemonic --words 12
5645
```
5746

58-
!!! important
47+
!!! tip
5948
If the command `new-mnemonic` is not found, update foundry with `foundryup` and try again.
6049

6150
The output should look something like this:
@@ -69,14 +58,24 @@ npm install
6958
Private key: 0x3b01870a8449ada951f59c0275670bea1fc145954ee7cb1d46f7d21533600726
7059
```
7160

72-
4. Copy and paste the newly generated `Phrase` into the `MNEMONIC` field inside `cdk-validium-contracts-0.0.2/.env`
61+
3. Add the environment variables to the `.env` file.
62+
63+
```bash
64+
nano .env
65+
MNEMONIC="<generated mnemonic>" # copy/paste the generated Phrase
66+
INFURA_PROJECT_ID="<INFURA_PROJECT_ID>" # Generate a project id on [Infura](https://www.infura.io/)
67+
ETHERSCAN_API_KEY="<ETHERSCAN_API_KEY>" # Generate an API key on [Etherscan](https://etherscan.io)
68+
```
69+
70+
!!! info
71+
Check our documentation if you want to [use a different node provider](deploy-contracts.md#use-a-different-node-provider).
7372

74-
5. Send 2 Sepolia ETH to the generated address.
73+
4. Send 2 Sepolia ETH to the generated address.
7574

76-
6. Add the following variables to `/var/tmp/.env`.
75+
5. Add the following variables to `/var/tmp/cdk/.env`.
7776

7877
```bash
79-
# /tmp/cdk/.env
78+
nano /var/tmp/cdk/.env
8079
TEST_ADDRESS=<the address generated by cast>
8180
TEST_PRIVATE_KEY=<the private key generated by cast>
8281
L1_URL=https://sepolia.infura.io/v3/<YOUR INFURA PROJECT ID>

0 commit comments

Comments
 (0)