-
Notifications
You must be signed in to change notification settings - Fork 12
/
egalitarian-dao.cll
31 lines (31 loc) · 980 Bytes
/
egalitarian-dao.cll
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
if tx.value < tx.basefee * 200:
stop
if contract.storage[tx.sender] == 0:
stop
k = sha3(32,tx.data[1])
if tx.data[0] == 0:
if contract.storage[k + tx.sender] == 0:
contract.storage[k + tx.sender] = 1
contract.storage[k] += 1
else if tx.data[0] == 1:
if tx.value <= tx.datan * block.basefee * 200 or contract.storage[k]:
stop
i = 2
while i < tx.datan:
contract.storage[k + i] = tx.data[i]
i = i + 1
contract.storage[k] = 1
contract.storage[k+1] = tx.datan
else if tx.data[0] == 2:
if contract.storage[k] >= contract.storage[2 ^ 255 + 1] * 2 / 3:
L = contract.storage[k+1]
if tx.value <= L * block.basefee * 200:
stop
i = 3
loc = contract.storage[k+2]
while i < L:
contract.storage[loc+i-3] = contract.storage[k+i]
i = i + 1
if contract.storage[2 ^ 255 + 1] == 0:
contract.storage[2 ^ 255 + 1] = 1
contract.storage[C] = 1