Skip to content

fix[lang]: extend as_wei_value to all numeric types#3498

Merged
charles-cooper merged 14 commits intovyperlang:masterfrom
trocher:fix/as_wei_value
Mar 18, 2025
Merged

fix[lang]: extend as_wei_value to all numeric types#3498
charles-cooper merged 14 commits intovyperlang:masterfrom
trocher:fix/as_wei_value

Conversation

@trocher
Copy link
Copy Markdown
Contributor

@trocher trocher commented Jul 15, 2023

What I did

Fixed #3281

How I did it

Added the required IR for all signed and unsigned types.

How to verify it

See the tests.

Commit message

previously, `as_wei_value()` panicked when provided a numeric type
besides `uint256`, `uint8`, `int128` and `decimal`. this commit extends
the codegen to cover all remaining numeric types.

Description for the changelog

implement as_wei_value for all numeric type

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jul 15, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.27%. Comparing base (64717bd) to head (c3e84d2).
Report is 81 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3498   +/-   ##
=======================================
  Coverage   92.26%   92.27%           
=======================================
  Files         123      123           
  Lines       17505    17520   +15     
  Branches     2961     2961           
=======================================
+ Hits        16151    16166   +15     
  Misses        946      946           
  Partials      408      408           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@charles-cooper
Copy link
Copy Markdown
Member

@trocher i merged in master and simplified the code

paging @cyberthirst for review

@charles-cooper charles-cooper added this to the v0.4.2 milestone Dec 30, 2024
@charles-cooper charles-cooper added the release - must release blocker label Mar 17, 2025
@charles-cooper charles-cooper changed the title fix: implement as_wei_value for all numeric type fix[lang]: extend as_wei_value to all numeric types Mar 17, 2025
@charles-cooper charles-cooper enabled auto-merge (squash) March 18, 2025 15:55
@charles-cooper charles-cooper merged commit 94cf162 into vyperlang:master Mar 18, 2025
159 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release - must release blocker

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CompilerPanic if as_wei_value is passed a numeric type other than uint256, uint8, int128, decimal

4 participants