Skip to content

Instantly share code, notes, and snippets.

@nzpr
Last active July 8, 2020 04:57
Show Gist options
  • Save nzpr/3fc582b55089bcee344d4f51bbf181e6 to your computer and use it in GitHub Desktop.
Save nzpr/3fc582b55089bcee344d4f51bbf181e6 to your computer and use it in GitHub Desktop.
cpu-load-test.rho
new d1,d2,d3,d4,d5,d6,d7,d8,d9 in {
contract d1(@depth) = {
if (depth <= 0) {
Nil
} else {
d1!(depth - 1) | d1!(depth - 1) | d1!(depth - 1) | d1!(depth - 1) | d1!(depth - 1) | d1!(depth - 1) | d1!(depth - 1) | d1!(depth - 1) | d1!(depth - 1) | d1!(depth - 1) }
} |
contract d2(@depth) = {
if (depth <= 0) {
Nil
} else {
d2!(depth - 1) | d2!(depth - 1) | d2!(depth - 1) | d2!(depth - 1) | d2!(depth - 1) | d2!(depth - 1) | d2!(depth - 1) | d2!(depth - 1) | d2!(depth - 1) | d2!(depth - 1) }
} |
contract d3(@depth) = {
if (depth <= 0) {
Nil
} else {
d3!(depth - 1) | d3!(depth - 1) | d3!(depth - 1) | d3!(depth - 1) | d3!(depth - 1) | d3!(depth - 1) | d3!(depth - 1) | d3!(depth - 1) | d3!(depth - 1) | d3!(depth - 1) }
} |
contract d4(@depth) = {
if (depth <= 0) {
Nil
} else {
d4!(depth - 1) | d4!(depth - 1) | d4!(depth - 1) | d4!(depth - 1) | d4!(depth - 1) | d4!(depth - 1) | d4!(depth - 1) | d4!(depth - 1) | d4!(depth - 1) | d4!(depth - 1) }
} |
contract d5(@depth) = {
if (depth <= 0) {
Nil
} else {
d5!(depth - 1) | d5!(depth - 1) | d5!(depth - 1) | d5!(depth - 1) | d5!(depth - 1) | d5!(depth - 1) | d5!(depth - 1) | d5!(depth - 1) | d5!(depth - 1) | d5!(depth - 1) }
} |
contract d6(@depth) = {
if (depth <= 0) {
Nil
} else {
d6!(depth - 1) | d6!(depth - 1) | d6!(depth - 1) | d6!(depth - 1) | d6!(depth - 1) | d6!(depth - 1) | d6!(depth - 1) | d6!(depth - 1) | d6!(depth - 1) | d6!(depth - 1) }
} |
contract d7(@depth) = {
if (depth <= 0) {
Nil
} else {
d7!(depth - 1) | d7!(depth - 1) | d7!(depth - 1) | d7!(depth - 1) | d7!(depth - 1) | d7!(depth - 1) | d7!(depth - 1) | d7!(depth - 1) | d7!(depth - 1) | d7!(depth - 1) }
} |
contract d8(@depth) = {
if (depth <= 0) {
Nil
} else {
d8!(depth - 1) | d8!(depth - 1) | d8!(depth - 1) | d8!(depth - 1) | d8!(depth - 1) | d8!(depth - 1) | d8!(depth - 1) | d8!(depth - 1) | d8!(depth - 1) | d8!(depth - 1) }
} |
contract d9(@depth) = {
if (depth <= 0) {
Nil
} else {
d9!(depth - 1) | d9!(depth - 1) | d9!(depth - 1) | d9!(depth - 1) | d9!(depth - 1) | d9!(depth - 1) | d9!(depth - 1) | d9!(depth - 1) | d9!(depth - 1) | d9!(depth - 1) }
} |
d1!(2) |
d2!(2) |
d3!(2) |
d4!(2) |
d5!(2) |
d6!(2) |
d7!(2) |
d8!(2) |
d9!(2)
}
new d1,d2,d3,d4,d5,d6,d7,d8,d9 in {
contract d1(@depth) = {
if (depth <= 0) {
Nil
} else {
d1!(depth - 1) | d1!(depth - 1)}
} |
contract d2(@depth) = {
if (depth <= 0) {
Nil
} else {
d2!(depth - 1) | d2!(depth - 1)}
} |
contract d3(@depth) = {
if (depth <= 0) {
Nil
} else {
d3!(depth - 1) | d3!(depth - 1)}
} |
contract d4(@depth) = {
if (depth <= 0) {
Nil
} else {
d4!(depth - 1) | d4!(depth - 1)}
} |
contract d5(@depth) = {
if (depth <= 0) {
Nil
} else {
d5!(depth - 1) | d5!(depth - 1)}
} |
contract d6(@depth) = {
if (depth <= 0) {
Nil
} else {
d6!(depth - 1) | d6!(depth - 1)}
} |
contract d7(@depth) = {
if (depth <= 0) {
Nil
} else {
d7!(depth - 1) | d7!(depth - 1)}
} |
contract d8(@depth) = {
if (depth <= 0) {
Nil
} else {
d8!(depth - 1) | d8!(depth - 1)}
} |
contract d9(@depth) = {
if (depth <= 0) {
Nil
} else {
d9!(depth - 1) | d9!(depth - 1)}
} |
d1!(10) |
d2!(10) |
d3!(10) |
d4!(10) |
d5!(10) |
d6!(10) |
d7!(10) |
d8!(10) |
d9!(10)
}
new d1,d2,d3,d4,d5,d6,d7,d8,d9 in {
contract d1(@depth) = {
if (depth <= 0) {
Nil
} else {
d1!(depth - 1) | d1!(depth - 1)}
} |
contract d2(@depth) = {
if (depth <= 0) {
Nil
} else {
d2!(depth - 1) | d2!(depth - 1)}
} |
contract d3(@depth) = {
if (depth <= 0) {
Nil
} else {
d3!(depth - 1) | d3!(depth - 1)}
} |
contract d4(@depth) = {
if (depth <= 0) {
Nil
} else {
d4!(depth - 1) | d4!(depth - 1)}
} |
contract d5(@depth) = {
if (depth <= 0) {
Nil
} else {
d5!(depth - 1) | d5!(depth - 1)}
} |
contract d6(@depth) = {
if (depth <= 0) {
Nil
} else {
d6!(depth - 1) | d6!(depth - 1)}
} |
contract d7(@depth) = {
if (depth <= 0) {
Nil
} else {
d7!(depth - 1) | d7!(depth - 1)}
} |
contract d8(@depth) = {
if (depth <= 0) {
Nil
} else {
d8!(depth - 1) | d8!(depth - 1)}
} |
contract d9(@depth) = {
if (depth <= 0) {
Nil
} else {
d9!(depth - 1) | d9!(depth - 1)}
} |
d1!(7) |
d2!(7) |
d3!(7) |
d4!(7) |
d5!(7) |
d6!(7) |
d7!(7) |
d8!(7) |
d9!(7)
}
new d1,d2,d3,d4,d5,d6,d7,d8,d9 in {
contract d1(@depth) = {
if (depth <= 0) {
Nil
} else {
d1!(depth - 1) | d1!(depth - 1)}
} |
contract d2(@depth) = {
if (depth <= 0) {
Nil
} else {
d2!(depth - 1) | d2!(depth - 1)}
} |
contract d3(@depth) = {
if (depth <= 0) {
Nil
} else {
d3!(depth - 1) | d3!(depth - 1)}
} |
contract d4(@depth) = {
if (depth <= 0) {
Nil
} else {
d4!(depth - 1) | d4!(depth - 1)}
} |
contract d5(@depth) = {
if (depth <= 0) {
Nil
} else {
d5!(depth - 1) | d5!(depth - 1)}
} |
contract d6(@depth) = {
if (depth <= 0) {
Nil
} else {
d6!(depth - 1) | d6!(depth - 1)}
} |
contract d7(@depth) = {
if (depth <= 0) {
Nil
} else {
d7!(depth - 1) | d7!(depth - 1)}
} |
contract d8(@depth) = {
if (depth <= 0) {
Nil
} else {
d8!(depth - 1) | d8!(depth - 1)}
} |
contract d9(@depth) = {
if (depth <= 0) {
Nil
} else {
d9!(depth - 1) | d9!(depth - 1)}
} |
d1!(4) |
d2!(4) |
d3!(4) |
d4!(4) |
d5!(4) |
d6!(4) |
d7!(4) |
d8!(4) |
d9!(4)
}
new d1,d2,d3,d4,d5,d6,d7,d8,d9 in {
contract d1(@depth) = {
if (depth <= 0) {
Nil
} else {
d1!(depth - 1) | d1!(depth - 1)}
} |
contract d2(@depth) = {
if (depth <= 0) {
Nil
} else {
d2!(depth - 1) | d2!(depth - 1)}
} |
contract d3(@depth) = {
if (depth <= 0) {
Nil
} else {
d3!(depth - 1) | d3!(depth - 1)}
} |
contract d4(@depth) = {
if (depth <= 0) {
Nil
} else {
d4!(depth - 1) | d4!(depth - 1)}
} |
contract d5(@depth) = {
if (depth <= 0) {
Nil
} else {
d5!(depth - 1) | d5!(depth - 1)}
} |
contract d6(@depth) = {
if (depth <= 0) {
Nil
} else {
d6!(depth - 1) | d6!(depth - 1)}
} |
contract d7(@depth) = {
if (depth <= 0) {
Nil
} else {
d7!(depth - 1) | d7!(depth - 1)}
} |
contract d8(@depth) = {
if (depth <= 0) {
Nil
} else {
d8!(depth - 1) | d8!(depth - 1)}
} |
contract d9(@depth) = {
if (depth <= 0) {
Nil
} else {
d9!(depth - 1) | d9!(depth - 1)}
} |
d1!(11) |
d2!(11) |
d3!(11) |
d4!(11) |
d5!(11) |
d6!(11) |
d7!(11) |
d8!(11) |
d9!(11)
}
new d1,d2,d3,d4,d5,d6,d7,d8,d9 in {
contract d1(@depth) = {
if (depth <= 0) {
Nil
} else {
d1!(depth - 1) | d1!(depth - 1)}
} |
contract d2(@depth) = {
if (depth <= 0) {
Nil
} else {
d2!(depth - 1) | d2!(depth - 1)}
} |
contract d3(@depth) = {
if (depth <= 0) {
Nil
} else {
d3!(depth - 1) | d3!(depth - 1)}
} |
contract d4(@depth) = {
if (depth <= 0) {
Nil
} else {
d4!(depth - 1) | d4!(depth - 1)}
} |
contract d5(@depth) = {
if (depth <= 0) {
Nil
} else {
d5!(depth - 1) | d5!(depth - 1)}
} |
contract d6(@depth) = {
if (depth <= 0) {
Nil
} else {
d6!(depth - 1) | d6!(depth - 1)}
} |
contract d7(@depth) = {
if (depth <= 0) {
Nil
} else {
d7!(depth - 1) | d7!(depth - 1)}
} |
contract d8(@depth) = {
if (depth <= 0) {
Nil
} else {
d8!(depth - 1) | d8!(depth - 1)}
} |
contract d9(@depth) = {
if (depth <= 0) {
Nil
} else {
d9!(depth - 1) | d9!(depth - 1)}
} |
d1!(11) |
d2!(11) |
d3!(11) |
d4!(11) |
d5!(11) |
d6!(11) |
d7!(11) |
d8!(11) |
d9!(11)
}
new d1,d2,d3,d4,d5,d6,d7,d8,d9 in {
contract d1(@depth) = {
if (depth <= 0) {
Nil
} else {
d1!(depth - 1) | d1!(depth - 1)}
} |
contract d2(@depth) = {
if (depth <= 0) {
Nil
} else {
d2!(depth - 1) | d2!(depth - 1)}
} |
contract d3(@depth) = {
if (depth <= 0) {
Nil
} else {
d3!(depth - 1) | d3!(depth - 1)}
} |
contract d4(@depth) = {
if (depth <= 0) {
Nil
} else {
d4!(depth - 1) | d4!(depth - 1)}
} |
contract d5(@depth) = {
if (depth <= 0) {
Nil
} else {
d5!(depth - 1) | d5!(depth - 1)}
} |
contract d6(@depth) = {
if (depth <= 0) {
Nil
} else {
d6!(depth - 1) | d6!(depth - 1)}
} |
contract d7(@depth) = {
if (depth <= 0) {
Nil
} else {
d7!(depth - 1) | d7!(depth - 1)}
} |
contract d8(@depth) = {
if (depth <= 0) {
Nil
} else {
d8!(depth - 1) | d8!(depth - 1)}
} |
contract d9(@depth) = {
if (depth <= 0) {
Nil
} else {
d9!(depth - 1) | d9!(depth - 1)}
} |
d1!(8) |
d2!(8) |
d3!(8) |
d4!(8) |
d5!(8) |
d6!(8) |
d7!(8) |
d8!(8) |
d9!(8)
}
new d1,d2,d3,d4,d5,d6,d7,d8,d9 in {
contract d1(@depth) = {
if (depth <= 0) {
Nil
} else {
d1!(depth - 1) | d1!(depth - 1)}
} |
contract d2(@depth) = {
if (depth <= 0) {
Nil
} else {
d2!(depth - 1) | d2!(depth - 1)}
} |
contract d3(@depth) = {
if (depth <= 0) {
Nil
} else {
d3!(depth - 1) | d3!(depth - 1)}
} |
contract d4(@depth) = {
if (depth <= 0) {
Nil
} else {
d4!(depth - 1) | d4!(depth - 1)}
} |
contract d5(@depth) = {
if (depth <= 0) {
Nil
} else {
d5!(depth - 1) | d5!(depth - 1)}
} |
contract d6(@depth) = {
if (depth <= 0) {
Nil
} else {
d6!(depth - 1) | d6!(depth - 1)}
} |
contract d7(@depth) = {
if (depth <= 0) {
Nil
} else {
d7!(depth - 1) | d7!(depth - 1)}
} |
contract d8(@depth) = {
if (depth <= 0) {
Nil
} else {
d8!(depth - 1) | d8!(depth - 1)}
} |
contract d9(@depth) = {
if (depth <= 0) {
Nil
} else {
d9!(depth - 1) | d9!(depth - 1)}
} |
d1!(5) |
d2!(5) |
d3!(5) |
d4!(5) |
d5!(5) |
d6!(5) |
d7!(5) |
d8!(5) |
d9!(5)
}
new d1,d2,d3,d4,d5,d6,d7,d8,d9 in {
contract d1(@depth) = {
if (depth <= 0) {
Nil
} else {
d1!(depth - 1) | d1!(depth - 1)}
} |
contract d2(@depth) = {
if (depth <= 0) {
Nil
} else {
d2!(depth - 1) | d2!(depth - 1)}
} |
contract d3(@depth) = {
if (depth <= 0) {
Nil
} else {
d3!(depth - 1) | d3!(depth - 1)}
} |
contract d4(@depth) = {
if (depth <= 0) {
Nil
} else {
d4!(depth - 1) | d4!(depth - 1)}
} |
contract d5(@depth) = {
if (depth <= 0) {
Nil
} else {
d5!(depth - 1) | d5!(depth - 1)}
} |
contract d6(@depth) = {
if (depth <= 0) {
Nil
} else {
d6!(depth - 1) | d6!(depth - 1)}
} |
contract d7(@depth) = {
if (depth <= 0) {
Nil
} else {
d7!(depth - 1) | d7!(depth - 1)}
} |
contract d8(@depth) = {
if (depth <= 0) {
Nil
} else {
d8!(depth - 1) | d8!(depth - 1)}
} |
contract d9(@depth) = {
if (depth <= 0) {
Nil
} else {
d9!(depth - 1) | d9!(depth - 1)}
} |
d1!(2) |
d2!(2) |
d3!(2) |
d4!(2) |
d5!(2) |
d6!(2) |
d7!(2) |
d8!(2) |
d9!(2)
}
new d1,d2,d3,d4,d5,d6,d7,d8,d9 in {
contract d1(@depth) = {
if (depth <= 0) {
Nil
} else {
d1!(depth - 1) | d1!(depth - 1)}
} |
contract d2(@depth) = {
if (depth <= 0) {
Nil
} else {
d2!(depth - 1) | d2!(depth - 1)}
} |
contract d3(@depth) = {
if (depth <= 0) {
Nil
} else {
d3!(depth - 1) | d3!(depth - 1)}
} |
contract d4(@depth) = {
if (depth <= 0) {
Nil
} else {
d4!(depth - 1) | d4!(depth - 1)}
} |
contract d5(@depth) = {
if (depth <= 0) {
Nil
} else {
d5!(depth - 1) | d5!(depth - 1)}
} |
contract d6(@depth) = {
if (depth <= 0) {
Nil
} else {
d6!(depth - 1) | d6!(depth - 1)}
} |
contract d7(@depth) = {
if (depth <= 0) {
Nil
} else {
d7!(depth - 1) | d7!(depth - 1)}
} |
contract d8(@depth) = {
if (depth <= 0) {
Nil
} else {
d8!(depth - 1) | d8!(depth - 1)}
} |
contract d9(@depth) = {
if (depth <= 0) {
Nil
} else {
d9!(depth - 1) | d9!(depth - 1)}
} |
d1!(12) |
d2!(12) |
d3!(12) |
d4!(12) |
d5!(12) |
d6!(12) |
d7!(12) |
d8!(12) |
d9!(12)
}
new d1,d2,d3,d4,d5,d6,d7,d8,d9 in {
contract d1(@depth) = {
if (depth <= 0) {
Nil
} else {
d1!(depth - 1) | d1!(depth - 1)}
} |
contract d2(@depth) = {
if (depth <= 0) {
Nil
} else {
d2!(depth - 1) | d2!(depth - 1)}
} |
contract d3(@depth) = {
if (depth <= 0) {
Nil
} else {
d3!(depth - 1) | d3!(depth - 1)}
} |
contract d4(@depth) = {
if (depth <= 0) {
Nil
} else {
d4!(depth - 1) | d4!(depth - 1)}
} |
contract d5(@depth) = {
if (depth <= 0) {
Nil
} else {
d5!(depth - 1) | d5!(depth - 1)}
} |
contract d6(@depth) = {
if (depth <= 0) {
Nil
} else {
d6!(depth - 1) | d6!(depth - 1)}
} |
contract d7(@depth) = {
if (depth <= 0) {
Nil
} else {
d7!(depth - 1) | d7!(depth - 1)}
} |
contract d8(@depth) = {
if (depth <= 0) {
Nil
} else {
d8!(depth - 1) | d8!(depth - 1)}
} |
contract d9(@depth) = {
if (depth <= 0) {
Nil
} else {
d9!(depth - 1) | d9!(depth - 1)}
} |
d1!(9) |
d2!(9) |
d3!(9) |
d4!(9) |
d5!(9) |
d6!(9) |
d7!(9) |
d8!(9) |
d9!(9)
}
new d1,d2,d3,d4,d5,d6,d7,d8,d9 in {
contract d1(@depth) = {
if (depth <= 0) {
Nil
} else {
d1!(depth - 1) | d1!(depth - 1)}
} |
contract d2(@depth) = {
if (depth <= 0) {
Nil
} else {
d2!(depth - 1) | d2!(depth - 1)}
} |
contract d3(@depth) = {
if (depth <= 0) {
Nil
} else {
d3!(depth - 1) | d3!(depth - 1)}
} |
contract d4(@depth) = {
if (depth <= 0) {
Nil
} else {
d4!(depth - 1) | d4!(depth - 1)}
} |
contract d5(@depth) = {
if (depth <= 0) {
Nil
} else {
d5!(depth - 1) | d5!(depth - 1)}
} |
contract d6(@depth) = {
if (depth <= 0) {
Nil
} else {
d6!(depth - 1) | d6!(depth - 1)}
} |
contract d7(@depth) = {
if (depth <= 0) {
Nil
} else {
d7!(depth - 1) | d7!(depth - 1)}
} |
contract d8(@depth) = {
if (depth <= 0) {
Nil
} else {
d8!(depth - 1) | d8!(depth - 1)}
} |
contract d9(@depth) = {
if (depth <= 0) {
Nil
} else {
d9!(depth - 1) | d9!(depth - 1)}
} |
d1!(6) |
d2!(6) |
d3!(6) |
d4!(6) |
d5!(6) |
d6!(6) |
d7!(6) |
d8!(6) |
d9!(6)
}
new d1,d2,d3,d4,d5,d6,d7,d8,d9 in {
contract d1(@depth) = {
if (depth <= 0) {
Nil
} else {
d1!(depth - 1) | d1!(depth - 1)}
} |
contract d2(@depth) = {
if (depth <= 0) {
Nil
} else {
d2!(depth - 1) | d2!(depth - 1)}
} |
contract d3(@depth) = {
if (depth <= 0) {
Nil
} else {
d3!(depth - 1) | d3!(depth - 1)}
} |
contract d4(@depth) = {
if (depth <= 0) {
Nil
} else {
d4!(depth - 1) | d4!(depth - 1)}
} |
contract d5(@depth) = {
if (depth <= 0) {
Nil
} else {
d5!(depth - 1) | d5!(depth - 1)}
} |
contract d6(@depth) = {
if (depth <= 0) {
Nil
} else {
d6!(depth - 1) | d6!(depth - 1)}
} |
contract d7(@depth) = {
if (depth <= 0) {
Nil
} else {
d7!(depth - 1) | d7!(depth - 1)}
} |
contract d8(@depth) = {
if (depth <= 0) {
Nil
} else {
d8!(depth - 1) | d8!(depth - 1)}
} |
contract d9(@depth) = {
if (depth <= 0) {
Nil
} else {
d9!(depth - 1) | d9!(depth - 1)}
} |
d1!(3) |
d2!(3) |
d3!(3) |
d4!(3) |
d5!(3) |
d6!(3) |
d7!(3) |
d8!(3) |
d9!(3)
}
new stdout(`rho:io:stdout`), uname in {
stdout!("check balance, 1, id " ++ "${uname}"%%{"id":*uname})
}
new
rl(`rho:registry:lookup`), stdout(`rho:io:stdout`),
revVaultCh, vaultCh, balanceCh, log
in {
log!("check balance, 1, id " ++ "${id}"%%{"id":*log}) |
rl!(`rho:rchain:revVault`, *revVaultCh) |
for (@(_, revVault) <- revVaultCh) {
log!("check balance, 2, id " ++ "${id}"%%{"id":*log}) |
match "1111Ysns49wrejhzKeUP25JXFaMhYXVWMz4DALNEh3vCUJBYpHLDz" {
revAddress => {
log!("check balance, 3, id " ++ "${id}"%%{"id":*log}) |
@revVault!("findOrCreate", revAddress, *vaultCh) |
for (@(true, vault) <- vaultCh) {
log!("check balance, 4, id " ++ "${id}"%%{"id":*log}) |
@vault!("balance", *balanceCh) |
for (@balance <- balanceCh) {
log!("check balance, 5, id " ++ "${id}"%%{"id":*log}) |
log!("Balance of " ++ revAddress ++ " is ${balance}."%%{"balance":balance})
}
}
}
}
} |
contract log(@data) = {
stdout!(data)
}
}
new
rl(`rho:registry:lookup`), stdout(`rho:io:stdout`),
revVaultCh, vaultCh, balanceCh, log
in {
log!("check balance, 1") |
rl!(`rho:rchain:revVault`, *revVaultCh) |
for (@(_, revVault) <- revVaultCh) {
log!("check balance, 2") |
match "1111Ysns49wrejhzKeUP25JXFaMhYXVWMz4DALNEh3vCUJBYpHLDz" {
revAddress => {
log!("check balance, 3") |
@revVault!("findOrCreate", revAddress, *vaultCh) |
for (@(true, vault) <- vaultCh) {
log!("check balance, 4") |
@vault!("balance", *balanceCh) |
for (@balance <- balanceCh) {
log!("check balance, 5") |
log!("Balance of " ++ revAddress ++ " is ${balance}."%%{"balance":balance})
}
}
}
}
} |
contract log(@data) = {
stdout!(data)
}
}
new d1,d2,d3,d4,d5,d6,d7,d8,d9 in {
contract d1(@depth) = {
if (depth <= 0) {
Nil
} else {
d1!(depth - 1) | d1!(depth - 1) | d1!(depth - 1) | d1!(depth - 1) | d1!(depth - 1) | d1!(depth - 1) | d1!(depth - 1) | d1!(depth - 1) | d1!(depth - 1) | d1!(depth - 1) }
} |
contract d2(@depth) = {
if (depth <= 0) {
Nil
} else {
d2!(depth - 1) | d2!(depth - 1) | d2!(depth - 1) | d2!(depth - 1) | d2!(depth - 1) | d2!(depth - 1) | d2!(depth - 1) | d2!(depth - 1) | d2!(depth - 1) | d2!(depth - 1) }
} |
contract d3(@depth) = {
if (depth <= 0) {
Nil
} else {
d3!(depth - 1) | d3!(depth - 1) | d3!(depth - 1) | d3!(depth - 1) | d3!(depth - 1) | d3!(depth - 1) | d3!(depth - 1) | d3!(depth - 1) | d3!(depth - 1) | d3!(depth - 1) }
} |
contract d4(@depth) = {
if (depth <= 0) {
Nil
} else {
d4!(depth - 1) | d4!(depth - 1) | d4!(depth - 1) | d4!(depth - 1) | d4!(depth - 1) | d4!(depth - 1) | d4!(depth - 1) | d4!(depth - 1) | d4!(depth - 1) | d4!(depth - 1) }
} |
contract d5(@depth) = {
if (depth <= 0) {
Nil
} else {
d5!(depth - 1) | d5!(depth - 1) | d5!(depth - 1) | d5!(depth - 1) | d5!(depth - 1) | d5!(depth - 1) | d5!(depth - 1) | d5!(depth - 1) | d5!(depth - 1) | d5!(depth - 1) }
} |
contract d6(@depth) = {
if (depth <= 0) {
Nil
} else {
d6!(depth - 1) | d6!(depth - 1) | d6!(depth - 1) | d6!(depth - 1) | d6!(depth - 1) | d6!(depth - 1) | d6!(depth - 1) | d6!(depth - 1) | d6!(depth - 1) | d6!(depth - 1) }
} |
contract d7(@depth) = {
if (depth <= 0) {
Nil
} else {
d7!(depth - 1) | d7!(depth - 1) | d7!(depth - 1) | d7!(depth - 1) | d7!(depth - 1) | d7!(depth - 1) | d7!(depth - 1) | d7!(depth - 1) | d7!(depth - 1) | d7!(depth - 1) }
} |
contract d8(@depth) = {
if (depth <= 0) {
Nil
} else {
d8!(depth - 1) | d8!(depth - 1) | d8!(depth - 1) | d8!(depth - 1) | d8!(depth - 1) | d8!(depth - 1) | d8!(depth - 1) | d8!(depth - 1) | d8!(depth - 1) | d8!(depth - 1) }
} |
contract d9(@depth) = {
if (depth <= 0) {
Nil
} else {
d9!(depth - 1) | d9!(depth - 1) | d9!(depth - 1) | d9!(depth - 1) | d9!(depth - 1) | d9!(depth - 1) | d9!(depth - 1) | d9!(depth - 1) | d9!(depth - 1) | d9!(depth - 1) }
} |
d1!(4) |
d2!(4) |
d3!(4) |
d4!(4) |
d5!(4) |
d6!(4) |
d7!(4) |
d8!(4) |
d9!(4)
}
new dupe in {
contract dupe(@depth) = {
if (depth <= 0) {
Nil
} else {
dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) |
dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) |
dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1)
}
} | dupe!(2)
}
new dupe in {
contract dupe(@depth) = {
if (depth <= 0) {
Nil
} else {
dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) |
dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) |
dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) |
dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1)
}
} | dupe!(2)
}
new dupe in {
contract dupe(@depth) = {
if (depth <= 0) {
Nil
} else {
dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) |
dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) |
dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) |
dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) |
dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1)
}
} | dupe!(2)
}
new
rl(`rho:registry:lookup`), RevVaultCh,
vaultCh, balanceCh,
deployId(`rho:rchain:deployId`),
stdout(`rho:io:stdout`)
in {
rl!(`rho:rchain:revVault`, *RevVaultCh) |
for (@(_, RevVault) <- RevVaultCh) {
stdout!(("MyRChainWallet.CheckBalance.rho")) |
match "1111wz8Ga8b6pPnDgKarjMeFBYr1Fsor8CUfpXfaNcD3D2328sbfv" {
revAddress => {
stdout!(("Accessing vault at RevAddress", revAddress)) |
// most RevVault methods return an `Either[String, A] = (false, String) / (true, A)`
@RevVault!("findOrCreate", revAddress, *vaultCh) |
for (@(true, vault) <- vaultCh) {
stdout!("Obtained vault, checking balance") |
@vault!("balance", *balanceCh) |
for (@balance <- balanceCh) {
stdout!(("Balance is", balance)) |
deployId!(balance)
}
}
}
}
}
}
new x in {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment