ethereum POC5 (well, almost...)
TXVALUE PUSH 25 PUSH 10 PUSH 18 EXP MUL LE NOT PUSH 34 JMPI STOP PUSH 34
JMP PUSH 0 TXDATA SLOAD NOT PUSH 0 TXDATA PUSH 1000 LT NOT MUL NOT NOT
PUSH 34 JMPI STOP PUSH 1 TXDATA PUSH 0 TXDATA SSTORE
init:
contract.storage[msg.sender] = 1000000
code:
if msg.datasize == 1:
addr = msg.data[0]
return(contract.storage[addr])
else:
from = msg.sender
fromvalue = contract.storage[from]
to = msg.data[0]
value = msg.data[1]
if fromvalue >= value:
contract.storage[from] = fromvalue - value
contract.storage[to] = contract.storage[to] + value
return(1)
else:
return(0)
{
[0] "Splitter"
(call (- (gas) 100) 0x2d0aceee7e5ab874e22ccf8d1a649f59106d74e8 0 0 8 0 0)
(return 0 (lll {
[count] (/ (calldatasize) 32)
[pay] (/ (callvalue) @count)
;; Cycle through each address
(for {} (< @i @count) [i](+ @i 1)
;; Send to 'i'th argument (assuming it's an address).
(call (- (gas) 100) (calldataload (* @i 32)) @pay 0 0 0 0)
)
} 0))
}
int32 a = 20
int32 b = 10
var str = "hello"
otherStr := "world"
if a < b {
exit()
} else {
// :-)
if !a {
if this.data[0] ** 10 >= 10 {
this.data[0] = 1000;
}
}
}
Questions / Feedback?