Skip to content

Conversation

Ansonhkg
Copy link
Collaborator

@Ansonhkg Ansonhkg commented Sep 23, 2025

WHAT

This is a migration from this repo/branch https://github.com/LIT-Protocol/lit-contracts/tree/rc-naga-1.0.0 into this monorepo and wires it into Nx.

In this package the build step is just a publish: it expects you’ve already run sync to refresh the version-controlled ./dist, then copies that prebuilt tree into dist/packages/contracts/dist. We leave the sync out of the automated build pipeline because it needs GitHub credentials for private repos, and we don’t want missing env vars to block contributors who don’t have that access.

❗️ Note: this PR includes a changeset, so when it lands on main it will open the release PR, and when we merge to release PR it will publish version 0.5.2.

Getting started

Syncing contract artifacts

Put these env vars into your project root .env

DEV_BRANCH=develop 
GH_API_KEY=github_pat_xxx

Then, run the following command:

bun run sync:contracts

or

nx run contracts:sync

Note that we don't need to use the bun command after the PNPM migration PR is merged.

To build

nx run contracts:build

In this package the build step is just a publish: it assumes you already ran sync to refresh the version-controlled ./dist, then copies that prebuilt tree into dist/packages/contracts/dist.

Testing

Sync

image

Build

image

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR migrates the Lit Protocol contracts repository into the monorepo, integrating contract address and ABI synchronization functionality. The migration includes configuration for syncing with the external contracts repository and updates package dependencies to use the new workspace setup.

  • Adds a new contracts package with ABI/address syncing functionality
  • Updates package dependencies to use workspace references for the contracts package
  • Adds build exclusions and a new sync command for contract management

Reviewed Changes

Copilot reviewed 5 out of 104 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/contracts/README.md Adds documentation for contract syncing configuration and usage
packages/constants/package.json Adds contracts package dependency for workspace integration
packages/auth-services/package.json Updates contracts dependency to use workspace reference
package.json Removes external contracts dependency, adds sync command, and excludes contracts from build
README.md Documents the contract syncing process with required environment variables

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant