Skip to content

Commit c683c7a

Browse files
committed
CDK: update integrate DA
1 parent 9e6c5f3 commit c683c7a

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

docs/cdk/how-to/integrate-da.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
comments: true
33
---
44

5-
This document shows you how to integrate a third-party data availability (DAC) solution into your CDK stack.
5+
This document shows you how to integrate a third-party data availability (DA) solution into your CDK stack.
66

77
## Prerequisites
88

@@ -15,22 +15,23 @@ This section shows you how to create a custom CDK validium DAC contract.
1515

1616
1. Clone [zkevm-contracts](https://github.com/0xPolygonHermez/zkevm-contracts).
1717

18-
2. `cd` into `zkevm-contracts` and checkout tag `v6.0.0-rc.1-fork.9`.
18+
2. `cd` into `zkevm-contracts` and checkout tag [`v8.0.0-rc.3-fork.12`](https://github.com/0xPolygonHermez/zkevm-contracts/releases/tag/v8.0.0-rc.3-fork.12).
1919

2020
3. Run `npm install` from the root.
2121

2222
4. `cd` to the `contracts/v2/consensus/validium` directory.
2323

2424
!!! tip
25-
- Until further notice, these contracts run on the [etrog release](https://polygon.technology/blog/polygon-zkevm-the-etrog-upgrade-is-live-on-mainnet).
25+
- Until further notice, these contracts run on the [banana release](https://github.com/0xPolygonHermez/zkevm-contracts/tree/feature/banana).
26+
27+
5. Create your custom contract in the same directory, and make sure it implements the [IDataAvailabilityProtocol](https://github.com/0xPolygonHermez/zkevm-contracts/blob/v8.0.0-rc.3-fork.12/contracts/v2/interfaces/IDataAvailabilityProtocol.sol) interface.
2628

27-
5. Create your custom contract in the same directory, and make sure it implements the [IDataAvailabilityProtocol](https://github.com/0xPolygonHermez/zkevm-contracts/blob/v6.0.0-rc.1-fork.9/contracts/v2/interfaces/IDataAvailabilityProtocol.sol) interface.
2829

2930
!!! tip
30-
- Use the Polygon DAC implementation contract: [PolygonDataCommittee.sol](https://github.com/0xPolygonHermez/zkevm-contracts/blob/v6.0.0-rc.1-fork.9/contracts/v2/consensus/validium/PolygonDataCommittee.sol) as a guide.
31+
- Use the Polygon DAC implementation contract: [PolygonDataCommittee.sol](https://github.com/0xPolygonHermez/zkevm-contracts/blob/v8.0.0-rc.3-fork.12/contracts/v2/consensus/validium/PolygonDataCommittee.sol) as a guide.
3132
- The contract supports custom smart contract implementation and, through this, DACs can add their custom on-chain verification logic.
3233

33-
6. You can leave the `verifyMessage` function empty but make sure the `getProcotolName` function returns a unique name (such as Avail, Celestia, etc). The following example code comes from the [PolygonDataCommitee.sol](https://github.com/0xPolygonHermez/zkevm-contracts/blob/v6.0.0-rc.1-fork.9/contracts/v2/consensus/validium/PolygonDataCommittee.sol) implementation.
34+
6. You can leave the `verifyMessage` function empty but make sure the `getProcotolName` function returns a unique name (such as Avail, Celestia, etc). The following example code comes from the [PolygonDataCommitee.sol](https://github.com/0xPolygonHermez/zkevm-contracts/blob/v8.0.0-rc.3-fork.12/contracts/v2/consensus/validium/PolygonDataCommittee.sol) implementation.
3435

3536
```solidity
3637
// Name of the data availability protocol
@@ -56,7 +57,7 @@ This section shows you how to create a custom CDK validium DAC contract.
5657
5758
!!! info "`PolygonValidiumEtrog.sol` solution"
5859
59-
The [Etrog DAC integration contract](https://github.com/0xPolygonHermez/zkevm-contracts/blob/v6.0.0-rc.1-fork.9/contracts/v2/consensus/validium/PolygonValidiumEtrog.sol) is still work-in-progress at the time of writing but there are some interesting things to note.
60+
The [Etrog DAC integration contract](https://github.com/0xPolygonHermez/zkevm-contracts/blob/v8.0.0-rc.3-fork.12/contracts/v2/consensus/validium/PolygonValidiumEtrog.sol) is still work-in-progress at the time of writing but there are some interesting things to note.
6061
6162
1. It implements the function [`verifyMessage` function](https://github.com/0xPolygonHermez/zkevm-contracts/blob/54f58c8b64806429bc4d5c52248f29cf80ba401c/contracts/v2/consensus/validium/PolygonValidiumEtrog.sol#L231):
6263
@@ -91,13 +92,13 @@ This section shows you how to create a custom CDK validium DAC contract.
9192
9293
This section shows you how to deploy the Docker image containing your custom DAC contract.
9394
94-
1. Edit the following parameters in the [`docker/scripts/v2/deploy_parameters_docker.json`](https://github.com/0xPolygonHermez/zkevm-contracts/blob/v6.0.0-rc.1-fork.9/docker/scripts/v2/deploy_parameters_docker.json) file:
95+
1. Edit the following parameters in the [`docker/scripts/v2/deploy_parameters_docker.json`](https://github.com/0xPolygonHermez/zkevm-contracts/blob/v8.0.0-rc.3-fork.12/docker/scripts/v2/deploy_parameters_docker.json) file:
9596
9697
```json
9798
"minDelayTimelock": 3600, // BECOMES "minDelayTimelock": 1,
9899
```
99100
100-
2. Edit the following parameters in the [`/docker/scripts/v2/create_rollup_parameters_docker.json`](https://github.com/0xPolygonHermez/zkevm-contracts/blob/v6.0.0-rc.1-fork.9/docker/scripts/v2/create_rollup_parameters_docker.json) file:
101+
2. Edit the following parameters in the [`/docker/scripts/v2/create_rollup_parameters_docker.json`](https://github.com/0xPolygonHermez/zkevm-contracts/blob/v8.0.0-rc.3-fork.12/docker/scripts/v2/create_rollup_parameters_docker.json) file:
101102
102103
```json
103104
"consensusContract": "PolygonValidiumEtrog", // CHANGE THIS TO YOUR CONTRACT NAME
@@ -110,7 +111,7 @@ This section shows you how to deploy the Docker image containing your custom DAC
110111
cp docker/scripts/v2/hardhat.example.paris hardhat.config.ts
111112
```
112113
113-
4. Edit [docker/scripts/v2/deploy-docker.sh](https://github.com/0xPolygonHermez/zkevm-contracts/blob/v6.0.0-rc.1-fork.9/docker/scripts/v2/deploy-docker.sh) to add the following line:
114+
4. Edit [docker/scripts/v2/deploy-docker.sh](https://github.com/0xPolygonHermez/zkevm-contracts/blob/v8.0.0-rc.3-fork.12/docker/scripts/v2/deploy-docker.sh) to add the following line:
114115
115116
```sh
116117
sudo chmod -R go+rxw docker/gethData before docker build -t hermeznetwork/geth-zkevm-contracts -f docker/Dockerfile .

mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ nav:
7373
- Fork id 7 to 9: cdk/how-to/migrate/forkid-7-to-9.md
7474
- General guide for partners: cdk/how-to/migrate/fork.md
7575
- Create custom native token: cdk/how-to/use-native-token.md
76-
- Integrate a DAC: cdk/how-to/integrate-da.md
76+
- Integrate DA Layer: cdk/how-to/integrate-da.md
7777
- Manage allowlists with policies: cdk/how-to/manage-policies.md
7878
- Quickly test a running stack: cdk/how-to/quick-test-stack.md
7979
- Connect to CDK testnets: cdk/how-to/connect-testnet.md

0 commit comments

Comments
 (0)