I want to use some variables in multiple functions in my library contract. Is there any way to do that? I got following error code for my library code.
library myArithmetic {
bytes1[10] mData;
function doSomeMath(bytes1[10] _input) public returns (bytes1[10]) {
for(uint8 i=0 ; i<10 ; i++){
mData[i] = _input[i];
}
//do some my math..here..
}
}
I have error, like TypeError: Library cannot have non-constant state variables
I do not want to make each of my functions with several parameter input and return, and to another functions..so on.
Is it possible to do that??
I know in the normal contract, the mData will be storage variables. But library does not allow to have state variables. So I cannot define such this way?