Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

convert bool to uint in solidity

bool isTrue = true;
uint number = isTrue ? uint(1) : uint(0);
// if isTrue then number == 1 else number == 0
 
PREVIOUS NEXT
Tagged: #convert #bool #uint #solidity
ADD COMMENT
Topic
Name
4+1 =