The cdk-validium-contracts repository contains the smart contract implementations designed for use with CDK chains configured with Validium.
For a full overview of the Polygon CDK Validium, please reference the CDK documentation.
The CDK Validium solution is made up of several components; start with the CDK Validium Node. For quick reference, the complete list of components are outlined below:
Component | Description |
---|---|
CDK Validium Node | Node implementation for the CDK networks in Validium mode |
CDK Validium Contracts | Smart contract implementation for the CDK networks in Validium mode |
CDK Data Availability | Data availability implementation for the CDK networks |
Prover / Executor | zkEVM engine and prover implementation |
Bridge Service | Bridge service implementation for CDK networks |
Bridge UI | UI for the CDK networks bridge |
The private keys and mnemonics included in this repository are intended solely for internal testing. Do not use them in production environments.
- Node.js version: 16.x
- npm version: 7.x
contracts
: Core contractsPolygonZkEVMBridge.sol
: Facilitates asset transfers between chainsPolygonZkEVMGlobalExitRoot.sol
: Manages the global exit root on L1PolygonZkEVMGlobalExitRootL2.sol
: Manages the global exit root on L2
CDKValidium.sol
: Consensus algorithm for Validium CDK chains
docs
: Specifications and useful resourcestest
: Contract test suites
To activate the GitHub hook, run the following command:
git config --local core.hooksPath .githooks/
npm i
Execute the test suite with:
npm run test
To check for linting errors, run:
npm run lint
To automatically fix linting errors, run:
npm run lint:fix
To build the Docker image, run:
npm run docker:contracts
This will create a new Docker image named near/geth-cdk-validium-contracts
, which includes a Geth node with the deployed contracts. The deployment output can be found at docker/deploymentOutput/deploy_output.json
.
To run the Docker container, use:
docker run -p 8545:8545 hermeznetwork/geth-cdk-validium-contracts
For testing purposes, the following private keys are being used. These keys are not intended for production use:
- Private key: 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
- Address: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
- Private key: 0xdfd01798f92667dbf91df722434e8fbe96af0211d4d1b82bbbbc8f1def7a814f
- Address: 0xc949254d682d8c9ad5682521675b8f43b102aec4
The cdk-validium-contracts project is licensed under the GNU Affero General Public License free software license.