-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
op-chain-ops/ecotone-scalar: prefer .FillBytes()
to .Bytes()
and copy
#13472
Conversation
The latter can result in an error if the number is less than 32 bytes in length (it gets padded incorrectly).
.FillBytes()
to .Bytes()
and copy
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #13472 +/- ##
===========================================
- Coverage 47.59% 43.02% -4.58%
===========================================
Files 943 775 -168
Lines 78827 69304 -9523
Branches 803 0 -803
===========================================
- Hits 37515 29815 -7700
+ Misses 38509 36955 -1554
+ Partials 2803 2534 -269
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the tool supposed to support pre-Ecotone scalar encodings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving, assuming that you'll still add that op mainnet test cast.
…`copy` (#13472) * prefer .FillBytes() to .Bytes() and copy The latter can result in an error if the number is less than 32 bytes in length (it gets padded incorrectly). * add tests * output to JSON * add test case for OPM * tidy up * use const in test
The latter can result in an error if
scalar
is less than 32 bytes in length (it gets padded incorrectly). A common value in use in the wild isscalar=684000
-- I've added a test case for this which fails with the existing implementation but passed with the fix.After this is approved, we should cherry pick it on to #13412.
TODO