Skip to content

Conversation

@gabspeck
Copy link

@gabspeck gabspeck commented Oct 29, 2025

This adds a UCEF version of the xERC20 token, AKA ERC-7281.

The lockbox and factory contracts were not ported since they are not relevant to our goals with SIlent Data at this moment.

Drive-by changes:

  • Change the version of the Silent Data dependencies to their current public ones
  • Add the ability to select the "create2" strategy when deploying Ignition modules from the deploy:module script and define the salt used in an environment variable, to allow for repeatable contract addresses across chains.
  • Change the _authorizeBalance declaration in the abstract UCEF.sol to not contain a function body and force inheriting contracts to implement it.
  • Create Hardhat tasks:
    • call: issue eth_call requests through Hardhat, making it possible to issue authenticated SD calls from the command line
    • xerc20:set-limits: send a transaction to set minting/burning limits on an XERC20 token

@gabspeck gabspeck marked this pull request as ready for review October 31, 2025 10:26
@gabspeck gabspeck requested a review from Copilot October 31, 2025 10:26
Copy link

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 implements a UCEF-compatible version of the xERC20 token standard (ERC-7281), which enables cross-chain token bridging with rate-limited minting and burning capabilities. The implementation allows bridges to mint and burn tokens within configurable limits that refill over time, while supporting a lockbox mechanism for unlimited operations.

Key changes:

  • Adds XUCEF contract combining UCEF privacy features with xERC20 bridging mechanics
  • Implements rate-limited minting/burning with linear limit replenishment over 24 hours
  • Adds support for CREATE2 deployment strategy with configurable salt for deterministic cross-chain addresses

Reviewed Changes

Copilot reviewed 9 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
contracts/token/XUCEF.sol Core xERC20 implementation with UCEF privacy extensions and bridge limit management
contracts/token/UCEF.sol Changes _authorizeBalance to abstract method requiring implementation by inheriting contracts
test/token/XUCEF.test.ts Comprehensive test suite covering deployment, limits, minting, burning, permits, and UCEF privacy behavior
ignition/modules/XUCEF.ts Hardhat Ignition deployment module for XUCEF token
ignition/parameters/XUCEF.json.example Example configuration parameters for XUCEF deployment
package.json Updates dependencies and adds xerc20 library; modifies deploy:module script to support CREATE2 strategy
hardhat.config.ts Adds Ignition configuration for CREATE2 deployment with environment-based salt
pnpm-workspace.yaml Configures native dependencies for workspace
.env.example Adds CREATE2_SALT environment variable
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. 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.

2 participants