-
Notifications
You must be signed in to change notification settings - Fork 75
feat: Support Circle bridged & native USDC on zkSync #941
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
Conversation
nicholaspai
left a comment
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.
One Q
* improve: support upgradeable USDC in zkstack adapters Signed-off-by: bennett <bennett@umaproject.org> * update deploy scripts Signed-off-by: bennett <bennett@umaproject.org> * conform to CCTPAdapterInterface Signed-off-by: bennett <bennett@umaproject.org> --------- Signed-off-by: bennett <bennett@umaproject.org>
Co-authored-by: Matt Rice <matthewcrice32@gmail.com>
Co-authored-by: Matt Rice <matthewcrice32@gmail.com>
…ntracts into pxrl/lensUSDC
mrice32
left a comment
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.
LGTM!
pxrl
left a comment
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.
I can't approve because I authored the PR, but this LGTM.
Lens uses Circle's Bridged (upgradable) USDC standard and requires a custom bridge for it. On mainnet, the chain adapter contract needs a modified workflow to make deposits. On the L2 it's as simple as depositing via a different contract address, albeit with the same contract interface as the standard ERC20 bridge.
As part of this change, both ends are updated for eventual CCTP compatibility. This introduces some configuration nuance to the constructor arguments of both contracts:
usdcAddress = 0x0=> USDC tokens are routed via the standard ERC20 bridge (current required for zkSync USDC.e).usdcAddress != 0x0ANDcctpTokenMessenger != 0x0=> USDC tokens are routed via Circle's CCTP bridges.usdcAddress != 0x0ANDzkUSDCBridge != 0x0=> USDC tokens are routed via the custom bridge for Circle Bridged (upgradable) USDC.A simple check on the various constructor arguments imposed during deployment, but it's highly recommended to manually verify the configurations post-deployment.
Implementation according to the Matter Labs guidance at https://github.com/matter-labs/usdc-bridge
This is immediately for Lens but is generalised to apply to any zkSync-stack deployment.