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

Use EVMLocation type from flow-go-sdk #5447

Merged

Conversation

m-Peter
Copy link
Collaborator

@m-Peter m-Peter commented Feb 23, 2024

Follow up work from: onflow/flow-go-sdk#583

We remove entirely the EVMLocation type from the github.com/onflow/flow-go/fvm/evm/types package, in favor of the type provided from flow-go-sdk.

The TypeIDDecoder is also registered from flow-go-sdk, to make sure that Flow EVM events can always be CCF encoded/decoded, regardless of the combination of tooling used.

We remove entirely the EVMLocation type from the evm types package,
in favor of the type provided from flow-go-sdk.
The TypeIDDecoder is also registered from flow-go-sdk, to make sure
that Flow EVM events can always be CCF encoded/decoded.
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.

Thank you. I think this is a good solution, but architecturally speaking I don't like the approach on relying on Go-SDK for flow-go EVM to function correctly. I know this was not your decission and it is fine for now, but going forward if we decide to keep this event types, I'm not sure about it, here's why. What happens if someone else uses a different API client (js/java etc), we have the same issue I believe. I feel like if Cadence relies on this type registration to exists it shouldn't be up to the clients to register it. cc @turbolent

@turbolent
Copy link
Member

turbolent commented Feb 23, 2024

@m-Peter I released https://github.com/onflow/flow-go-sdk/releases/tag/v1.0.0-M6 which includes onflow/flow-go-sdk#583. Can you please update to that version?

Also, from what it looks like (CI) there are still some cases where flow-go's EVMLocation are used, which need to be replaced with SDK's EVMLocation.

@sideninja Agreed, Ardit and I had discussed this before, see https://discord.com/channels/613813861610684416/1108479699732152503/1207750237741916180.

Given the current dependency chain, flow-go depending on flow-go-sdk, flow-go-sdk is the lowest where we can add this functionality, without having Cadence be made aware of EVM functionality. We can maybe revisit this in the future.

@m-Peter
Copy link
Collaborator Author

m-Peter commented Feb 23, 2024

@turbolent Updated in 4a1762b and fixed the failing test as well 🙏

@codecov-commenter
Copy link

codecov-commenter commented Feb 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 57.48%. Comparing base (46d7563) to head (d51e871).
Report is 8 commits behind head on feature/stable-cadence.

Additional details and impacted files
@@                    Coverage Diff                     @@
##           feature/stable-cadence    #5447      +/-   ##
==========================================================
+ Coverage                   56.37%   57.48%   +1.11%     
==========================================================
  Files                        1030      782     -248     
  Lines                      100057    78950   -21107     
==========================================================
- Hits                        56403    45382   -11021     
+ Misses                      39394    29990    -9404     
+ Partials                     4260     3578     -682     
Flag Coverage Δ
unittests 57.48% <100.00%> (+1.11%) ⬆️

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.

@turbolent turbolent merged commit b4c7802 into onflow:feature/stable-cadence Feb 23, 2024
50 of 51 checks passed
@m-Peter m-Peter deleted the use-flow-go-sdk-evm-location branch March 20, 2024 07:50
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.

4 participants