Skip to content
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

Add custom mapping #246

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

Conversation

pyk
Copy link

@pyk pyk commented Apr 18, 2024

Summary

  • Add new role bridgeManager in PolygonZkEVMBridgeV2
  • bridgeManager can map bridged token to existing token in the current chain (e.g. Lx USDCx mapped to existing Ly USDCy)
  • User can bridge and wirthdraw mapped token

Behaviour

Case 1: default wrapper

A -> Lx token
DW_A -> Default wrapped token deployed by the bridge in Ly

Ly.bridgeAsset is executed using DW_A directly hence TokenWrapped(DW_A).burn(msg.sender, amount);

Case 2: custom wrapper

A -> Lx token
CT_A -> Custom wrapper in Ly
A_y -> Existing token in Ly

Ly.bridgeAsset is executed using A_y as input hence need to call TokenWrapped(CT_A).burn(msg.sender, amount);

@cla-bot cla-bot bot added the cla-signed label Apr 18, 2024
@pyk pyk marked this pull request as draft April 18, 2024 20:29
Copy link

sonarcloud bot commented Apr 24, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@pyk pyk marked this pull request as ready for review April 24, 2024 07:24
@pyk
Copy link
Author

pyk commented Apr 24, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant