considered as 'true' after calling the following function?
bool public depositsEnabled = false;
enum STATS {DEPOSITS_ENABLED}
function setTerms ( STATS _parameter, uint _input ) external onlyAuthorized() {
if ( _parameter == STATS.DEPOSITS_ENABLED ) {
depositsEnabled = _input == 1;
}
}
What's the point of having an enum with just one value?
Btw no that should revert as solidity treats bool and uint differently, not like C, but you can easily check if it compiles
thanks, so how should i approach with bool instead of uint?
Oh wait I read that wrong previously I thought you were assigning the enum, yeah that should work, but if I remember correctly the enum starts counting from 0
Обсуждают сегодня