-
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] return empty string when deployed address is empty #5456
[Flow EVM] return empty string when deployed address is empty #5456
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5456 +/- ##
==========================================
+ Coverage 56.02% 57.47% +1.44%
==========================================
Files 1026 848 -178
Lines 99940 84400 -15540
==========================================
- Hits 55990 48507 -7483
+ Misses 39661 32112 -7549
+ Partials 4289 3781 -508
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
fvm/evm/types/address.go
Outdated
if fa == EmptyAddress { | ||
return "" | ||
} | ||
return hex.EncodeToString(fa[:]) |
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.
Should we maybe change this to:
return fa.ToCommon().Hex()
?
The difference being that the latter returns the check-summed variant, e.g.:
from: 99466ed2e37b892a2ee3e9cd55a98b68f5735db2
to: 0x99466ED2E37B892A2Ee3E9CD55a98b68f5735db2
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.
Note: I also made a change in #5416, which I guess is conflicting.
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.
good idea, I'll use your changes, but I think the issue is still the empty address, it would result in growth in all events.
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.
now that I'm looking into it, the checksum is a post-process only input-dependent, not sure if it makes sense to do it on-chain and not off-chain later?
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.
Yeah, the empty address should be omitted and simply return a ""
now that I'm looking into it, the checksum is a post-process only input-dependent, not sure if it makes sense to do it on-chain and not off-chain later?
That's true, I only mentioned to have it check-summed in the event payload, to showcase its validity. It is something that can be done off-chain as well though. It does not make a difference.
No description provided.