Skip to content

Commit

Permalink
feat: generalize conversion rules
Browse files Browse the repository at this point in the history
This commit refactors and changes conversion semantics to be in line
with VIP 2507. The main changes from existing behavior are:

- fewer allowed conversions with address (eg. decimal/address unallowed)
- decimals are bitcasted with bytes
- fixes involving sign extension

By generalizing the conversion rules to not use hardcoded integer/bytes
types, this commit lays some groundwork for more integer/bytes types
since we will not have to add a case for every single type.

This commit is a first pass; the tests should be consolidated and
refactored before release, and some cases involving conversion to bytes
have not been added yet. Also, the logic should probably be cleaned up
so that it is easier to validate/reason about.
  • Loading branch information
charles-cooper committed Mar 18, 2022
1 parent 0ba250e commit 876b822
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 876b822

Please sign in to comment.