leo/compiler/tests/address/ternary.leo

6 lines
258 B
Plaintext
Raw Normal View History

function main(cond: bool) -> address {
let first = address(aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8);
let second = address(aleo18qgam03qe483tdrcc3fkqwpp38ehff4a2xma6lu7hams6lfpgcpq3dq05r);
return if cond ? first : second
}