You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2.Create a branch off `develop` in the [zkevm-contracts](https://github.com/0xPolygonHermez/zkevm-contracts) repo and `cd` into it.
14
+
2.`cd` into `zkevm-contracts`and checkout tag `v6.0.0-rc.1-fork.9`.
15
15
16
16
3. Run `npm i` from the root.
17
17
18
-
4.Go to the [`contracts/v2/consensus/validium`](https://github.com/0xPolygonHermez/zkevm-contracts/tree/develop/contracts/v2/consensus/validium) directory.
18
+
4.`cd` to the `contracts/v2/consensus/validium` directory.
19
19
20
20
!!! tip
21
21
- Until further notice, these contracts run on the [etrog release](https://polygon.technology/blog/polygon-zkevm-the-etrog-upgrade-is-live-on-mainnet).
22
22
23
-
5. Create your custom contract in the same directory, and make sure it implements the [IDataAvailabilityProtocol](https://github.com/0xPolygonHermez/zkevm-contracts/blob/develop/contracts/v2/interfaces/IDataAvailabilityProtocol.sol) interface.
23
+
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.
24
24
25
25
!!! tip
26
-
- Use the Polygon DAC implementation contract: [PolygonDataCommittee.sol](https://github.com/0xPolygonHermez/zkevm-contracts/blob/develop/contracts/v2/consensus/validium/PolygonDataCommittee.sol) as a guide.
26
+
- 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.
27
27
- The contract supports custom smart contract implementation and, through this, DACs can add their custom on-chain verification logic.
28
28
29
-
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/develop/contracts/v2/consensus/validium/PolygonDataCommittee.sol) implementation.
29
+
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.
@@ -42,7 +42,7 @@ This section shows you how to create a custom CDK validium DAC contract.
42
42
}
43
43
```
44
44
45
-
7. Update the [/deployment/v2/4_createRollup.ts](https://github.com/0xPolygonHermez/zkevm-contracts/blob/54f58c8b64806429bc4d5c52248f29cf80ba401c/deployment/v2/4_createRollup.ts#L77) script to add your protocol name.
45
+
7. Update the [/deployment/v2/4_createRollup.ts](https://github.com/0xPolygonHermez/zkevm-contracts/blob/54f58c8b64806429bc4d5c52248f29cf80ba401c/deployment/v2/4_createRollup.ts#L77) script to add your contract name.
@@ -52,9 +52,9 @@ This section shows you how to create a custom CDK validium DAC contract.
52
52
53
53
!!! info "`PolygonValidiumEtrog.sol` solution"
54
54
55
-
The [Etrog DAC integration contract](https://github.com/0xPolygonHermez/zkevm-contracts/blob/feature/etrog/contracts/v2/consensus/validium/PolygonValidiumEtrog.sol) is still work-in-progress at the time of writing but there are some interesting things to note.
55
+
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.
56
56
57
-
1. It implements the function `verifyMessage` function. Check [lines 215-220](https://github.com/0xPolygonHermez/zkevm-contracts/blob/b2a62e6af5738366e7494e8312184b1d6fdf287c/contracts/v2/consensus/validium/PolygonValidiumEtrog.sol#L215C1-L220C15):
57
+
1. It implements the function [`verifyMessage` function](https://github.com/0xPolygonHermez/zkevm-contracts/blob/54f58c8b64806429bc4d5c52248f29cf80ba401c/contracts/v2/consensus/validium/PolygonValidiumEtrog.sol#L231):
58
58
59
59
```solidity
60
60
// Validate that the data availability protocol accepts the dataAvailabilityMessage
@@ -67,7 +67,7 @@ This section shows you how to create a custom CDK validium DAC contract.
67
67
68
68
where `accumulatedNonForcedTransactionsHash` is used for verification against the protocol and `dataAvailabilityMessage` is a byte array containing the signature and addresses of the committee in ascending order.
69
69
70
-
2. It also implements a function to set the data availability protocol. Check [lines 250-260](https://github.com/0xPolygonHermez/zkevm-contracts/blob/b2a62e6af5738366e7494e8312184b1d6fdf287c/contracts/v2/consensus/validium/PolygonValidiumEtrog.sol#L250C1-L260C6) to see how they do this.
70
+
2. It also implements a function to set the data availability protocol at [line 287](https://github.com/0xPolygonHermez/zkevm-contracts/blob/54f58c8b64806429bc4d5c52248f29cf80ba401c/contracts/v2/consensus/validium/PolygonValidiumEtrog.sol#L287) to see how they do this.
71
71
72
72
```solidity
73
73
/**
@@ -87,13 +87,13 @@ This section shows you how to create a custom CDK validium DAC contract.
87
87
88
88
This section shows you how to deploy the Docker image containing your custom DAC contract.
89
89
90
-
1. Edit the following parameters in the [`docker/scripts/v2/deploy_parameters_docker.json`](https://github.com/0xPolygonHermez/zkevm-contracts/blob/develop/docker/scripts/v2/create_rollup_parameters_docker.json) file:
90
+
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:
2. Edit the following parameters in the [`/docker/scripts/v2/create_rollup_parameters_docker.json`](https://github.com/0xPolygonHermez/zkevm-contracts/blob/develop/docker/scripts/v2/create_rollup_parameters_docker.json) file:
96
+
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:
97
97
98
98
```json
99
99
"consensusContract": "PolygonValidiumEtrog", # CHANGE THIS TO YOUR CONTRACT NAME
@@ -106,13 +106,13 @@ This section shows you how to deploy the Docker image containing your custom DAC
4. Edit [docker/scripts/v2/deploy-docker.sh](https://github.com/0xPolygonHermez/zkevm-contracts/blob/develop/docker/scripts/v2/deploy-docker.sh) to add the following line:
109
+
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:
5. In the [deployment/v2/4_createRollup.ts](https://github.com/0xPolygonHermez/zkevm-contracts/blob/develop/deployment/v2/4_createRollup.ts) file, uncomment the following lines, and add a `console.log` output that grabs the address of the DAC:
115
+
5. In the [deployment/v2/4_createRollup.ts](https://github.com/0xPolygonHermez/zkevm-contracts/blob/54f58c8b64806429bc4d5c52248f29cf80ba401c/deployment/v2/4_createRollup.ts#L290) file, uncomment the 290-291, and add a `console.log` output that grabs the address of the DAC:
0 commit comments