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 wflow handler #137

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

Add wflow handler #137

wants to merge 15 commits into from

Conversation

sisyphusSmiling
Copy link
Contributor

@sisyphusSmiling sisyphusSmiling commented Dec 6, 2024

Closes: #134

Description

  • Enables a path for FLOW to move between Cadence & EVM via the VM bridge. On the way to EVM, FLOW is wrapped as and deposited as WFLOW to the receiver. On the way to Cadence, the WFLOW is unwrapped and returned as @FlowToken.Vault.
  • Anyone who wishes to move FLOW as native FLOW can leverage the existing EVM interface supporting Cadence -> EVM via coa.deposit() and EVMAddress.deposit() and Cadence <- EVM via coa.withdraw()
  • This new behavior is updated from the current state which is that FLOW can be moved to EVM, but not from EVM. Adding to the fragmented UX, WFLOW is currently blocked from being bridged to Cadence as to not confuse things on the Cadence side with unnecessary representations of FLOW (which can already be treated like any other FungibleToken.Vault).
  • The new route means that platforms like Flow Port & Flow Wallet can add functionality enabling users to define whether they want to bridge FLOW from Cadence as native FLOW or WFLOW. Or alternatively, users might be able to bridge FLOW into Cadence from either their EVM FLOW or WFLOW balances, aggregating either into their Cadence FlowToken Vault.

For contributor use:

  • Targeted PR against main branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the standards mentioned here.
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

@codecov-commenter
Copy link

codecov-commenter commented Dec 6, 2024

Codecov Report

Attention: Patch coverage is 94.11765% with 4 lines in your changes missing coverage. Please review.

Project coverage is 87.42%. Comparing base (02aab3f) to head (215b6e1).
Report is 183 commits behind head on main.

Files with missing lines Patch % Lines
cadence/contracts/bridge/FlowEVMBridgeHandlers.cdc 91.83% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #137      +/-   ##
==========================================
+ Coverage   86.19%   87.42%   +1.22%     
==========================================
  Files          18       18              
  Lines         884     1010     +126     
==========================================
+ Hits          762      883     +121     
- Misses        122      127       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sisyphusSmiling sisyphusSmiling marked this pull request as ready for review December 17, 2024 02:16
@sisyphusSmiling sisyphusSmiling requested a review from a team as a code owner December 17, 2024 02:16
@sisyphusSmiling sisyphusSmiling requested a review from a team December 17, 2024 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Status: 👀 In Review
Development

Successfully merging this pull request may close these issues.

Route FlowToken requests to WFLOW
3 participants