-
Notifications
You must be signed in to change notification settings - Fork 180
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Nice!
fvm/evm/stdlib/contract.cdc
Outdated
@@ -7,6 +7,18 @@ contract EVM { | |||
access(all) | |||
event CadenceOwnedAccountCreated(addressBytes: [UInt8; 20]) | |||
|
|||
/// FLOWTokenDeposit is emitted when FLOW tokens is bridged |
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 think we are using past tense for events. FLOWTokensDeposited
.
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.
Update those to use past participle.
fvm/evm/stdlib/contract.cdc
Outdated
@@ -224,6 +238,7 @@ contract EVM { | |||
from: self.addressBytes, | |||
amount: balance.attoflow | |||
) as! @FlowToken.Vault | |||
emit FLOWTokenWithdraw(addressBytes: self.addressBytes, amount: balance.inFLOW()) |
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 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.
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.
added protection
closes: #5537