1

What is the numerical value of true and false? Presumably one is 0x0000000000000000 and one is 0x0000000000000001

0

Note that there is no type conversion from non-boolean to boolean types as there is in C and JavaScript, so if (1) { ... } is not valid Solidity. (from the official doc)

but generally a true would be any value !=0;

so you can use :

check = isittrue ? 1 : 0;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.