GithubHelp home page GithubHelp logo

rohanshrothrium / cdk-validium-contracts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 0xpolygon/cdk-validium-contracts

0.0 0.0 0.0 3.62 MB

License: Other

Shell 0.47% JavaScript 59.24% Solidity 40.30%

cdk-validium-contracts's Introduction

Polygon CDK Validium Contracts

Core Contracts for the Polygon CDK Validium

The cdk-validium-contracts repository contains the smart contract implementations designed for use with CDK chains configured with Validium.

Overview of 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

Important Note

The private keys and mnemonics included in this repository are intended solely for internal testing. Do not use them in production environments.

Prerequisites

  • Node.js version: 16.x
  • npm version: 7.x

Repository Structure

  • contracts: Core contracts
    • PolygonZkEVMBridge.sol: Facilitates asset transfers between chains
      • PolygonZkEVMGlobalExitRoot.sol: Manages the global exit root on L1
      • PolygonZkEVMGlobalExitRootL2.sol: Manages the global exit root on L2
    • CDKValidium.sol: Consensus algorithm for Validium CDK chains
  • docs: Specifications and useful resources
  • test: Contract test suites

Activate Github Hook

To activate the GitHub hook, run the following command:

git config --local core.hooksPath .githooks/

Install

npm i

Run Tests

Execute the test suite with:

npm run test

Linting

To check for linting errors, run:

npm run lint

To automatically fix linting errors, run:

npm run lint:fix

Build Docker Image

To build the Docker image, run:

npm run docker:contracts

This will create a new Docker image named hermeznetwork/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

Note

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

License

The cdk-validium-contracts project is licensed under the GNU Affero General Public License free software license.

cdk-validium-contracts's People

Contributors

arnaubennassar avatar eduadiez avatar gianfrancobazzani avatar ignasirv avatar invocamanman avatar krlosmata avatar laisolizq avatar omahs avatar salmad3 avatar tclemos avatar zkronos73 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.