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

[EVM] Add EVM type ID #5091

Merged
merged 14 commits into from
Jan 22, 2024
Merged

[EVM] Add EVM type ID #5091

merged 14 commits into from
Jan 22, 2024

Conversation

sideninja
Copy link
Member

@sideninja sideninja commented Nov 30, 2023

Closes: #5232

This PR adds a new type ID for EVM which can be used in events.

evm.BlockExecuted and evm.TransactionExecuted

@sideninja sideninja self-assigned this Nov 30, 2023
@sideninja sideninja changed the base branch from master to gregor/evm/cadence-event November 30, 2023 16:11
Base automatically changed from gregor/evm/cadence-event to master December 4, 2023 13:16
@sideninja sideninja marked this pull request as ready for review January 11, 2024 14:50
Copy link
Member

@turbolent turbolent left a comment

Choose a reason for hiding this comment

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

Nice!

})
}

func init() {
Copy link
Member Author

Choose a reason for hiding this comment

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

I don't like using init but not sure if there's a better way of doing this without exporting types.

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like these are usually in init... Not sure if there is another way.

})
}

func init() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like these are usually in init... Not sure if there is another way.

fvm/fvm_test.go Outdated Show resolved Hide resolved
func init() {
common.RegisterTypeIDDecoder(
evmLocationPrefix,
func(_ common.MemoryGauge, typeID string) (common.Location, string, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need a test for this part specifically?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is covered in the test I wrote, however edge cases with errors are not.

@codecov-commenter
Copy link

codecov-commenter commented Jan 12, 2024

Codecov Report

Attention: 69 lines in your changes are missing coverage. Please review.

Comparison is base (6c6a7f6) 69.95% compared to head (f062c46) 56.26%.

Files Patch % Lines
fvm/evm/types/events.go 4.16% 68 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #5091       +/-   ##
===========================================
- Coverage   69.95%   56.26%   -13.69%     
===========================================
  Files          19      987      +968     
  Lines        1115    94142    +93027     
===========================================
+ Hits          780    52970    +52190     
- Misses        311    37223    +36912     
- Partials       24     3949     +3925     
Flag Coverage Δ
unittests 56.26% <4.16%> (-13.69%) ⬇️

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.

@sideninja sideninja added this pull request to the merge queue Jan 22, 2024
Merged via the queue into master with commit 420e295 Jan 22, 2024
51 checks passed
@sideninja sideninja deleted the gregor/evm/event-encoding branch January 22, 2024 09:49
This pull request was closed.
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 EVM event type
4 participants