Contract foundation

Created On NaN secs ago - Invalid Date UTC+0

Contract Code


  
1 import currency
2 __owner = Variable(contract='foundation', name='owner')
3
4
5 def ____(vk: str):
6 __owner.set(vk)
7
8
9 @__export('foundation')
10 def withdraw(amount: float):
11 assert amount > 0, 'Cannot send negative balances!'
12 assert ctx.caller == __owner.get(), 'Not owner!'
13 currency.transfer(amount, ctx.caller)
14
15
16 @__export('foundation')
17 def change_owner(vk: str):
18 assert ctx.caller == __owner.get(), 'Not owner!'
19 __owner.set(vk)
20