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

Throw before if compiled bytecode empty instead of later in creation bytecode #1022

Merged
merged 2 commits into from
May 9, 2023

Conversation

kuzdogan
Copy link
Member

@kuzdogan kuzdogan commented May 9, 2023

I was looking at some other contracts and noticed that for abstract contracts the compiler returns empty bytecode.

I believe we should immediately throw if the user is trying to verify an abstract contract or for some reason, the compiler returns an empty bytecode.

View in Huly HI-718

Copy link
Member

@marcocastignoli marcocastignoli left a comment

Choose a reason for hiding this comment

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

from my pov is ok, but is better to thow or setting a null status to the match?

As the function can be used as standalone, we should not remove the
check from the function itself.

Keep both this and throwing before trying to match.
@codecov-commenter
Copy link

Codecov Report

Patch coverage has no change and project coverage change: +0.03 🎉

Comparison is base (dceda9f) 73.79% compared to head (71acbeb) 73.83%.

Additional details and impacted files
@@             Coverage Diff             @@
##           staging    #1022      +/-   ##
===========================================
+ Coverage    73.79%   73.83%   +0.03%     
===========================================
  Files           40       40              
  Lines         2267     2270       +3     
  Branches       429      431       +2     
===========================================
+ Hits          1673     1676       +3     
  Misses         368      368              
  Partials       226      226              
Flag Coverage Δ
lib-sourcify 66.82% <ø> (-0.13%) ⬇️
server 77.79% <ø> (+0.13%) ⬆️

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

see 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@marcocastignoli marcocastignoli merged commit 765215b into staging May 9, 2023
@kuzdogan kuzdogan deleted the throw-empty-recompiled-bytecode branch May 10, 2023 14:31
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.

3 participants