Skip to content

Commit 8105acc

Browse files
authored
Merge pull request #81 from NillionNetwork/chore/0.8.0-update
chore: topup client balance | 0.8.0 release
2 parents 0b9e1c3 + ca28cd9 commit 8105acc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

quickstart_complete/client_code/secret_addition_complete.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ async def main():
4848
program_name = "secret_addition_complete"
4949
program_mir_path = f"../nada_quickstart_programs/target/{program_name}.nada.bin"
5050

51+
# Adding funds to the client balance so the upcoming operations can be paid for
52+
funds_amount = 1000
53+
print(f"💰 Adding some funds to the client balance: {funds_amount} uNIL")
54+
await client.add_funds(funds_amount)
55+
5156
# 3. Store the program
5257
print("-----STORE PROGRAM")
5358

@@ -101,6 +106,9 @@ async def main():
101106
result = await client.retrieve_compute_results(compute_id).invoke()
102107
print(f"✅ Compute complete for compute_id {compute_id}")
103108
print(f"🖥️ The result is {result}")
109+
balance = await client.balance()
110+
print(f"💰 Final client balance: {balance.balance} uNIL")
111+
client.close()
104112
return result
105113

106114

0 commit comments

Comments
 (0)