-
Notifications
You must be signed in to change notification settings - Fork 27
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
Shallow clean-up of the solidity code #333
Conversation
@dtebbs there are some solidity variables that are seemingly unused. Could you double check this before we go further and consider removing them? (Are you using them somewhere I missed?) |
@AntoineRondelet Yes, they do seem to unused. Good catch. |
f597a15
to
393f88a
Compare
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.
Looks good. Would be nice to have the CI catch violations. (I'll look into that)
I've tried to address my comments in #334 |
Note: the |
(Worth rebasing this onto origin/dvelop before merging) |
#338 fixes the tests and provides public wrappers around the internal functions (so no need to adjust this code) |
Contract tests fix (depends on #333)
f433d6f
to
aa36dc8
Compare
Related to: #321 and #192
This PR:
UPPER_SNAKE_CASE
solhint
(solium
then replaced byethlint
seems to be poorly maintained, last release was more than a year ago.solhint
is actively maintained offers a good configuration set and is used by openZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/.solhint.json) and other serious projects). Several checks are voluntarily disabled for now because I didn't want to end up with a PR that shuffles the entire code base (renaming public functions, contract names etc => cascading these changes to the python code etc which will become a nightmare to review. Let's take it incrementally to avoid adding mistakes to the code base and breaking things)NatSpec
for documentation commentsTODO:
test_merkle_tree_contract.py
test (we have aMerkleTreeMiMC7_test
test contract but its import is broken sinceMerkleTreeMiMC7.sol
does not exist anymore)test_contract_base_mixer.py
test. It is now broken because the scope of some functions (e.g.test_assemble_nullifiers
) has been changed in this PR, so these functions are not in the ABI anymore. Since we should not expose unnecessary function simply to be able to call them in the test scripts, let's add aMixerBase_test.sol
"test proxy contract" to re-enable the tests despite the functions visibility change. - Fixed in Contract tests fix (depends on #333) #338