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

[Flow EVM] Adding FLOW token bridge event #5538

Merged
merged 9 commits into from
Mar 21, 2024

Conversation

ramtinms
Copy link
Contributor

closes: #5537

@codecov-commenter
Copy link

codecov-commenter commented Mar 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.64%. Comparing base (7af17df) to head (3f9a12c).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5538      +/-   ##
==========================================
+ Coverage   55.62%   55.64%   +0.02%     
==========================================
  Files        1037     1037              
  Lines      101338   101338              
==========================================
+ Hits        56369    56394      +25     
+ Misses      40630    40605      -25     
  Partials     4339     4339              
Flag Coverage Δ
unittests 55.64% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@ramtinms ramtinms marked this pull request as ready for review March 18, 2024 19:09
@ramtinms ramtinms requested a review from sideninja March 18, 2024 19:09
Copy link
Contributor

@sideninja sideninja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@@ -7,6 +7,18 @@ contract EVM {
access(all)
event CadenceOwnedAccountCreated(addressBytes: [UInt8; 20])

/// FLOWTokenDeposit is emitted when FLOW tokens is bridged
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we are using past tense for events. FLOWTokensDeposited.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update those to use past participle.

@@ -224,6 +238,7 @@ contract EVM {
from: self.addressBytes,
amount: balance.attoflow
) as! @FlowToken.Vault
emit FLOWTokenWithdraw(addressBytes: self.addressBytes, amount: balance.inFLOW())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not emit an event if the balance is 0. I think I would prefer the whole function just exiting early if the balance is 0.

same with deposit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added protection

@ramtinms ramtinms enabled auto-merge March 21, 2024 19:35
@ramtinms ramtinms added this pull request to the merge queue Mar 21, 2024
Merged via the queue into master with commit 02cdb60 Mar 21, 2024
55 checks passed
@ramtinms ramtinms deleted the ramtin/5537-add-flow-token-bridge-event branch March 21, 2024 23:23
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.

[Flow EVM] add flow token bridge events
4 participants