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