Support multiple balance formats in targetContractsBalances#580
Conversation
|
@0xZRA provided some feedback. Lmk if you have any questions. I'll run the CI when you make those changes and I can investigate if/why the tests are failing. |
|
Hey @0xZRA, will provide some more feedback soon. Sorry for the delay. |
|
Hey @0xZRA okay so I think we need to change our approach. Tbh I didn't expect Doing it this way will remove any requirement for I would like to take it one more step than what is mentioned in the stack overflow post. I would like to be able to unmarshal any three of these string possibilities:
Let me know if you have any questions. Also, about the failing tests: We have some challenging unit tests that sometimes takes medusa a while to solve. That's why sometimes the tests may fail to run. Usually, re-running it does the trick but I do need to investigate why it is happening more frequently nowadays. |
@anishnaik I appreciate your response and I think it makes sense so far. Just wanted to clarify one point in your approach regarding the unmarshalling of the 3 string possibilities. Does the proposed approach still involve maintaining the current hexadecimal notation for setting initial balances, while adding the option to use base-10 strings, including scientific notation? So if we take it straight to the docs, the new version will look like:
|
|
Technically, you can also mix and match: Like the Also, for This PR became more complicated than I expected :) |
I hadn't thought of mix and match, you're right. I'll take a shot at it. |
|
This is still WIP, as I haven't tested the actual runs with different balance formats. @anishnaik let me know if I captured the requirements correctly |
|
@anishnaik I hope I addressed all issues except these 2: |
anishnaik
left a comment
There was a problem hiding this comment.
Okay one more round of final nitpicks and review :)
No problem, will do |
|
@anishnaik Thank you for your comments, I hope I addressed latest round of feedback. |
|
Hey @0xZRA looks great! Can you run |
|
@anishnaik just pushed the change after running |
|
@0xZRA, it seems like |
|
Another linter is complaining about this line in You can change it to and that should be sufficient. |
|
@0xZRA, I think there was a misunderstanding on my part around |
I feel like all these things could be caught and understood by me better before pushing to origin ;( Thanks for your patience |
|
@anishnaik I'm able to reproduce the test(s) failure locally but I'm not sure why sequence of |
|
Hey @0xZRA, honestly that specific test has been failing more frequently these days, I am unsure why. But luckily doesn't have anything to do with this PR. Going to merge now, thank you so much for the help and great job! |
|
@anishnaik Thanks for your guidance and opportunity to help! |
This is to address issue #306
Relies on running
go generatecommand to automatically generate code generate JSON marshaling code from template forFuzzingConfig@anishnaik
I'm running into an issue where tests are failing locally on my machine, even on the
masterbranch. I wanted to flag this early - I'm using Sequoia version 15.1.1, so it's unclear if my changes are implemented correctly.go test -v ./fuzzingAt the same time, when running following tests individually thru VSCode, both are passing: