Skip to content

Conversation

zzhang-circle
Copy link
Contributor

@zzhang-circle zzhang-circle commented Jun 20, 2025

Add fee switch functionality for CCTP V2 slow burns

ams9198 and others added 7 commits January 24, 2025 08:46
… CREATE2 more effectively (circlefin#60)

### Summary 

Follow-up to:
circlefin/evm-cctp-contracts-private@8cf3673,
this correct an oversight where the TokenMinterV2 via Create2 was being
passed the tokenController as a constructor arg. Since this affects the
bytecode, it affects the address.

### Testing

The tests actually already assert that the tokenController is rotated
correctly; it's done atomically in both ways, only this way ensures a
consistent address.

Edit: added a test to ensure that the script is deploying via CREATE2 in
an expected way.
This PR adds the abis for V2 related contracts.

Excluded contracts include:
 - Example contracts (CCTPHookWrapper)
 - Empty abis (BurnMessageV2, MessageV2)

---------

Co-authored-by: Michael Grant <mgrant@circle.com>
- Add `minFee` variable to store the minimum fee (in 1/1,000th basis
points) for all transfers and enforcement logic.
 - Add `minFeeController` role for managing `minFee`.
 - Add getter and setter for new variable.
 - Add getter and setter for new role.
 - Add and update relevant tests.
 - Update deployment scripts and tests.

Audit scope:
https://docs.google.com/document/d/129HaTPi1MojGf8zd8v657zkctSmFD87wjTf9naQVfkA/edit?tab=t.0
Added a unit test to verify contract state when upgrading
TokenMessengerV2 for the `minFee` changes.
…in#71)

## Summary
Added the new ABIs for CCTP V2 with standard fee switch
circlefin/evm-cctp-contracts-private@2f9a2ba

## Detail
- pulled ABIs from bakery container image ( i.e. curl
http://localhost:${ABI_PORT}/abi/cctp-v2/TokenMessengerV2 >
v2.1/TokenMessengerV2.json )
- added the new ABIs for CCTP V2 with standard fee switch to folder v2.1

## Testing
Verified that only ABI of BaseTokenMessengerV2 and TokenMessengerV2 are
different from V2.

---

**CCTPE-1860:** <https://circlepay.atlassian.net/browse/CCTPE-1860>
@zzhang-circle zzhang-circle marked this pull request as ready for review June 20, 2025 17:19
@walkerq walkerq merged commit 4dce37b into circlefin:master Jun 24, 2025
6 checks passed
zzhang-circle added a commit to zzhang-circle/evm-cctp-contracts that referenced this pull request Jun 24, 2025
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.

5 participants