npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

tac-l2-ccl

v0.8.9

Published

TAC L2 cross chain layer contracts

Downloads

570

Readme

L2-EVM Project Documentation

Overview

The L2-EVM project is designed to function as an EVM-compatible Layer 2 (L2) solution, seamlessly integrating and executing decentralized applications (dApps) within a fully EVM-compatible infrastructure. This project bridges the gap between the primary TON network (Layer 1) and the Layer 2 EVM network, enabling efficient dApp execution with reduced gas fees and enhanced transaction throughput.

Project Structure

The project is structured into several key directories, each serving a specific purpose in the ecosystem:

contracts/

This directory houses all Solidity smart contracts that form the backbone of the project.

interfaces/

Contains interface contracts that define standardized functions, structures, errors, and events utilized across the project.

L2/

Contains core contracts for Layer 2 operations, including essential libraries and utility methods crucial for L2 functionality.

scripts/

Contains deployment, testing, and interaction scripts for development and management purposes.

tests/

Contains smart contracts unit tests.

Tests are executed within an isolated local Hardhat node environment.

config.js

Configuration file for project-wide settings and parameters.

Contracts Overview

CrossChainLayer.sol

The CrossChainLayer contract serves as the cornerstone of the TAC EVM-side infrastructure. It orchestrates message execution, facilitates communication with dApps via proxies, and manages cross-chain token operations. Key functionalities include:

  • Group Concensus: Implementation of group-based consensus mechanisms for Merkle root validation in cross-chain message processing.
  • Cross-Chain Message Execution: Processes inbound and outbound messages on the L2 network, validated by Merkle proofs.
  • dApp Integration: Handles callbacks and interactions with decentralized applications.
  • Token Deployment: Exclusive authority to deploy new CrossChainLayerToken contracts originating from L1.
  • Cross-Layer Deposits: Functions as a bridge, facilitating seamless deposits of L1 tokens into user L2

CrossChainLayerToken.sol

Serves as the foundational contract for all L2 tokens. Valid instances of this contract can only be created by the CrossChainLayer, ensuring controlled token deployment.

CrossChainLayerAccessControl.sol

Implements access control mechanisms, administered by the CrossChainLayer contract.

Events.sol

Specifies custom events emitted by contracts.

Structs.sol

Contains definitions for all custom data structures utilized across the contracts.

ConsensusV2.sol

Implements the logic for sequencer groups responsible for setting and validating Merkle roots for cross-chain message processing.

Settings.sol

Provides a centralized on-chain key-value storage for all security-critical EVM-side TAC settings, ensuring consistent configuration across the ecosystem.

Setup and Deployment

  1. Environment Setup:

    npm install
  2. Contract Compilation:

    npx hardhat compile
  3. Test Suite Execution: To run unit tests with a single command execute

    npx hardhat test