This contract aims to aid starknet users in migrating their USDC.e tokens into USDC without having to withdraw them on L1 themselves.
get_legacy_token() -> ContractAddress- Get theContractAddressof the legacy token.get_new_token() -> ContractAddress- Get theContractAddressof the new token.is_swap_to_legacy_allowed() -> bool- Check if exchanging new tokens for legacy tokens (reverse migration) is allowed.
swap_to_new(amount: u256)- Exchange legacy tokens for new ones (1:1 ratio).- Precondition: sufficient allowance for the legacy token.
swap_to_legacy(amount: u256)- Exchange new tokens for legacy ones (1:1 ratio).- Precondition: sufficient allowance for the new token.
- Cairo dependencies such as Scarb and Starknet foundry - install using starkup.
Reach out to the maintainer at any of the following:
- GitHub Discussions
- Contact options listed on this GitHub profile
Build the contracts from the repo root:
scarb --release buildTo run the tests, execute:
scarb testFind the latest audit report in docs/audit.
This repo follows good practices of security, but 100% security cannot be assured. This repo is provided "as is" without any warranty. Use at your own risk.
For more information and to report security issues, please refer to our security documentation.
