cashscript
cashscript copied to clipboard
Add an 'unused' modifier
Allow variables and parameters to have an unused
modifier that indicates it is ok for them to be unused.
contract Test(int unused a, int b) {
function test(int c) {
require(b == c);
}
}
@nathanielCherian looks like we might need an array of modifiers after all 😬
Wow, we were just talking about how there couldn't possibly be more modifiers😂
The array of modifiers code is saved on one of my branches so I'll look into that again and try implementing the new unused modifier.
Hey! Currently working on this and I had a question about the implementation.
As of now, the constant
keyword can only be applied to variables (not ParameterNodes). Should we extend the constant
keyword to parameters as well?
Also for the unused
modifier, do you see this being used for parameters exclusively or include VariableNodes too?
Hey @nathanielCherian! Sorry, I completely missed this comment, apologies for the late reply!
I think the unused
modifier should apply to parameters and variables. The constant modifier I'm not super sure, but maybe for consistency we can also apply it to parameters.