-
Notifications
You must be signed in to change notification settings - Fork 0
Implement UCEF version of the xERC20 token #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…y module script to make usage of create2 strategy possible
There was a problem hiding this 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.
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:
deploy:modulescript and define the salt used in an environment variable, to allow for repeatable contract addresses across chains.call: issueeth_callrequests through Hardhat, making it possible to issue authenticated SD calls from the command linexerc20:set-limits: send a transaction to set minting/burning limits on an XERC20 token